Pages: [1]   Go Down
Author Topic: Do I need one R for each LED?  (Read 829 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)

« Last Edit: September 25, 2012, 03:26:24 am by flameproof » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33296
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes you need one resistor for each LED.

See

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

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Shannon Member
****
Karma: 199
Posts: 11649
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: