When Driving An Indicator L.E.D.


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Nov 2021
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: When Driving An Indicator L.E.D.

    Yes there was always a resistor. Thank you for the lesson.

  2. #2
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: When Driving An Indicator L.E.D.

    The PIC outputs 5V, the forward voltage of the LED is 1.5V at 10mA. So you need to drop 3.5V across the resistor when 10mA flows thru it.
    R=U/I or 3.5V/0.01A=350Ohm. For a LED this is not at all critical, a 220Ohm resistor will work and so will a 680Ohm resistor.
    I thought the resistor only provided current limiting? Maybe you've explained but I don't get how it drops the voltage. I've used voltage dividers using 2 resistors, etc.
    It may be helpful to try what HenrikOlsson suggested. Put a volt meter at the LED Anode (the + side, assuming the resistor is placed on the LED's "+" side) with a low value resistor (referencing the math provided by Henrik, try 220 Ohms) and see what the actual voltage is. Then replace the resistor with one a bit higher in value and retest the voltage. Repeat with an even larger resistor. You'll see that the voltage at the LED Anode doesn't change much as you swap out different resistors. HOWEVER, the CURRENT flowing through the circuit DOES change. (Ohm's Law stuff.) This will eventually affect how bright the LED appears to your human eye.

    Most 8-bit PICs have 25ma ratings on the individual pins (some are as low as 10 ma, some as high as 50; you didn't mention the PIC part you're playing with). Therefore, driving an LED is perfectly safe, so long as you include the 'current limiting' resistor.

  3. #3
    Join Date
    Nov 2021
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: When Driving An Indicator L.E.D.

    Thanks Mike. I'm using the 16F1823.

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


    Did you find this post helpful? Yes | No

    Default Re: When Driving An Indicator L.E.D.

    Take a look at charlieplexing if you'd like to see LED indicators taken to the extreme. Not saying this applies to your question, but it will give you some insight into how cleverly these simple rules can be applied.

Similar Threads

  1. Temperature Indicator Usage
    By gunayburak in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th August 2015, 16:53
  2. One of 33 LED output Indicator
    By SOTASOTA in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th December 2012, 17:26
  3. About the replacement of the indicator with BASIC.
    By apollo21 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th June 2008, 04:56
  4. Driving me NUTS!
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th October 2005, 15:06
  5. Temp. Indicator.
    By PIC Coder in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th April 2005, 06:10

Members who have read this thread : 0

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