Offline
Full Member
Karma: 0
Posts: 120
|
 |
« on: February 08, 2012, 04:12:35 pm » |
Hi, I am attempting to control 10-20 LEDs on a single digital input and was wondering if either of the schematics in the photo would work or if they would just destroy an Arduino Uno. Thanks. 
|
|
|
|
|
Logged
|
|
|
|
|
"The old Europe"
Offline
Edison Member
Karma: 0
Posts: 2003
Bootloaders suck!
|
 |
« Reply #1 on: February 08, 2012, 04:52:33 pm » |
The right drawing is less incomplete.
A few observations:
a) you still need a base resistor for each transistor (can't say which, as I don't know which transistor / LED you use) b) you still need a form of current limiting (series resistor for low power leds) c) if you use NPN transistors, they should be on the GND side of the LEDs.
Do some google-ing and report back ;-)
|
|
|
|
« Last Edit: February 08, 2012, 05:04:42 pm by madworm »
|
Logged
|
• Upload doesn't work? Do a loop-back test. • There's absolutely NO excuse for not having an ISP! • Your AVR needs a brain surgery? Use the online FUSE calculator. • My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets... • Microsoft is not the answer. It is the question, and the answer is NO!
|
|
|
|
Colorado
Offline
Edison Member
Karma: 39
Posts: 1202
Reviving dead brain cells with Arduinos.
|
 |
« Reply #2 on: February 08, 2012, 06:06:44 pm » |
... and you're also shorting your ground with the digital pin (the very last line at the very top of the LED stack.)
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 120
|
 |
« Reply #3 on: February 08, 2012, 09:09:42 pm » |
Thanks for the notice. I hadn't realized I had that shorting on the top of the stack. As for resistors let's just say all the LEDs are blue and I had them in parallel. Could I get away with one resistor for each LED? Although a number of people were commenting saying that the current would drop and some of the LEDs would not light up at the end? I found this online at http://led.linear1.org/led.wiz Any thoughts?
|
|
|
|
|
Logged
|
|
|
|
|
Cumming, Ga
Offline
Edison Member
Karma: 12
Posts: 1388
Ultimate DIY: Arduino
|
 |
« Reply #4 on: February 08, 2012, 09:41:15 pm » |
1 - Yes, every LED needs a resistor. 2 - With 5V being supplied, 39 Ohms is low. My calculation says you don't want lower than 75 Ohm and if you want lower current draw for the whole array, use 100 to 220 ohms. 3 - You can drive this with a single arduino pin and a Power transistor, like TIP122 with a 1k Ohm resistor between the pin and the base. Emitter to GND and Collector to the resistor bank/cathode end of the LED's.
|
|
|
|
|
Logged
|
|
|
|
|
Toronto, Canada
Offline
Edison Member
Karma: 2
Posts: 1233
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
|
 |
« Reply #5 on: February 09, 2012, 12:51:27 am » |
The last schematic, with 20 led's connect to a 39 ohms... is about 10 mA each, if the led drop is 1.2 V. Therefore 10 mA time 20 = 200 mA total curent. With a 220 ohms, you have about 2 mA each led. 20 time 2 mA = 40 mA. Now, that a better total current.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16426
Available for Design & Build services
|
 |
« Reply #6 on: February 09, 2012, 01:01:32 am » |
Blue LEDs typically have a higher Vforward - like 3 to 3.5V So (Vsource - Vforward - Vce-transistor)/20ma = Resistor (5-3.35-0.7)/.02 = 40 ohm
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16426
Available for Design & Build services
|
 |
« Reply #7 on: February 09, 2012, 01:11:56 am » |
Example
|
|
|
|
« Last Edit: February 09, 2012, 01:14:10 am by CrossRoads »
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 120
|
 |
« Reply #8 on: February 09, 2012, 04:14:43 pm » |
Can you please explain the bottom of the schematics. This is still all a little confusing but greatly appreciated. I understand the top but are the arrows at the bottom going to ground? If so then what is the 35ma resistor connected to? Or do you have a wire in 5v, one in say Digital pin 1, and one going to ground?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 78
Arduino rocks
|
 |
« Reply #9 on: February 09, 2012, 04:38:26 pm » |
A transistor has three pins: The collector, where the current goes in (NPN), the emitter, where the current goes out (NPN again) and the base, which controls how much current gets through (on both types). The 150 Ohms resistor goes to the Arduino digital pin to allow the Arduino to control the transistor. The emitter goes to ground, because that is where all the current has to go eventually. Leaving the collector free to be in the path between the LEDs and ground.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 269
Posts: 25381
Solder is electric glue
|
 |
« Reply #10 on: February 09, 2012, 04:49:51 pm » |
35ma resistor connected to 35mA is the current going through the base of the transistor, that is the connector on the side of the bar. The emitter is the connection with the arrow and the collector is the other one on the symbol. It is going to an output pin of an arduino.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 120
|
 |
« Reply #11 on: February 09, 2012, 05:31:31 pm » |
Thanks. That makes a lot more sense.
|
|
|
|
|
Logged
|
|
|
|
|
|