I had an extra H03 sitting around for a while wanting to be modified, and realized the most useful added feature it could get is USB charging. The H03 is very compact for a right-angle 18650, which makes it difficult to add extra hardware, but it turns out it is just possible to fit a type-C jack in there above the driver. With this new feature it is now comparable to one of my other favorites, the Armytek C2, but more compact. While I was in there I replaced the microcontroller to update it to MELD (single channel) UI with battery and temperature monitoring, with a bit of extra code to handle the charging indication.
To start I cut a slot out of the back of the head to match the size and shape of a USB type C jack. These jacks are simplified versions for USB-PD only and have just six pins.
The slot is positioned so that the jack can be glued in flush to the shelf inside.
I positioned the jack so that it does not protrude past the surface of the outside diameter. It is secured with CA glue on the bottom and then reinforced with epoxy around the edges.
The charging circuit is a TP4056 set to 1A charge current. Here you can also see the resistors added to the CC1/CC2 pins on the jack which allow it to charge from USB-PD (laptop) supplies in addition to standard USB ports. The TP4056 is mounted inverted with CA glue and wired up with 34AWG enamel wire. In addition to the required power connections, the charging signal from pin 7 is broken out so that it can indicate to the microcontroller when charging is occurring.
I had previously reverse-engineered an H03 driver from the first one I bought so taking control of it was a quick project. Here is a photo of the driver with the stock microcontroller removed and relevant points labelled. With the stock part removed, you can take control of the driver by providing a logic signal to enable or disable the buck converter and one PWM signal to control the brightness. Optionally you can connect to the existing voltage divider to monitor battery voltage, and connect to the direct-drive point to implement moon mode. There is also a voltage regulator on board that can be used to power the replacement microcontroller. I later discovered that I was able to dim much lower than the moon mode hardware just by using PWM so I disabled the use of the moon mode pin in firmware.
I added one of my custom breakout boards that holds a PIC16F1575 (which is mounted upside down, so you cannot see the chip in this image) and wired it up to the required signals. As an extra improvement over the stock light I mounted a thermistor on the unused pads on the LED board to more directly monitor temperature.
After wiring up to the switch board and thermistor I temporarily connected to an external LED to test the hardware. At this point I confirmed that charging worked and made necessary tweaks to the firmware for the added features. The standby current draw was measured at 22uA. I forgot to measure the stock standby current for comparison.
Here is a glimpse at all the hardware installed and wired before closing it up. Kapton tape was added over the holes in the jack to keep dust out of the internal cavity. After this photo additional tape was added over the jack and charger to prevent shorts.
Looking from the LED side you can see that there is very little space left after pushing the driver into place, but all the new hardware just barely fits.
And here is the final product charging with a USB-C cable. The firmware is standard MELD-sc (single channel) which implements all MELD features except for UV and colors, but still has a color sub-menu for those that can be done with a white LED only (lightning, random strobe, and two safety flashers). The modifications for the H03 include voltage and temperature monitoring which can indicate error conditions using the red LED in the switch as well as ramp down or turn off the output if necessary. When the charger indicates that it is active, the firmware will turn the red LED on steady and ignore switch inputs (keeping the main LED off) until charging stops.
Great work!
₪₪₪₪ ΟΥΔΕΝ ΚΡΥΠΤΟΝ ΥΠΟ ΤΟΝ ΗΛΙΟ ₪₪₪₪
My YouTube channel
Flashlights & edc gear
K40M F16
Nice mod! What did you use to cut that hole in the side?
EDC
FW3A, SST20 4000K || S21A, Crescendo Mtn20DD, LH351D 4000K || SP32A, SST40 5000K
Recent/ongoing Mods:
S2+, TexAven 17mm, LH351D | S21A, Crescendo 20mm, XPL HI 5000K | L2 w/Mtn17DD Zener Guppydrv, XHP-50 | C8+ OP, DD XHP-50 |
SP32A w/SST40 5000K | TIR Upgrades | EagleTac clip | Ultrafire C2 w/6A 20mm & LH351D | S2+, Biscotti, Nichia 219C 2700K |
Reviews:
Sofirn SP31 v2.0 Tactical Flashlight (Cree XPL HI) || Sofirn SD05 Scuba Diving Flashlight || Sofirn SC31 USB Rechargeable (XP-G3) || Sofirn SC31 Pro 5000K
Combination of Dremel, drill, and small files
Awesome!
I have misplaced my H03.
Not sure I love black magic but do love your work.
djozz quotes, "it came with chinese lettering that is chinese to me".
"My man mousehole needs one too"
old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".
Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.
That’s a pretty amazing bit of modding.
So awesome…
Absolutely fantastic work!
Makes one of my favorite 90 degree lights even better.
All my (Flashlight) reviews here: https://www.youtube.com/watch?v=TpG3ZcOC610&list=PLTvT87Yc3TJUUyzvJ49LNV...
or just hit the Trail Trek channel: https://www.youtube.com/channel/UC9kyYSgeDFYXcn_AH4FgklA
Fine work on that, tterev3!
A couple questions:
I’m not sure, it’s a very small 3×3 package that was covered in black silicone potting so it’s hard to make out any markings. I’ll check again
If you search eBay or similar for “Type C Female 6Pin SMT” you can find them
Here’s the original microcontroller. It’s a 3×3mm QFN-20 marked 3AQ20 which seems to be a Nuvoton 8051-based part

