# Diy: LED lamp fed from a 12v DC transformer



## longleg (Mar 30, 2013)

Having recently bought a new house, I want to design my own lights to hang over the work bench. 

To maintain flexibility, I want to use a ceiling mounted 12v dc spot rail, and attach the lamp(s) to the rail. 

I want to keep it simple and just connect the LEDs in series with a total Vf below 12v, and include a current limiting resistor. Will this work?


----------



## Illum (Mar 30, 2013)

Works just fine for me, as long as it is 12VDC. Most indoor "12V" halogen lamps on ceiling mounted rails are 12VAC, not 12VDC. If you are planning on running LEDs on that I'd say forget it. Its way too much hassle and the resistance the contacts provide is hazardous enough to pose a fire risk. 

Heres what my setup consists of:
100-240VAC 12V 1.5A switching power supply, CREE XP-G x 3, 2ohm 1% 5W resistor, 75C thermal protector

Switching power supplies run cooler and the open circuit voltage remains constant to specs. Linear regulators are inexpensive and widely available, but electrical noise permeation and high heat output makes them very poor choices for fixed lighting. Only way to compensate for them is to use them at a low duty cycle. Typically this means you'll either have to invest in a large power supply and run it at <50% capacity, or run the LED in discontinuous intervals. 

Despite XM-Ls, XP-G's are still the best candidate for fixed lighting because they exhibit high efficacy under 1500mA, should you wish to operate beyond 1500mA, then go with XM-Ls. At 1000mA, XP-Gs typically have a forward voltage [due to batch to batch differences] around 3.3V nominal. Running in 3S1P configuration [or 3 in series, single string] they drop around 10V. A 2ohm resistor takes care of the extra 2V and thermal output at 1000mA is easy to estimate [Pd = RI^2, Pd = 2(1)^2 = 2W]. Be sure to use a resistor with a tolerance at least 1% and twice the maximum power dissipation your design may involve. [In my case 2W heat output means a 5W resistor at minimum, 10W preferred]. 

Lastly, the LEDs are screwed onto a metal finned heatsink originally designed to cool CPU's. At an indoor temperature of 76F [24C] it runs just lukewarm. I installed the thermal protector in series to the LED and tucked it in the heatsink fins at the center of the assembly. My protector is part number Klixon - 7A M202, basically a bimetal disc calibrated to open at 75 C degrees. In the event that the ambient temperature is too high, the protector will open circuit at 75C, protecting the insulation on my wires from burning off and to prevent whatever I mount it to to become dangerously hot. The LEDs won't fail until the junction reaches 150C, but I don't want a heatsink thats over 100C above my head, hardware bolted to something that may not be able to stand that temperature.


----------



## longleg (Mar 30, 2013)

Thanks for the reply!

I'll use DC for sure. Not even sure if 12v AC exists here in Norway..

I want/need an output of 1500-2000 lumens, so I'm probably going with XM-Ls. I looked at MK-R, but the Vf of 11,7 would place the "last" 0,3v over the resistor, and it would be too sensitive towards a power supply being a little out of spec I think. 

The bimetal disc was a clever feature - I think I should include a safety feature of some kind..

So, to drive 3 XM-Ls at 2A, with a Vf of 10v (-ish), I'll simply use a 1 Ohm resistor, capable of at least 10W. 

Bonus question:
Does anyone know the minimum dimming level (in volts) of a dimmable 230v AC -> 12v DC power supply? Or does that vary from type to type?


----------



## RoGuE_StreaK (Mar 30, 2013)

longleg said:


> I want/need an output of 1500-2000 lumens, so I'm probably going with XM-Ls.


As you've got the space, you are probably better off driving more LEDs at lower currents; they'll run a lot cooler, and they'll be more efficient at the lower currents. Of course there's the cost breakpoint, but there's some good cheap options out there; near you, LedRise have a good special on the interesting-looking Nichia 757, you'll need about 10 of them to get your desired lumens, but it'll only cost you 4 Euros and they'll be running much cooler, using 200mA at about 6Volt. And you could mix'n'match some warm and cool if you want.

Might have to come up with a project to experiment with these suckers for myself.


----------



## degarb (Mar 31, 2013)

Illum said:


> Works just fine for me, as long as it is 12VDC. Most indoor "12V" halogen lamps on ceiling mounted rails are 12VAC, not 12VDC. If you are planning on running LEDs on that I'd say forget it. Its way too much hassle and the resistance the contacts provide is hazardous enough to pose a fire risk.
> 
> Heres what my setup consists of:
> 100-240VAC 12V 1.5A switching power supply, CREE XP-G x 3, 2ohm 1% 5W resistor, 75C thermal protector
> ...



