Go Down

### Topic: Do I need one R for each LED? (Read 1 time)previous topic - next topic

#### flameproof

##### Sep 25, 2012, 10:23 amLast 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

#1
##### Sep 25, 2012, 10:34 am
Yes you need one resistor for each LED.

See

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

#### dc42

#2
##### Sep 25, 2012, 10:44 am

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

#3
##### Sep 25, 2012, 11:15 am
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.

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

#### flameproof

#4
##### Sep 25, 2012, 11:24 am

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.

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

BTW, I plan playing with a LED cube.

#### MarkT

#5
##### Sep 25, 2012, 02:17 pm
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 will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up