Go Down

Topic: Do I need one R for each LED? (Read 879 times) previous topic - next topic

flameproof

Sep 25, 2012, 10:23 am Last Edit: Sep 25, 2012, 10:26 am by flameproof Reason: 1
I just wonder, why I need to put one resistor in front of each LED and not simply use one R between LED GND and Arduino GND? Wouldn't that have the same effect?

(borrowed picture shows how it's supposed to be)


Grumpy_Mike


dc42


I just wonder, why I need to put one resistor in front of each LED and not simply use one R between LED GND and Arduino GND? Wouldn't that have the same effect?


If you only turn on one LED at a time, then you can use a common resistor. if you want to turn on more than one at a time, use separate resistors.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

tkbyd

The heart of the problem with the one resistor circuit is that the more current there is through the resistor, the more voltage drop you get in that part of the circuit... so the brightness of the LEDs changes when you go from one to two to three LEDs lit.

Long answer:

http://www.arunet.co.uk/tkboyd/ele1led.htm

flameproof


The heart of the problem with the one resistor circuit is that the more current there is through the resistor, the more voltage drop you get in that part of the circuit... so the brightness of the LEDs changes when you go from one to two to three LEDs lit.

Long answer:

http://www.arunet.co.uk/tkboyd/ele1led.htm


Good reading material! Thanks!

BTW, I plan playing with a LED cube.

MarkT

You can drive an LED with either a constant-current driver circuit or via a current-limiting resistor.  The latter is an approximation to constant current drive, provided the supply voltage is sufficiently more than the forward voltage of the LED (5V is plenty).   Since the eye is not very good at judging brightness to better than 30% or so, the resistor value is not too critical, it just has to be chosen to prevent the LED getting too much current in the worst case.

Different colour LEDs have very different forward voltages, note - you wouldn't usually share a resistor between different colour LEDs even if only one-at-a-time will be on.

A tricky situation is powering blue and white LEDs from 3.3V since the forward voltage of blue/white LEDs is about 3 to 3.3V and it varies somewhat with temperature.  Luckily most Arduinos are 5V.

You calculate the voltage across the resistor = Vsupply - Vled, then choose the resistance value from R = V/I  (I is the LED current you want).
[ I won't respond to messages, use the forum please ]

Go Up