Just a morning flight of fancy, but I think it too bad we must use resistors to waiste and burn off extra voltage as heat.it is too bad there isn't a brand of low forward voltage high current flood led that could be used in series of any array to better match forward voltage than a heat producing resistors. Aka,I suppose, a light producing resistor.


----------



## Illum (Mar 31, 2013)

Resistors are by far the easiest, but they exhibit the least regulation and the highest variance. They do however make elegant logistical solutions for people in regions where finding a dedicated driver may be impossible or cost prohibitive. The higher the resistance, the less there is regulation, which probably was the reason why most "dumb" indicator LEDs at _Über-low _currents uses mostly resistors. 



longleg said:


> So, to drive 3 XM-Ls at 2A, with a Vf of 10v (-ish), I'll simply use a 1 Ohm resistor, capable of at least 10W.




With three XM-Ls, assuming neutral white [I absolutely cannot work under a cool white color source, after all these years on the forum I have trouble working under even 7000K florescents!] you could achieve an output between 1500-2000lm range. It will depend largely on how well it is kept cooled. 

Ehh, not quite how LEDs work. LED voltages are not constant, it is a function of the input current. This is why the use of resistors to drop voltage is not often recommended. You could probably get away with it [like I did] if your resistor tolerance is high, and your LEDs are well cooled.Below 1000mA the LEDs temperature rise does not rise that sharply, but I have experimented with XM-Ls over 2A using just resistors and temperature instability have lead to failures.


Say the LED consumes 3W of power, and that value is held constant through the entire operation. As the emitter warms up, its foward voltage decreases. Watts = voltage x amps, a decrease in voltage would increase the forward current. This increases the heat gained from the emitter which further causes the drop in foward voltage. On top of this, resistors are not always accurate. In fact they often decrease in resistance as they heat up. 
This combination of effects is what causes LEDs to fail in a manner known as thermal runaway. Oddly enough, in my setup with a 12V supply, XP-Gs and a 2ohm 1% resistor when the LEDs heated up, the forward current actually dropped from 950mA to about 800mA and stayed there. Yet when I tried a similar setup using XM-Ls pushing at 2.5A, the LEDs burned out in a hurry, roughly 2 hours into the test. Same heatsink material, same grease, totally different results.

I would recommend the_ Mean Well LPF-40-20_ driver instead.

http://www.mouser.com/ProductDetail...=sGAEpiMZZMt5PRBMPTWcaT6LgOFmq6IMysINY15sc5k=


```
Mean Well Constant current LED driver
Output: 40W: 2A up to 20V
Input: 90 VAC to 305 VAC, 127 VDC to 431 VDC
Dimensions: 162.5 mm L x 42.5 mm W x 32 mm H
Product: Commercial Encapsulated [IP67] Switching Supply
```

The price tag is a little steep but it eliminates the need for a step-down power supply and a separate LED driver add on. An 20V overhead would mean that this driver can accommodate 6 XM-Ls should you expand your worklight.


----------



## uk_caver (Mar 31, 2013)

degarb said:


> Just a morning flight of fancy, but I think it too bad we must use resistors to waste and burn off extra voltage as heat.it is too bad there isn't a brand of low forward voltage high current flood led that could be used in series of any array to better match forward voltage than a heat producing resistors. Aka,I suppose, a light producing resistor.


It may be a little retro, but could a suitable small light bulb (or a bulb/resistor combination) be useful as a current-balancing element in a chain of LEDs, given its nonlinear current/voltage characteristics, or would it not be possible to make a stable arrangement?


----------



## longleg (Mar 31, 2013)

I hadn´t taken thermal runaway into consideration - thanks for the heads-up! 

I guess a PTC resistor could do the trick (by raising the resistance when the temp increases), or maybe a circuit like this:
http://www.instructables.com/id/Cir...tep6/The-new-stuff-Constant-Current-Source-1/
This circuit also burns away excess voltage, but it looks like the current doesn´t increase with increasing temperature, which decreases the chances of thermal runaway.



Illum said:


> Say the LED consumes 3W of power, and that value is held constant through the entire operation. As the emitter warms up, its foward voltage decreases. Watts = voltage x amps, a decrease in voltage would increase the forward current. This increases the heat gained from the emitter which further causes the drop in foward voltage. On top of this, resistors are not always accurate. In fact they often decrease in resistance as they heat up.
> This combination of effects is what causes LEDs to fail in a manner known as thermal runaway. Oddly enough, in my setup with a 12V supply, XP-Gs and a 2ohm 1% resistor when the LEDs heated up, the forward current actually dropped from 950mA to about 800mA and stayed there. Yet when I tried a similar setup using XM-Ls pushing at 2.5A, the LEDs burned out in a hurry, roughly 2 hours into the test. Same heatsink material, same grease, totally different results.
> 
> I would recommend the_ Mean Well LPF-40-20_ driver instead.
> ...



