How I Made the Most Advanced Flashlight Ever

36,174

200

107

Introduction: How I Made the Most Advanced Flashlight Ever

About: I like to do electronics, metalworking, woodworking, fixing things and all sort of cool and stupid things :)

PCB design is my weak spot. I often get a simple idea and decide to realize it as complex and perfect as possible.

So I once looked an old "military" 4.5V flashlight with regular bulb that was collecting dust a. The light output from that bulb was pretty miserable and the batteries were non rechargeable, battery life was non existent. But its case was nice.

So I decided to give it a new high-tech heart.

So I asked myself: "How many functionalities do I want to build in?"
and I said: "Yes. All of them."

:)

I wanted:
- excellent battery life which was archived with 3.7V 6000mAh ( 3x NCR18500A) rechargable Li-Ion battery. The battery life ranges from 20hrs to 6 hrs, depending on the power setting.

- highest possible efficiency LED diode I could find - Ultra efficient Cree XP-G3 (187lm/W)

- highest possible efficiency LED driver IC (more than 90%) - consumer LED drivers are only around 60% efficient

- I wanted to charge it through USB and with external adaptor up to 40V, so I could charge it anywhere with anything

- I wanted it to serve as powerbank as well, so I could charge my phone with it

- I wanted a state of charge indicator, so I could see how much juice is still inside

- and I wanted to fit everything inside that small case

So I needed to design a custom PCB that would fit inside its case and I needed to fit everything described above on that board.

Above is a video showing the whole design process. Feel free to watch, share, like and subscribe to my youtube channel :)

I will further describe the design steps in this instructable.

Hopefully this instructable will give some people perspective on what can be done and how much work it takes to do it and maybe even inspire some kids to become electrical engineers :)

Step 1: The Old Flashlight

This was a cheap-ish light, running off an 4.5V battery and was as bright as a regular candle.

It had cool, manually operated red and green filters which were very cool.

Step 2: Gutting the Flashlight

I gutted all the parts out and measured the internal dimensions. I needed to design the board that would fit in perfectly.

I decided to use 3 lithium batteries in parallel. The case was too small to use the classic 18650 cells. So I decided to use a little bit shorter 18500 cells - Panasonic NCR18500A with around 2000mAh each. So I had pretty good capacity of 6Ah total

This meant a space for the PCB was rather small. But they say: "one could manage if he tried" :)

Step 3: The Schematic

So I made this incredibly complex schematic. Don't ask me on hours I spent for this :)

I was searching and selecting the appropriate components for quite some days, before I settled to conclusion. This means browsing the manufacturer( Texas Instruments, Microchip, Analog Devices...) sites for the ICs by the category and selecting one that fits my needs. And the IC needs to be available to buy in smell quantities on sites like Farnell, Mouser and Digikey.

Wiring all the ICs is not as difficult as it seems, because the manufacturers always include one basic wiring diagram in the IC datasheet. I will not go into details here on the schematic, if any question arises, feel free to ask in the comments.

The schematic includes the following sub-circuits:

- Battery over-charge/over-discharge and over-current protection that keeps the battery within safe operating limits.

- USB slow charge controller - used for charging the flashlight slowly via micro USB port. This is added convenience, but the flashlight could charge for up to 12 hours via this option I added a switch to select the charging current between 100mA (USB 1.0 current limit) , 500mA(standard USB current) and 800mA (wall charger)

- Fast charging controller - this IC controls the charging via the DC jack connector mounted on the battery case. It can handle input voltage from 5V to 40V, has a reverse polarity protection and can charge the battery in few hours max. I added a switch to select two different charging currents depending on the limitation of the power source. The current is selectable between 1A and 3A. This way you can not overload a lower powered DC wall adapter. I wanted it universal :)

- LED driver - I chose a high efficiency (90%) LED driver, capable of driving the LED with up to 1A of current (around 3W). This is pretty low power, but I chose highest efficiency LED I could find - Cree XP-G3 (187lm/W) which makes up for low driving power. I wanted highest possible efficiency and battery life. The driver supports 4 settable power settings. I chose Off, 1W,2W and 3W.

- The rotating switch to binary decoder - this is because the LED driver power outputs were binary coded and I needed to convert the output from a switch to 2 bit binary code with dual OR gate IC.

- Battery fuel gauge indicator I designed discretely with 4 comparators, precision voltage reference and precision resistor dividers. It indicated the remaining capacity based on battery voltage. I found a discharge voltage curve for a similar battery cell and calculated the resistor dividers so they light up the LEDs accordingly.

- USB powerbank function and fast charge controller. The first IC generates a stable 5V IC from the 2.5V - 4.2V battery voltage. The second IC is a nice addition - it is a USB charge controller. When you connect the phone to charging port, this IC communicates the phone and tells it what this is a smart charging port and tells the phone that it can take up to 1.5A of charging current. Without this IC many phones would charge only with the USB default current of 500mA. When fast charging is established it lights up an LED so you can see that the phone is fast charging. A little switch on the PCB is used to enable powerbank functionality.

If you believe or not, on this schematic there are 125 components :)

