Building the ultimate keychain light!


This week I finished a very fun build based on the Nitecore Tube, which is a very cool rechargeable keychain light. Overall, the stock light is very nice. I don’t really like the UI, but to be fair I never like any UI that I didn’t program. Also, in a rechargeable light, I find that a battery monitoring function is a necessity. Seeing as I’m never satisfied with leaving things stock, and looking for a challenge on ridiculously tiny soldering, I ended up creating the smallest MELD ever. Here’s how I added RGB and a custom UI to the Nitecore Tube:

Here’s the stock light. It earns high marks in my opinion—by far the best keychain light available, and the first I’ve ever seen to use a rechargeable lithium ion cell, plus it’s only $8.

Time to tear it apart. Lights don’t usually stay in one piece beyond about an hour after arriving at my house…

Here’s the PCB. I can tell by following traces and looking at pin counts that the microcontroller is the 6-pin part on the corner. Its markings don’t match any I’m familiar with, so I’m not sure what it is. No matter, it’s coming off.

Looking around at the components and traces, it appears that the battery charger IC is entirely independent, and just sends a single signal to the microcontroller to indicate when it’s on external power. It also directly controls the charge indicator LED. To confirm this, I plugged it into a charger after removing the microcontroller.

Theory is confirmed. I won’t be needing that charge indicator anymore, so it and its resistor get removed also.

Now that the board is stripped to what I’ll be keeping, I start looking at where to put my added components. Here’s a mockup of the placement for the new microcontroller (PIC16F1825 in QFN).

And I also have to plan out where to put the XM-L color. I tried a few options:

And ended up settling on this side-facing position under the main LED. I bought the light with a translucent case for this reason.


I picked out the XM-L I would actually use (a 2nd gen part) and dedomed it.

The new microcontroller is mounted to the board with hot glue.

To fit the XM-L color, I had to file out an area on the main LED to reduce the thickness. This flat section also provides a convenient mounting area for the XM-L.

Before mounting the XM-L, I connect wires to all 6 of the R, G, and B pads.

And then attach it to the flat area on the 5mm LED.


Now it’s time to start wiring. All connections are done with 34AWG enameled wire. The new microcontroller gets connections to power, the FET that runs the white LED, direct connections to RGB, the switch, and two new connections to the charge controller that tell it when external power is applied and what the charge status is.

After most of the wiring I do a test fit in the housing.

The final wiring job is to connect the negative sides of the 3 color LEDs via resistors. The green and blue get 100 ohms and the red gets 50. To make these connections, I tacked some wire to a ground point on the charger IC and strung the resistors on it.

Then I put kapton tape over the USB jack and laid them down on top of it. The three wires from the LED cathodes then get connected up.

Finally I add the temporary wires to connect to the programmer.

After connecting to the programmer and loading MELD firmware, it powers up for the first time!

And I can confirm that all the color LEDs work.

After a bit of new programming to monitor the two new connections for charging information, I connect it up to a lithium ion cell and test the charge monitoring.

That’s confirmed working, so I strip off all the temporary programming wires and reconnect the stock battey.

Here’s top and bottom views after reassembly. I find that magnetic tails are very useful, so before closing it up I add a small neodymium magnet behind the battery.


And a view of the XM-L color through the housing.

The colors light up the whole housing very nicely.

During charging, the firmware stops all normal functions and displays a pulsing animation on the red LED.

And when charging is finished, it turns on the green LED at a low level.

This project was so much fun doing all the extremely tiny wiring, and now I have a backup light with every function I could want. The translucent case lights up when running the color LEDs and makes this light perfect for applications such as use as a safety light while running or biking. I won’t bother with a demo video since this light runs normal MELD firmware, with the exception of the charge monitoring.

This is absolutely awesome!!! I didn’t think you could pack so much into it, thanks for sharing such a great mod. If I ever get to such high level of modding skills I will have to try it!!!

Another amazing build, tterev3 !!! I love it, I love it, I love it! (and I want it!)

Thanks for the post, that made my evening!

That’s pretty sweet!

Nice. Impressive skills!

Bravo. True craftsmanship by a true master. As I read, I keep thinking Bond, James Bond.

Wow! This is crazy!
truly amazing! I want one too! ;)
welds incredible!

that is insanely sick! i would have never thought it would be even possible.
are you able to dump out that stock emitter for something more powerful and get 500 lumens out of that tiny lightweight thing?

Neat build. Good work!

whoah…simply awesome!

wowsers

I have no idea how you do what you do. Amazing.

That’s insane!

Thats a great build, outstanding job.

WOW

Marvelous! :)

Incredible Build! :heart_eyes:

Awesome! I want one.

WOW!