I´ve had a look at quite a few LED drivers, but what I mainly want to achieve, is to be able to attach this lamp(s) to a standard 12V DC ceiling spot light rail, while still be able to attach standard 12V DC spotlight bulbs to the same rail. I could of course find a slim LED driver (fed by 12v DC) and build into the lamp somehow, but that would make the lamp body bigger than if I just use a resistor, or make a circuit like the one in the link above.
I just had a look on dx.com, but didn´t see anything suitable right away...

So - should I test this one 
http://www.instructables.com/id/Cir...tep6/The-new-stuff-Constant-Current-Source-1/
for Kitchen Work Light v1.0, or are there any better ideas out there?


----------



## Illum (Apr 1, 2013)

uk_caver said:


> It may be a little retro, but could a suitable small light bulb (or a bulb/resistor combination) be useful as a current-balancing element in a chain of LEDs, given its nonlinear current/voltage characteristics, or would it not be possible to make a stable arrangement?



It could. Lamps from Christmas lights work well as inrush current limiters and the flashing "spare" bulbs works well as improvised LED flashers for driving LEDs up to the current rating stamped on the bulb. Unfortunately, its not a very stable resistor and is difficult to measure the series resistance while the tungsten filament is hot.


----------



## degarb (Apr 2, 2013)

Illum said:


> It could. Lamps from Christmas lights work well as inrush current limiters and the flashing "spare" bulbs works well as improvised LED flashers for driving LEDs up to the current rating stamped on the bulb. Unfortunately, its not a very stable resistor and is difficult to measure the series resistance while the tungsten filament is hot.




This totaly occurred to me. (though probably only practical for fixed lighting). Christmas lights are easy to come by. The application would determine if it is worth the effort. Red would be preferred. [Though, better is a cheap mass produced low voltage/high current led that matched resistor specs, would never burn out.] Silly idea, but like the tungsten fillament, probably narrow is what would work.


----------



## SemiMan (Apr 2, 2013)

If you want to dim, then you will need a dimming power supply which will almost definitely be constant current. There are several of them out there. There are power supplies that take 0-10V dimming signals and will PWM the output, but anything triac or similar based for dimming tends to be constant current.

As opposed to resistors, why not just get some cheap flashlight linear regulators. Then you do not need to worry about matching, etc. Simple linear boards are under $2.00 each and would work well for your 12V supply.

Semiman


----------



## longleg (Apr 2, 2013)

SemiMan said:


> If you want to dim, then you will need a dimming power supply which will almost definitely be constant current. There are several of them out there. There are power supplies that take 0-10V dimming signals and will PWM the output, but anything triac or similar based for dimming tends to be constant current.



If I go the spot rail route, and feed the light with "normal" 12v DC, then I guess dimming will be out of the question. But with a standalone light, then a triac dimmer + a dedicated LED driver would be a nice combo.



SemiMan said:


> As opposed to resistors, why not just get some cheap flashlight linear regulators. Then you do not need to worry about matching, etc. Simple linear boards are under $2.00 each and would work well for your 12V supply.
> 
> Semiman



E.g. 7135 devices? What I would like to drive is 3S XM-L2 with 2A current. Having had a quick look on dx.com, I didn´t actually find anything that looked like it would fit. But please feel free to point me in the right direction 

But to be honest, a part of the charm with this project is to be able to bring out the soldering iron and make a driver circuit (although a very simple one) from scratch.


----------



## RoGuE_StreaK (Apr 2, 2013)

longleg said:


> E.g. 7135 devices? What I would like to drive is 3S XM-L2 with 2A current. Having had a quick look on dx.com, I didn´t actually find anything that looked like it would fit. But please feel free to point me in the right direction
> But to be honest, a part of the charm with this project is to be able to bring out the soldering iron and make a driver circuit (although a very simple one) from scratch.


A post in a recent thread linked to a cheap source of bare 7135s; 10x for $2.41 including shipping. Solder up five of them and you've got a 1.9Amp constant current sink. (NB: I've got no experience with that site)


----------



## snakebite (Apr 7, 2013)

i do 4x rebel or k2tffc or 1 altilon off of 12vac full wave and filtered with 1 ohm or less resistor.comes in just under 1 amp.
these are halogen desk lamp retrofits.


----------