I order to fit them on a very small board I had to use miniature 0402 sized passive components - one resistor size is 1mm x 0.5mm or 0.04 by 0.02 inches. Hence their size 0402.

Step 4: The PCB

Then, when the schematic is complete, it is time to shape the PCB area to the desired dimensions and place the components on the PCB.

This is quite lengthy task, but you will enjoy doing it. It is a nice and relaxing job.

A little knowledge about particular component placements comes in handy. It is mostly obtained with books and tutorials and some come in practice. The more PCBs you will make the better you will become at doing it.

I use Altium Designer which is a professional program and I get a license from my job. But for a hobbyist, an Eagle, Kicad, designspark PCB and many other are a better solution since it is much easier to get started.

I work with components also drawn in 3D, which helps a lot for visualizing and for designing the enclosures, because you know where things are and how high they are. But drawing the component footprints with 3D bodies takes 3 times as much work. But it is worth it in the long run.

Here is the PCB design data including gerbers, larger schematic files, assembly and bill of materials:
https://github.com/JT-Makes-It/The-Most-Advanced-F...

I use JLCPCB for making my boards.
The cost of this board is only a few $ for 5pcs (plus shipping) which is a bargain! Sign up to get $18 new user coupons: https://jlcpcb.com/IAT

You can use coupon code "JLCPCBcom" at checkout for a small discount.

Step 5: Manufacturing the PCB

The days of etching the PCB at home are numbered. In high school 10 years ago I used to etch my PCBs at home. It was way cheaper that way. But then there were no Chinese companies offering PCBs for almost free. :)

Now you can get 2 layer PCBs made for 2usd + shipping at sites like JLCPCB.com. It is way more convenient this way and you get professional grade boards.

You just need to export the gerber files (which contain information about copper layers on the PCB) and upload them to their site and wait a few weeks for your favorite postman to deliver your masterpiece.

Step 6: Soldering

Soldering components this small is no easy task. But with a good soldering iron and good vision it can be done.

I use Ersa Icon soldering station which does the job very well.

For this project I chose ridiculously small components because I was very low on space. Otherwise I would choose 0603 or 0805 components which are much easier to solder.

Step 7: The Heatsink for LED

I needed to fit some aluminum mass into the enclosure in order to distribute the heat from the LED.

Since I had the 3D model of my board, I could easily model the piece in 3D and manufacture it with my hobby router.

I could cut out all the holes and cutouts to fit it perfectly.

Step 8: Starting the Assembly

Then the assembly started and everything suddenly fit perfectly.

Under the PCB I taped the Kapton tape so the board was electrically isolated from the aluminum so no short circuits could occur.

Step 9: A Few Hours of Cable Crimping Later...

The beast was almost complete!

I crimped the cables,, mounted the switch and power connector, connected all the things, mounted the lens for the LED and mounted the batteries inside the battery holders, glued the thermistors for measuring the battery temperature. The charging ICs keep the battery inside the safe limits. If the temperature is too low or too hot, the charging current is reduced in order to not damage the battery.

Step 10: And Then...

Finished!


The flashlight was complete! See the video on the top of the instructable to see it in action and how bright it shines!

The only thing needing upgrading is that I need to somehow seal the hole around the USB connectors for dust.

But I have not yet figured how to do it properly. If you have any idea, tell it in the comments.

So.. Now you think I'm a professional and you are not able to create such thing. But you are wrong. When I started with electronics in middle school, I also did not have any idea on what I was doing. I was looking online for schematics and I tried to solder them when I didn't even know what a transistor was and how it worked. Of course most of them did not work. Through trial and error I was getting better and better. I read some books, went to study electrical engineering and started to make many PCBs. With each one I got better. And so can you!


Thank you for reading my instructable! Please also check my other instructables!

You can follow me on Facebook and Instagram
https://www.facebook.com/JTMakesIt

https://www.instagram.com/jt_makes_it

for spoilers on what I am currently working on, behind the scenes and other extras!

PCB Design Challenge

Runner Up in the
PCB Design Challenge

