PWM of voltage input to PIC - will it damage the chip?


Closed Thread
Results 1 to 9 of 9
  1. #1

    Default PWM of voltage input to PIC - will it damage the chip?

    I have a PCB with a 16F1283 chip to control 5 blinking LEDs buried inside a model. The board is powered by 5V which is also used to turn on 5 steady-on LEDs (total of 10). I want to use an external PIC & PWM to 'ramp up' the voltage from 0-5V to make the 5 steady-on LEDs fade in, but will it harm the PIC?

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: PWM of voltage input to PIC - will it damage the chip?

    I ma not sure what exactly your wiring will be. Maybe a schematic will help.

    Ioannis

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: PWM of voltage input to PIC - will it damage the chip?

    Here's the relevant schematic portion of the board that will be inside the model:

    Name:  Brd_schematic.png
Views: 450
Size:  32.2 KB

    The steady-on LEDs are on the RHS. Both them and the 12F683 PIC are powered by the same +5V input.

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: PWM of voltage input to PIC - will it damage the chip?

    You imply that with the PWM controlled voltage, you will power also the PIC12F683 circuit?

    Ioannis

  5. #5
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: PWM of voltage input to PIC - will it damage the chip?

    I think that you might easily do both with the same chip. Google "transistor as switch" this will allow all five LEDS to ramp-up from the same PWM output without issue (and the power needed to run them will not go through the PIC). You might use the same technique to tie several (or all) of the flashers together as well. This would be a good precaution to take regardless as there is a maximum output allowed from the chip. An I2C port expander would also provide 6 additional output pins (subtracting the two PIC I2C pins required from the 8 on the expander equals a net gain of 6) if you can spare the room.

    The problem with an external PWM to run the PIC (if I understand rightly) is that it will be constantly resetting as the PWM signal goes to zero

    Also in you OP you state your using a 16F1283, but in the schematic is a 12F683. Please clarify.
    Last edited by Amoque; - 22nd January 2016 at 13:17.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: PWM of voltage input to PIC - will it damage the chip?

    Quote Originally Posted by Ioannis View Post
    You imply that with the PWM controlled voltage, you will power also the PIC12F683 circuit?

    Ioannis
    That's right. I'm just worried that that will hurt the PIC.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: PWM of voltage input to PIC - will it damage the chip?

    PIC will not be hurt. But as Amoque noted, it will keep reseting because it cannot work from 0 volts, right?

    You have to make new electric connections.

    Ioannis

  8. #8


    Did you find this post helpful? Yes | No

    Default Re: PWM of voltage input to PIC - will it damage the chip?

    The board is only 1.5" in diameter and I don't think I can fit anything more on it:

    Name:  Board.png
Views: 454
Size:  194.1 KB

    I don't think the PIC restarting is a problem since all it does is blink 5 LEDs at separate rates, so if it's turning-on-and-turning-off then that could look OK.

  9. #9


    Did you find this post helpful? Yes | No

    Default Re: PWM of voltage input to PIC - will it damage the chip?

    Quote Originally Posted by Amoque View Post
    I think that you might easily do both with the same chip. Google "transistor as switch" this will allow all five LEDS to ramp-up from the same PWM output without issue (and the power needed to run them will not go through the PIC). You might use the same technique to tie several (or all) of the flashers together as well. This would be a good precaution to take regardless as there is a maximum output allowed from the chip. An I2C port expander would also provide 6 additional output pins (subtracting the two PIC I2C pins required from the 8 on the expander equals a net gain of 6) if you can spare the room.

    The problem with an external PWM to run the PIC (if I understand rightly) is that it will be constantly resetting as the PWM signal goes to zero

    Also in you OP you state your using a 16F1283, but in the schematic is a 12F683. Please clarify.
    It's a 12F683. This forum won't let you edit a post after some time has passed so I couldn't update it.

    Maybe what I could do is have 3 wires go up to the board - +5V, GND & +5V* (PWM control just for the steady-on LEDs)?
    Last edited by RossWaddell; - 22nd January 2016 at 18:29.

Similar Threads

  1. Replies: 7
    Last Post: - 22nd January 2012, 04:50
  2. 30 PWM outputs on one chip?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 25th September 2009, 16:32
  3. Temp readings and voltage input
    By ruijc in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 7th July 2008, 12:35
  4. Lowest readable input voltage?
    By droptail in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 7th January 2008, 10:12
  5. measuring input voltage
    By thon in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th August 2004, 16:03

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts