Adding USB-C charging to a Skilhunt H03

So awesome…

Absolutely fantastic work!
Makes one of my favorite 90 degree lights even better.

Fine work on that, tterev3!

A couple questions:

  • What was that original QFN MCU? I will likely be reverse engineering the UT01 soon and noticed it has an attiny44 on board, something I wasn’t expecting. I’m not sure if I’m going to replace the MCU (likely with a attiny816) or design a whole replacement driver.
  • Where did you get that simplified USB-C jack? It looks like something I might want for future projects.

I’m not sure, it’s a very small 3x3 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 3x3mm 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.

Wow, very nice work :beer:

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

I’ve found an easy way to attach the 5k1 resistors. I’m using some 0805 ones and they’re a pretty good size to fit at the back of the port, under the pins. The connection to the pins is good, my photo quality is a little poor so it looks like some connections aren’t there.

I’m adding usb-c and a driver with anduril to an SP40. I’m using the old tp4056 circuit from the board of the SP40 which I’ve chopped off to do the usb charging bit and got an HL3A driver for anduril. I just need to buy some files because the SP40’s charger port hole is too small for a usb-c port.

Very complex (for me, at least) and amazing work!