LED flashlights are very common today and the technology behind it has advanced so much. China mass produces LED devices and so most them are really cheap. But if you're like MacGyver, who likes to build useful things on his own from ordinary materials rather than buying, this project is for you. I'll show you how I used a reflector from a broken Chinese flashlight to make a rugged and modular flashlight using PVC pipe and two reducer couplings. The flashlight is easy to build and low cost (I only had to buy the reducer coupling, the TP4056 module and the DC jack. Everything else was salvaged).
Update : I've modified the flashlight a bit since I posted this. The charging dock was not looking good. So I replaced it with a panel mountable DC jack which now looks perfect.
(All images are in high resolutions)
Step 1: Gather Materials and Tools
These are the materials you're going to need. Most of them could be salvaged or bought from any home depot shops.
1 x Flashlight Reflector
1 x PVC pipe of length 20 cm, outer diameter 3.2 cm and thickness 2.6 mm
1 x Reducer coupling of 40 mm to 32 mm
1 x Reducer coupling of 32 mm to 25 mm
1 x SPDT/DPDT Rocker Switch
1 x 1W White LED (Vf = 3.4 - 3.5V, If = 250 - 350 mA)
1 x Panel Mountable Female DC Jack
1 x DC Barrel Plug
1 x TP4056 Li-Ion charger module (if using 18650 cells)
1 or 2 x 18650 Li-Ion cells OR 3 x NiCd or NiMH cells
1 x 2.2 Ohms, >0.5W resistor
1 x 1.5 Ohms, 0.5W resistor
1 x 1.2 Ohms, 1W resistor
1 x 3 mm Red LED
1 x 470 Ohms, 1/4W resistor
1 x 1N4007 diode
1 x Small spray paint can
Misc : Superglue, insulation tape, heat shrink tubes, wires etc
Hacksaw blade, sand paper, retractable knife, CD marker, screw drivers, soldering iron etc
Step 2: 2D Drawing
Refer to the above 2D drawing and use the measurements to cut the PVC pipe. I already had a piece of pipe 19.5 cm long. That length is enough to accommodate two 18650 cells or three NiMH cells, and gives a perfect grip. The reducer couplings do not need any modifications.
Did this drawing in "SketchUp LayOut", it's an easy to use software that comes integrated into the software bundle. Use the attached PDF of the drawing if you want a print.
Step 3: Build the Housing
Once you have the pipe of adequate length, attach the reducer couplings as shown in the drawing. If the pipe is too tight to be inserted into the couplings, use sandpaper to scrape away some material and reduce the outer diameter a bit to ensure a moderately tight fit.
Depending on the size of the rocker switch you selected, make a rectangular cut in the pipe for a tight fit of the switch inside it. Never widen the the cut. We need the switch to be fixed without any glue. Rocker switches are meant to be snapped in and so they only will if the hole is not wider than the switch itself. You can either use a drilling machine or dremel to make the hole or as I did, use a heated blade to cut through the outline and then use a knife and sandpaper to even out the sides.
The larger reducer coupling must be selected to contain the reflector you have. Use some glue to fix it inside if it's loose. I used four small screws to hold the reflector straight inside. Use your ingenuity to fix it inside.
The smaller reducer is where we have to place the DC jack for charging. I used small rubber bush I found from my junk box which I think been there for a long time (this is why I don't throw anything away, to which my mom disagrees. You wouldn't know when something just like that "no name bush" going to be useful), and now I found a use for it. I had to widen the hole a bit to insert the jack. No glue or screw was needed. You might need to find something similar, may be a washer, or plastic cap etc.
Step 4: Wiring for 18650 Cells
There are two ways to wire things up depending on the batteries you're using. If you're going to use 18650 (18 mm x 65 mm) Li-Ion cells, then use the above circuit. 18650 cells can be salvaged from old laptop batteries (like I did) or can be bought separately. As our aim is to build a cheap but good flashlight, I recommend to search and find an old laptop battery, may be from your friends or relatives. Why Li-Ion is recommended because it has more energy density compared to other cells and thus the light will have more operating time. If you can't find Li-Ion cells, no problem, skip to the next step where you can use cheap NiCd (Nickel Cadmium are not recommended as they have many disadvantages including Cadmium being a poison and pollutant) or NiMH (Nickel Metal Hydride are highly recommended as they're environmental friendly) to power the LED. The two circuits are different.
I have paralleled two 18650 cells to increase the operating time of the light. But two cells are not necessary, one will work just fine. Use a sheet of paper and insulation tape to pack the cells together.
Li-Ion batteries requires a special approach for charging, reason why we need a dedicated charge controller board. I have used the TP4056 based 1A charger module which has 5V as input voltage. It's available at all online electronics shops for a dollar or below. The circuit is simple and straight forward. Power from the DC jack is connected to the input of TP4056 and its output to the LED and battery. The Cathode (Negative) of the LED is connected to the insertion detection pin which is disconnected from the Ground (GND) when we plug in the DC plug. This means you can not turn the light on when it's charging. It's just a safety measure.
An LED is a current controlled device, means its brightness is directly proportional to the current it's drawing rather than the voltage between its pins. This is the reason why special circuits called LED drivers are used to regulate the current though the LED whenever we want to use them. Why this is important because LEDs when operated at nominal conditions (voltage, current etc) have the maximum life expectancy. Increasing current will only reduce its life. We're using 1W white LED here. Such LEDs have a forward operating voltage (written as Vf) and a forward current (written as If) limit specified by the manufacturer in the datasheet. The LEDs I bought didn't come with a datasheet and so I'll assume the values to be Vf = 3.4V to 3.5V, If = 250 mA to 350 mA. But if you know the manufacturer or part number, then refer to the datasheet for exact values.
The simplest of LED drivers is the current limiting resistor. The resistor value needs to be selected so as to limit the current though the LED and drop the excess voltage, thus maintaining the required forward voltage for the LED. More complex LED drivers regulate voltage and current even if the input parameters are changed and some other drives the LEDs with current pulses for increased brightness. I think it'll be cumbersome to explain about all of them here, so we'll focus on the resistor method.
The resistor R2 is calculated as (Vin - Vf) / If. Applying the previously assumed values along with Li-Ion battery output voltage between 3.6 - 3.8V as Vin, we'll get values between 1.1 Ohms and 2.4 Ohms - I used 2.2 Ohms. The power dissipated by these resistors will be less than 1W, so resistor wattage can be between 1/2W to 1W. Quicker calculations can be made using the free ElectroDroid app available in Play Store. It's a really handy and useful app and I highly suggest you to install it.
The TP4056 module has on-board LED indicators, but I'v also added a 3 mm LED for charging indication. Use them as you wish. In my case, the charging LED is visible though the bottom rubber bush. 5V is the charging voltage for this configuration.
Step 5: Wiring for NiCd/NiMH Cells
For NiCd/NiMH cells, we're not using any dedicated charge controllers for the sake of simplicity, but that's not how you do it actually. NiCd/NiMH cells have a nominal voltage of 1.2V. This is less than the required forward voltage for the white LED. So we series connect three of them to output a voltage between 3.6 - 3.8V. One thing to note is, do not mix different types of cells, for example NiCd with NiMH, or mix old and new cells. Always use same type of cells with same period of usage. Using brand new cells is recommended.
The value of the current limiting resistor is chosen to be 1.5 Ohms in this case. The diode D1 prevents reverse charging, drops the input voltage by 0.6V and also prevents the charging indicator being powered by the battery itself when not charging. The LED's Cathode is connected to the insertion detection pin of the DC jack just like in the other schematic. 5V is also the charging voltage for this configuration.
Charging NiCd and NiMH is a tricky process. What we have above is a low current charger, where current is limited by the R3. Special charging and sensing circuits are required for maximum life of Nickel batteries. There are many charge controller ICs available from major manufacturers. You can use them for extended life. Improper charging will reduce capacity, or damage the cell permanently. Slow, low current charging is usually safe if you stop charging after a certain duration. In our case, 2-3 hour charging will be enough. After that you should manually unplug the charger. Do not let it charge for unusually long duration.
Step 6: Soldering
Use appropriate lengths for wires and solder every joints neatly. Insulate connections using heat shrink tubes. Extra care must be taken not to short any battery terminals becasue it's so dangerous with both Li-Ion and NiCd/NiMH (just think of Note 7). Do not skip the insulating procedure after soldering each joints. Additionally, you can use berg connectors to make detachable connections between each part, for example LED and battery, battery and charging board etc. This will make disassembling and later modifications easy. Be modular whenever you can. I've used simple 2-pin connector for the main LED.
Step 7: Modifying Cellphone Charger
Both the 18650 and NiCd/NiMH configurations can be charged using a common 5V, 1A cellphone charger. If you're using the TP4056 module, then you can make use of the micro USB port on it. If not, connect the positive wire from the charger to inner metal contact of the DC barrel plug and negative wire to the outer contact. Why I used DC barrel jack is because most of my home made devices use it. Also, it's easy to mount a DC jack than a micro USB.
For Li-Ion, the TP4056 controls the charging duration. For NiCd/NiMH, the charging time is determined by the capacity of the cells (2-3 hours in this case)
Step 8: Painting
I used compressed paint can of silver color to paint it. Apply two coatings for better finish. Later added two black rings with insulation tape for a better aesthetic feeling.
Step 9: Result
The above is the final result. A simple, rugged and DIY LED flashlight with long battery life. It has good battery life (I'm using Li-Ion), appropriate form factor to be held in one hand, easy to build, easy to disassemble and repair. It's not the brightest LED light you'll see out there. But such flaws are where the call for improvement arise.
Step 10: Where Did the Idea Come From ?
I don't know the exact date, but I remember a time in the past when I was intrigued by the resemblance of a reducer coupling connected to a pipe, to a flashlight. That's the time I started thinking of making one. I have this routine of occasionally visiting scrap shops and do "shopping" (for me, scrap shops are like heaven. I collect junk electronic and mechanical devices and a lot of other things that I wouldn't have seen before), and that's where I got the reflector from. Later I made the flashlight using the reflector with other salvaged parts.
Step 11: Improvements
Nothing is perfect and so there's always room for improving. Some of my improvement suggestions are,
1. There's no glass panel at front as I couldn't find one that fit inside my coupling. A light isn't complete without a glass in front.
2. Using a dedicated current regulated LED driver IC such as AMC7135 suggested by warhawk8080. Most of them are SMDs. Some of them are available as modules from online shops. Another way is to use a MOSFET based constant current driver as shown above. The component and value selection must be based on the power rating of the LED.
3. Battery charge indicator.
4. Pulsed over-current LED driving for more brightness (LEDs have a safe pulse current limit specified in the datasheet). Special driver ICs are available for this.
5. Using more powerful LEDs (2W or more).
6. Brightness control with PWM.
7. Dedicated NiCd/NiMH charging circuit with overcharge protection, using charge controller ICs.
A quick reference for LED driving : http://www.pcbheaven.com/userpages/LED_driving_and_controlling_methods/
Thanks for reading. Please vote if you liked it :)
Runner Up in the