Long time since I've posted anything to my site, and that is because i work on something big this time which absorbs all my free time.
So, as i was working on this big thing, my spot lamp exploded! That is really a very bad situation because i need LIGHT to see those tiny SMDs and the four 1.20 meters CFL lamps above my workbench are just not enough. It is Saturday night, and finding a replacement CFL U-type lamp for my spot lamp is just impossible. Add to this that i was not really sure if the new lamp would work or not. And add to this that i had ten 1-Watt LEDs somewhere in my lab waiting to be used... The decision to hack and mod this lamp was easy to be taken...
Starting form the supply
First, let's start with the supply. The adapter is just a 1:1 transformer, 220V comes in, 220V comes out. It wont do any good for my project so it goes to the adapter bin... Instead, i will be using a 2x12V transformer. The LEDs are all rated at 350mA @ 3.6V and i plan to connect them in series. I plan to connect 8 of these LEDs in series, that will be 8x3.6 = 28.8 VDC. The 2x12VAC transformer can provide some 34 VDC, which is just enough to light all the LEDs and don't waste too much power as heat on the current driver that i will make.
Where do those 34 volts come form?
If you ask "where do those 34 volts come from", here is the quick answer. When we say that this transformer is rated at 2x12VAC, we mean 2 x 12 Vrms. When this voltage is rectified to a DC voltage and smoothed with a capacitor, it will be higher because we then talk about peak voltage. The formula to convert RMS to Peak voltage is simple:
Vpeak = Vrms/0.707
So, in our case:
Vpeak = Vrms/0.707 = 2x12/0.707 = 24/0.707 => Vrms=33.9 Volts
You may wanna go to an online rms to peak converter to help you with these calculations.
As i said, i plan to use 8 LEDs rated 350mA at 3.6 Volts. Actually, i will drive them at around 320mA, no need to push them to their limits, right? So, i connected them in series and used an aluminum profile to secure them, providing this way extra surface for cooling. This aluminum profile is used to mount electrical equipment into electrical switching boards, such like this star-delta automation. It is perfect for this job!
And now it is time to secure it into the lamp...
The LED Driver
I mentioned before that the 34 volts of the transformer are perfect to power all LEDs without wasting too much power in the form of heat, since i will be using a simple linear constant current driver. Some basic math revel the power that has to be dissipated on the driver. The 8 LEDs require 8x3.6=28.8 (say29) volts at 350mA. I have 34 volts. The difference is 34-29=5 volts. Since i will operate the LEDs at 320mA, i will need to dissipate some 5x320=1.6 Watts of power, which is normal.
Although i've written a long theory on transistor constant current drivers, i will have to cheat for this one, simply because it is Saturday and i do not have a proper power transistor for the job. but i do have a batch of those good-old LM317 regulators! In the LM317 datasheet one can find many typical application circuit, among which is one rather simple constant current driver. Here is the circuit as found in the datasheet:
Can it be any simpler? Frankly speaking, No, this is the simplest constant current driver i've seen so far. All you need is the ye old mighty LM317 and a resistor... That's it.
Now, to calculate this resistor, that is even simpler than the circuit itself! In the datasheet the formula is this:
Iout = 1.25V / R1
So, solving for R1:
R1 = 1.25/Iout => R1 - 1.25/0.32 => R1 = 3.906 Ohms
Simple? Simple indeed! So i need a 3.9 Ohms resistor to regulate the current at 320mA (0.32 Amperes). What a luck! I just happen to have a 3.9 Ohms 5 Watts resistor in my bin! Ok, 5 watts is super overkill, but i just need light for tonight!
There is a saying that goes like this: The Devil is hidden in the detail...
Check out the next page to see why this happened and how i solved it.