Be the First to Share

    Recommendations

    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Make it Fly Challenge

      Make it Fly Challenge
    • Fandom Contest

      Fandom Contest

    107 Comments

    0
    JFie3
    JFie3

    1 year ago

    This is awesome! My kid is curious (fried himself in the outlet at 3, taught himself to read at 4, and now at 6, desperately wants to be an inventor, and I look for awesome diy tutorials like this to spark his motivation to keep trying when he fails at little build projects, as so much of exploration is failure, esp at his age. I love that you included how much of your first experiments were failures (learning opportunities)! Would love to show him this vid to inspire more, bc it shows so clearly the many aspects of a build project requiring different skills and abilities. (Any chance you could blur the naked lady poses as I really don’t need that conversation yet at this point in his life?) Man I would be so grateful. This is the kind of exceptional thing that really drives him to try more and not give up as frustration sets in. Really nice production and inspiring determination! Thanks for posting!

    0
    Makedougall
    Makedougall

    Reply 2 months ago

    :-) For those of you who need to know exactly when the "questionable part" of the video occurs (you know, so you can be sure to skip over it ;-), it starts at exactly 3:30 (i.e. 3.5 minutes) and ends at 3:49 into the video. I checked it over, three or four times, just to be sure I got those timestamps right. ;-)

    So be sure to skip over that part. ;-)

    BTW, awesome work-pad! Where can I get one? ;-)

    0
    JT_Makes_It
    JT_Makes_It

    Reply 1 year ago

    Smart kid you have there! I didn't even realize they were in it! Sorry but I can not blur already finished video. Maybe with a separate upload, but youtube is very strict for re-uploads... I should figure something out. If you ask very nicely I will blur it manually and send you new link just for you. It will take an hour but it can be done.

    0
    tytower
    tytower

    Reply 7 months ago

    Naked women? Naked women? Where ? Crikey he must have gone through it with a microscope .

    0
    JFie3
    JFie3

    Reply 1 year ago

    You’re awesome! Whatever you have time for is what we will thoroughly appreciate, so if it’s a lot of trouble, please don’t worry about it. I’m grateful you considered it! I’m sorry, I’m not particularly tech savvy (more mechanical in nature unfortunately) so I didn’t realize how much work it would be. I’d probably just see if I can skip over that bit so Mr. Observant here doesn’t catch on. Again, thanks for sharing your talents and advice! Much appreciated 😊

    0
    JT_Makes_It
    JT_Makes_It

    Reply 1 year ago

    Check your private messages. I got something for you :)

    0
    JFie3
    JFie3

    Reply 1 year ago

    What a hit!!! Eli said... “He did that All By Himself?!” He was verrry inspired!! He said “I’m very glad that he spent his time making the video for me!” Big fat thank yous all around!!! We are so grateful!! P.s. he blushed when I told him that you said you had put bits together when you were a kid even when you didn’t know what they were/what they did sometimes. (He does that too 😅) Even little brother got in on the action (almost 4) “Can I go play with the invention parts?” (His way of saying all the bits and goo-gas that we save in a bucket when something loses some or all of its function.) Thank you from the bottom of all our hearts👏🏻 Very kind of you, indeed to invest in others in this way🤜🏻🤛🏻 (Fist bump)

    0
    Makedougall
    Makedougall

    2 months ago

    Wow! Awesome project, JT.

    It seems to have almost everything it needs to keep the batteries charged up.

    Maybe you could add a microcontroller chip with a USB serial port, and get the flashlight to send Morse Code messages, like naval ships at sea used to (and maybe still?) do! ;-)

    BTW, I like how your "JT" logo almost looks like the Greek letter, PI. In fact, when I saw pictures of your tea mugs, I thought that's what it was, at first (on the mug with your personal logo).

    __ __ . __..__


    Edit: Arrgghh! The website eliminated my extra spaces in the above "punctuation". It's supposed to be Morse code for "TNX" which is an abbreviation of "Thanks". So the above should have had a longer space between the first two "dashes" and a longer space between the first "dot" and the next "dash".
    (If sounded out, it would be: "dah dahdit dahdididah" for T N X. But, of course, this is for a flashlight, so it would not make any such sounds. ;-)

    0
    tytower
    tytower

    7 months ago

    I'm interested in the battery and its charging. Most of these circuits use a set chip with a cutoff at about 4.2 volts . So I'm interested in cutting it off at 4 volts as its now known taking them up that extra bit gradually coats the plates in lithium metal and other compounds from the electrolyte gradually reducing the performance. At this point it seems to be irreversible. Is it possible in your design to do this ? Or could you give me a clue how I might alter mine?

    Also my choice would be LFP (LiFePo4) cells with a lower voltage but much longer lifetime prospect. If you would like to know more about that go to here and join
    https://www.facebook.com/groups/271980786862023

    0
    scd
    scd

    Question 1 year ago

    Cool project. Are the Altium (schematic and layout) files available on GitHub?

    0
    JT_Makes_It
    JT_Makes_It

    Answer 1 year ago

    Hi,
    Currently I do not have a GitHub repository yet. I will need to make one soon. Until then, you can copy from the schematic image.

    0
    bucanian00
    bucanian00

    1 year ago on Step 10

    Hi, good work. Congratulations!!! Could you make the electronic CAD files available to us? Thank you.

    0
    JT_Makes_It
    JT_Makes_It

    Reply 1 year ago

    I will make a GitHub repository soon. Stay tuned.

    0
    BarnOwl2013
    BarnOwl2013

    1 year ago

    It's a good thing you added that heatsink. I've had flashlights that would turn into there own heatsink and become a hand warmer.

    Also, can you send me a copy of the schematics, design files, and list of parts? I downloaded the PDF, but I can't make out any of the components on the schematic.

    Thanks

    0
    JT_Makes_It
    JT_Makes_It

    Reply 1 year ago

    I will add the stuff on GitHub soon. I do not have the account made yet. Stay tuned.

    0
    Benchickin
    Benchickin

    Question 1 year ago on Step 5

    Having trouble reading the schematic "up close". Are there any other images available?
    Thanks,
    Ben