DIY Rechargeable LED Flashight

diy led flashlight

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. Click on the image to view an image on a new tab.

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

18650 li-ion cells

18650 Li-Ion cells salvaged from old laptop battery pack

heatshrink switch led dc jack

Heatshrink tube, switch, 1W LED and DC female jack

dc plug

DC Male Plug

TP4056 Li-Ion charger module

TP4056 Li-Ion charger module

pvc reducer coupling

PVC reducer coupling

PVC pipe

PVC pipe


Salvaged reflector

Mechanical Drawing

search light mechanical diagram

LED Flashlight mechanical drawing - View PDF

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.

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.

reducer coupler attached

Reducer coupler attached to the pipe

cutout for switch

Making a cutout

cutout for switch

Cut-out for switch

female jack hole

Hole to insert the DC female jack

reflector attached

Reflector attached

Wiring for 18650 Cells

18650 schematic diagram

Schematic for 18650 cell wiring

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.

18650 cells

Paralleled 18650 cells

Wiring for Ni-Cd Cells

ni-cd wiring schematic

Schematic for Ni-Cd battery wiring

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.


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 because 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.

soldering resistor

led reflector testing

LED being tested

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)

cell phone charger

Ordinary 5V cellphone charger

dc plug soldering

Replace micro USB with male DC plug


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.

flashlight painting

flashlight painting


The result was 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 by 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.

finished flashlight

Finished light

dc jack

DC jack in place

dc jack

flashlight charged

Flashlight being charged. See the active red LED.

flashlight tested

Flashlight being tested


Nothing is perfect and so there's always room for improving. Some of my improvement suggestions are,

  • 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.
  • Using a dedicated current regulated LED driver IC such as AMC7135. 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.
  • Battery charge indicator.
  • 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.
  • Using more powerful LEDs (2W or more).
  • Brightness control with PWM.
  • Dedicated NiCd/NiMH charging circuit with overcharge protection, using charge controller ICs.

constant current led driver schematic

Constant current LED driving circuit

amc7135 led driver circuit

AMC7135 LED driver circuit


  1. A quick reference for LED driving
  2. See this project at Instructables


Date published : 12:56 AM, 2-12-2014, Tuesday
Last updated : 2:50 PM, 13-01-2019, Sunday


Made with for Open Source
Copyright © 2014 - 2021  Vishnu M Aiea
Site last updated : IST 11:38 PM 20-01-2020, Monday
Page rendered in 0.0193 seconds. Version 1.2.7