Sunday, March 1, 2020

Tiny green laser in a Nitecore Tube

NOTE: this is a repost of my thread on BudgetLightForum here


I recently discovered the new 520nm green laser diodes that don't require the frequency doubling stage that regular 532nm green lasers need, which means I could finally build one as small as I wanted. I gutted a Nitecore Tube and turned it into a 30mW rechargeable green laser pointer with some extra firmware features.

Here's a video detailing the whole build:

It turned out so well that I ended up building a 450nm blue one too.

Min/Max Light version 1

NOTE: this is a repost of my thread on BudgetLightForum here




I'm calling this light the Min/Max Light - minimum size, maximum functions. I used a Nitecore TIP2 as host for this and put every feature I could think of into it:

* RGB colors
* Cyan LASER
* 365nm UV
* Current and Voltage instrumentation with INA219
* Temperature monitoring & control
* OLED display
* Touch-sensitive controls for peek mode
* USB-C onboard charging

For a long time I've been carrying the SDmini with OLED and got to a point where I couldn't stand to carry a light that didn't give me detailed battery and runtime information, but the 18650 format was often too large. I decided to build a very small EDC light that included every feature I've ever put into a flashlight in one, and in the minimum size possible. The Nitecore TIP2 was the perfect host with 500mAh cell size, onboard charging, and conveniently had two emitters side-by-side so I could remove one and add new emitter types.

The most difficult part of this was the optics setup - I had to fit optics for a collimated laser and the UV LED into the space left by removing one of the XP-G emitters and corresponding TIR from the stock light. Here's the completed setup, which involved heavy modification of the plastic frame and brass heatsink, as well as some custom structures formed from copper:


The TIR optic itself took some work too. I needed a flat lens for the laser beam, and the plastic material wouldn't pass 365nm UV, so I carved out the TIR lens and installed a small glass window, secured in place with epoxy:


In the back I removed one of the two magnets and used the space to put in a USB-C jack and a charger based on the LTC4054:


The laser is built as small as possible using 7mm optics from cheap red laser modules just like I did in my Nitecore Tube Laser, and in this case using a 505nm cyan laser diode. Even built this small, the battery had to be moved back to make room for the laser assembly. For this reason I had to separate the protection circuit and put it on the side. In this image the laser boost driver and LED drivers are also in place:


The back end also gets a programming port to update firmware without disassembly:


And a 3D-printed cover held on by a screw:


After quite a bit more wiring with 34AWG magnet wire, here's all the electronics in place, with some annotations. The battery monitoring is accomplished by an INA219 power monitor and the control is a PIC18F26K40 on a custom board that includes support circuitry for the 128x32 OLED display:


And with the display board folded down into place it is ready to be put into the housing:


The housing needed a window to be milled out for the display:


And finished with needle files:


This light includes something I've been adding to all my lights with displays - peek mode. With this function you can tap on the the buttons (without actually pressing them) and see the battery status on the display. To do this, I add a capacitive touch sensor behind the buttons by covering the back side with copper foil tape which gets connected to the TTP223:


Finally the internals can be slid into the housing. I also added a 0.5mm-thick plexiglas window over the display, and then program it:


And power it up:


And here's what the UV looks like:


And a head-on view of the front. You can see the TIR for the white beam, the laser, the UV, and on the lower side of the TIR you can see where the de-domed XML-RGBW contacts the optic to get RGB light out the front:


I should probably do a video or something to explain more about the firmware features - there's a lot going on in this one. In short, it is 2-button MELD interface with the display showing mode, drive level, drive current, battery charge status, LED temperature, battery voltage, battery capacity remaining, and estimated runtime. While charging it shows charge status, voltage, and current. In peek mode it shows charge status, battery voltage, and a preview of the mode that will run if it is turned on.

Thanks for reading

Telemetry Headlamp

NOTE: this is a repost of the thread I put on BudgetLightForum here


My Armytek Wizard now has a pretty unique feature for a headlamp - a packet radio to send wireless telemetry data:


While doing long pre-dawn marathon training runs I found myself wanting runtime information from my headlamp so that I could maximize the light output for the duration that I would need it. In the past I've added displays to lights to do this, but that doesn't work on a headlamp that you can't look at while using it. That led me to build this modified Armytek Wizard that contains a small packet radio (NRF24L01+) with instrumentation (INA219) added to it so that I can remotely monitor power consumption, battery status, and predicted runtime.

As a first step I disassembled the light and did some reverse engineering so I could take control of the driver. I had previously done this with an Elf C2 which used a very similar design so this step was pretty painless.

Above is the result of my preferred method for doing this - I put a hi-res picture of the board on the computer and add annotations as I go. An interesting side note - these Armytek drivers are the only ones I've ever encountered that use a DAC output from the microcontroller to control the brightness. I am doing the same with my modified one using the PIC's internal 5-bit DAC, but I can double the range to 64 levels by turning the moon FET on or off.




Next I removed the stock microcontroller and built up this development platform to get the firmware started. In the top right is an INA219 power monitor breakout from eBay, lower right is an NRF24L01+ board, and bottom left is a PIC18F26K40 on a custom breakout board. The INA219 measures both sides of a current sense resistor inserted between battery positive and the rest of the driver in order to monitor cell voltage and current. In order to get the sense resistor in, I temporarily removed the inductor and made this cut:


After getting the basic firmware implemented, it was time to make all the new hardware fit. Here's everything that's going inside the light - stock driver with uC removed, INA219, trimmed radio module (wire whip antenna instead of trace antenna) and a smaller version of my PIC microcontroller breakout:



The first step was to mount and wire in the power monitor:

In the above image you can see the current sense resistor standing on-edge to the left of the inductor, and in the center is the INA219 mounted dead-bug on top of another component.


Next I glued my microcontroller board on top of the inductor and wired it in to power, the INA I2C connections, and the connections required to take control of the driver.



I wired up the radio as well. A few additional connections were also made to the driver board so that I can use the existing contacts on the bottom of the driver to allow reprogramming after the light is reassembled. You can see the details of this in the annotated driver pictures above.


Then the LED, thermistor, and switch/indicator connections are made. I also insulated the radio with kapton.


The radio just barely fits in sitting at 45 degrees just behind the TIR optic. The antenna was wrapped around the optic as close to the window as possible since this is its only "view" out of the metal housing.



With the light done I now needed a device to receive and display the data. I laid out all the components (OLED display, custom radio/microcontroller breakout board, shaker motor, lipo cell, charger and USB connector, and switches) and built up a housing around it in two pieces:


These were 3D-printed in ABS and I started assembling:


And wiring:


And after some programming and adding a wrist strap here is the result:


This control watch shows the two important data points (battery percentage and estimated remaining runtime) in large font, and above also shows the headlamp's brightness level, LED temperature, remaining milliamp-hours, instantaneous current draw, and battery voltage, as well as the battery voltage of the watch. These radios are already performing 2-way communication, so I considered adding the ability to adjust brightness from the watch, but after using it I decided this wasn't really useful. The watch is just a remote display that I can look at while using the other hand to adjust the light to make sure the brightness I pick will last the required time, and this accomplishes the goals I started with. Thanks for reading!