Amazing work !
Just to confirm…H03 has a separate e-switch PCB, right?
Yes, with an indicator LED as well
thx
Very impressive, and a nice inprovement over the stock light! Thanks for posting about it.
link to djozz tests
Wow, very nice work
Truly impressive!
tterev3 No wonder I’m such a doofus. You and Davidef used up all the brains here in NC! Excellent work and well done on illustrating the process.
Hi tterev3, hopping over from your D4v2 usb-C thread, how did you wire your tp4506?
The premade boards online all seem to use a whole bunch of capacitors and extra resistors but looking at your build, they seem completely unnecessary?
I’ve analyzed your wiring using your photos and a pdf from online and the best I could come up with was this:
Pin1: Temperature sensor pin- Connected to Pin 3 to bypass temperature limiting
Pin2: Programming pin- Connected to Pin 3 with a 1.2kohm resistor for 1A charging
Pin3: Ground pin- connected to USB-C Ground pins and Battery Negative
Pin4: Vcc- Connected to USB-C VBUS and Pin 8
Pin5: Battery- connected to Battery Positive
Pin6: Standby- not connected in your case. Would be used to to indicate the charging is done (Typically connected to a green LED)
Pin7: Charging (To indicate battery is charging (you’re connecting to your microcontroller, but typically connected to a red led)
Pin8: Enable- Connected to Pin4. Idk what this one does, enables the whole circuit to turn on? I assume connecting this directly to VBUS is enough to enable the charging?
Is my analysis correct? The perspective of your photo confused me a bit, and the documentation online was also a bit difficult for me as a beginner to understand.
Thank you, this was quite a long post for a very specific question and I understand if people don’t want to take the time to read it.
You got it exactly right. Pin 8 is just an enable pin, it needs to be pulled high to turn on the chip. Normally you just connect it to Vbus to make it always on.
As for the capacitors, it’s always a good idea to put one on Vbus and Vbat if you can fit them, but it will usually work without
Great thanks! What would be the purpose of the capacitors? Also what size was your 1.2kohm resistor? I haven’t had any experience with smd resistors and it would be nice to buy the right size the first time.
Thanks again!
I am just curious, why did you decide to do small wires in a microscopic way, instead of just making a custom PCB for it? It may be a lot more tidy and more resistant to damage in future. However, big thumb up for the amazing work!
Essentially the capacitors are to filter out noise. The charger needs a steady power supply to operate correctly, so the cap will smooth out any noise or AC signals that were induced by the USB power supply, stuff near the USB cable, etc. In this one I used 0603 resistors and in the D4V2 I used an 0402. If you are new to SMD soldering I would recommend starting with 0805 to make it a bit easier.
Do you mean remaking a new driver PCB from scratch? Since I was modifying this driver, there was always going to be hand wiring involved. The charger is only a few connections, so it wouldn’t be worth the time for a PCB for the charger, plus there would be a lot of CAD and design iteration to get the size right to fit in with all the other parts, plus it would have to be a flex PCB to be slim enough to fit, etc.. I don’t think having wires reduces the reliability – there are always wires in lights of this kind, even in stock form. Plus, my microcontroller is on a custom PCB