Hello!
I would like to make a lamp with three 12V 2W LEDs. When I turn on the lamp, each LED should light up with a delay compared to previous led, this should be Arduino's job.
I would like to know if TIP122 transistors are suitable for switching 12V LEDs using Arduino?
In Arduino's webpage it is written that Arduino Duemilanove can handle input power up to 12 V. So can I connect it straight to 12 V Led Power Supply?
Can I divide the Led Power Supply voltage 12 V into two - one goes to Arduino and the other half goes to leds and transistors?
I would like to know if TIP122 transistors are suitable for switching 12V LEDs using Arduino?
Yes but see below. You also need a resistor in the base of each transistor.
In Arduino's webpage it is written that Arduino Duemilanove can handle input power up to 12 V. So can I connect it straight to 12 V Led Power Supply?
No you miss read that. The 12V is only for the power jack, it gets cut down to 5V by an internal regulator.
Can I divide the Led Power Supply voltage 12 V into two - one goes to Arduino and the other half goes to leds and transistors?
No, that does not make sense.
You do not just apply 12V to a 2W LED unless there is some form of current limiting in the LED. With 2W you would normally need a constant current driver. It all depends on exactly what LED you have.
D3C3PT1C0N:
Hello!
I would like to make a lamp with three 12V 2W LEDs. When I turn on the lamp, each LED should light up with a delay compared to previous led, this should be Arduino's job.
I would like to know if TIP122 transistors are suitable for switching 12V LEDs using Arduino?
In Arduino's webpage it is written that Arduino Duemilanove can handle input power up to 12 V. So can I connect it straight to 12 V Led Power Supply?
Can I divide the Led Power Supply voltage 12 V into two - one goes to Arduino and the other half goes to leds and transistors?
YES, the TIP122 should work well. I would add a 1K Ohm (+/-) resistor between the Arduino and TIP122 Base.
YES, you can connect 12 Volts directly to the Arduino Power Jack.
YES, you can connect both the Arduino and the LED's to the 12 Volt Power Supply. Since most, if not all, 12 Volt DC 2 Watt LED Lamps already include internal current limiting, you do not need an external current limiting circuit.
Consider adding a Diode into the Red Positive wire to the Arduino to prevent Reverse Polarity.
NOTE:
You have about a 2 Volt drop across the TIP122 when fully ON,
leaving only 10 Volts for your LED's.
Does transistor with these parameters suit for each 2W led? TIP122 Si-N-Darl+D 100V 5A 65W
Kind Of Product: Transistor
Sort: N-DARL+D
Housing: TO220
Voltage: 100 V
Current: 5 A
Resistance: 1 Ohm
Power: 65 W
Will this one also work? TIP127 Si-P-Darl+D 100V 3A
Type: p-darl+d
Voltage: 100V
Current: 3A
Grumpy_Mike:
There is not enough information on that page to tell if it is just a 12V connection to those LEDs without needing any form of current control.
Actually, there is quite adequate information on that page.
The module replaces a bi-pin 12 V AC 12 W halogen bulb in a common reading lamp. On the reverse is a bridge rectifier and four resistors.
And yes, to be absolutely sure, I just pulled the 9-LED one out of my reading lamp to verify - it has three resistors.
mrsummitville:
Consider adding a Diode into the Red Positive wire to the Arduino to prevent Reverse Polarity.
Just use a connector to feed the 12 V into the "barrel jack".
D3C3PT1C0N:
Also, I believe I fried my Arduino Duemilanove because one time I tried without the resistor between collector and Arduino digital pin 9.
Even if you did do damage by doing that, the Duemilanove would still accept a program. Disconnect everything else (including your 12 V power) while you program it. Check your "board" and "port" settings in the IDE.
OTOH, if you fed 12 V into a port pin, that could do considerable damage.
I am afeared that you would be the one making it up.
Clearly you have not used these lamp modules, you have simply not come across them before. That is OK in itself, but you should not transfer your ignorance of them to others.
I have - as I pointed out - purchased and used such modules, so I am in a position to understand exactly how they are constructed. And even if I had not, it is simple enough to research by cross-referencing other Web pages, notably on eBay, which show both sides of the module.
That is how you do research. Your implication that this particular module is somehow different to all the others of the exact same design and sold for the same purpose, simply does not make any sense.
A vastly superior design; and yes, one I had not seen before. It contains a bridge rectifier feeding a reservoir capacitor, then a switchmode constant-current boost converter. This has two consequences; one is that it is rather more efficient than those with resistors, but the second is that it is not dimmable. You cannot use PWM with it.
D3C3PT1C0N:
In Arduinos webpage it is written, that the maximum voltage can even be 20V.
Possibly, as long as nothing else is being powered by it. Even a few ordinary (20 mA) LEDs might be a problem at 20 V. 12 V is really the practical limit.
D3C3PT1C0N:
Sorry, I did not understand you. What is "port pin" ? 12V was fed to DIGITAL PIN 9 and transistors collector.
If you actually fed your 12 V supply directly into digital pin 9 - or any other port pin - you could easily have destroyed the ATmega chip.
As I said, try it out loading the "blink" sketch with all other things disconnected.
I changed the ATMEGA chip and now everything works fine. Thanks for all the help!!!
Still I do not understand why the TIP127 transistor did not work. Did everything as the tutorial suggested, only resistor was different (3 KOhms instead of 2.2 KOhms), also the transistor was a bit different (TIP127 instead of TIP120).
D3C3PT1C0N:
I changed the ATMEGA chip and now everything works fine. Thanks for all the help!!!
Perhaps you should explain what you mean by "everything works fine", particularly in view of your following comment:
D3C3PT1C0N:
Still I do not understand why the TIP127 transistor did not work. Did everything as the tutorial suggested, only resistor was different (3 KOhms instead of 2.2 KOhms), also the transistor was a bit different (TIP127 instead of TIP120).
So do you mean "did not work and does now" or "does not work"? And in what way do they not work?
As I pointed out, the design of these lamps makes them not dimmable, either by PWM or any other means.
Sorry, what I ment was that the Arduino works fine after I changed the chip. Not everything. I understood that the lamps are not dimmable, I was trying to make them blink.
But nothing happens. The transistor I use was TIP127 which is PNP-type transistor . In most tutorials NPN transistor is used (for example TIP120). I found some text from Google which says "PNP transistors work the same way as NPNs do but all voltages and currents are reversed." So when I followed tutorial for NPN, but used PNP transistor, then the connections were wrong (reversed). And that is why my setup did not work. Do You agree?
Well yes, it is not really practical to use a PNP transistor in your system. You would in fact need to use a NPN transistor to drive it - an unnecessary complication.