This project is for a simple LED touch light with dimming capability. Here I will concentrate on the voltage regulation circuitry, while the actual construction of the torch light body and wiring of LED is left to the imagination of the readers.
If you have read any tutorials on wiring LEDs, you should already know that you need to control the voltage supplied to an LED. Too little and the LED won't light, too much and the LED gets damaged. Most tutorials on LED also teaches you how to control the voltage by using resistors. Besides using resistors, you can also use a linear voltage regulator or a switching voltage regulator. There are other ways as well, but I will not cover them here.
Resistors
Linear Voltage Regulator
Switching Voltage Regulator
This project uses a 34063 switching voltage regulation IC for voltage control. Dimming is achieved using a 555 timer to pulse the output power at ~22% duty cycle. The pulses occurs at 120Hz, fast enough to create a dimming effect with no perceivable flicker.
Nearly all my components are bought through Farnell-Newark InOne. Within Singapore delivery is fast, and free for purchases above SGD$30.
These are the components for the voltage regulator part:
IC1: MC34063 Voltage Regulator IC
Switching voltage regulator from ON Semiconductor. I got it at SGD$4.89 (~US$3) each.
In my implementation, I skipped the current limiting sensing resistor. If you need more details on how to properly use the MC34063, you can look at the application note here. There is also an online design tool that you can find here, which helps you calculate the values for each component.
There are other alternatives available, but I like this one as it reasonably priced and has an integrated switch. This saves me the trouble of including a separate power transistor.
R1: 150R Resistors
This resistor is used to control the saturation of the output switch transistor. Current isn't high so use any power rating you like.
R2,R3: 10k, 1k Resistors
These two resistors sets the output voltage. The current running through them is very small, so practically any power rating will do. You may also want to use an adjustable resistor for R3, making it easier to adjust to output voltage. Just remember to put the output on some load (does not need to be high) when tuning the voltage, as the output voltage may be incorrect if there is zero load on the regulator.
The output voltage is equal to:
1.25V * (1 + R2 / R3)
Which in this case gives 13.75V, about right for 4 white LED in series. Do adjust according to your requirement.
D1: 1N5817 Schottky Power Diode
A schottky diode is used here as it has a lower forward voltage drop, resulting in less power loss. The 1N5817 is a 1A diode, which should be more than enough for most LED lights.
L1: 150uH Inductor
This inductor stores energy in the form of magnetic field when the regulator IC passes a current through it. When the regulator cuts off the current, the magnetic field collapses and builts up a voltage. When the voltage is high enough, a current passes through the diode D1 and charges up the capacitor C3. In this way, the voltage regulator IC can achieve a higher output voltage than the input voltage.
The main output current passes through this inductor, so it has to be rated for a sufficiently high current. I use a Panasonic ELC09D151F which is rated for 0.74A.
C1: 300pF Capacitor
The switching voltage regulator operates by pulse width modulation, and this capacitor controls the operating frequency. The 300pF capacitor is good for around 50kHz. We don't want it to be too high as it increases switching losses, and we don't want it too low either as a low frequency requires a bigger inductor.
C2,C3: 47uF Electrolytic Capacitor
Due to the way a switching voltage regulator works, there tends to be a lot of ripples on the output, and the input current draw is pulsating as well. To smoothen these out, we have the two 47uF capacitor, one on the input and one on the output. The output capacitor should be able to handle at least 25V.
That's it for the regulator portion, the rest of the components are for the dimmer circuitry. It uses a 555 timer on bi-stable mode, running at ~22% duty cycle and 120Hz.
IC2: 555 Timer
Probably one of the most commonly use IC for hobbyist. Since it's so common, I won't talk about it here. As always, Google is your friend.
R4,R5: 22k,100k Resistors
Together with the diode D2, these two resistors set the duty cycle. Current is low, so any power rating will do.
D2: 1N5817 Schottky Power Diode
Pretty much any diode will do here. The 1N5817 used for D1 will do just fine, but there is no need to use a Schottky or power diode. We use this diode to bypass R5 when charging the capacitor C4. Without this diode, you can't get the 555 to output <50% duty cycle.
C4: 100nF Capacitor
This controls the operating frequency for the 555 timer. In this case, it's around 120Hz.
Misc parts:
SPDT Switch
Single Pole Double Throw switch. Allows you to switch between the 22% duty cycle output from the 555 timer, and the direct 100% output from the voltage regulator.
LED
I'm using ultra bright 5mm LED from BestHongKong. Four LED in series per row, and 5 rows for a total of 20 LED. With just under 2W at full power, it's by no means the brightest LED light around, but it's pretty good. It's up to you what you want to use, but do take note of the voltage requirement and adjust accordingly.
Battery
I'm using a 9v battery with my LED light. Not a very good idea. 9V batteries have very poor power density, and at full power, the battery is heavily overloaded. I choose the 9V battery because I happen to find a nice casing for it. If you can, try to use something else. eg. AA batteries are a much better choice, they have better power density and lithium / oxyride AA are easily available.