Mod - GarryBunk's SecurityIng HD-016 (It's Finally Done!) - Pic Heavy

Garry has opted to utilize the MCU from the KD2 10 Step programmable driver. For any not aware, he requested KD make the driver available separately from the light. Last I checked it was $8.

After playing with the KD driver a bit, I have to say it is a pretty cool driver. Programmable levels, thermal and low voltage protection, and indicator lights basically cover all the features Garry wanted. I really like how it smoothly ramps to the next level.

I've spent a good amount of time trying to map out the circuits on the KD driver so that I can determine what needs to be done to transplant the MCU to to the HD-016. It's been frustratingly difficult due the black masking and traces running under components. I finally had to resort to sacrificing the KD driver by sanding off the masking.

This will be a pretty involved driver mod because it will require at a minimum that the MCU, EEPROM chip, and some resistors be transplanted. Another complexity is that the pin outs are completely different and almost every pin of the KD's MCU is used. There will be a lot of air wiring. There are some other circuit differences that may need to be addressed as well. I also hope to transfer the Red, Yellow, and Green indicator LED's as they have different meanings for programming and voltage indication. Not sure what the HD-016's green GITD cover will do to the colors.

Here is the driver with the toroidal inductor removed:

Driver with mask partially sanded off:

Here is a first draft of the KD circuit. It was written down as I studied the sanded driver and compared to pictures of the unstripped driver. It doesn't include some of the buck portion of the circuit as the HD-016 will provide that. I still need to verify the accuracy of the diagram. Once verified (hopefully tonight), I will compare the the HD-016 circuits and formulated a transplant plan.

Hopefully all goes smoothly. I will update the OP with a summary of all the mods once completed.

I’m glad to hear it’s moving along. I’ve been sick for about two weeks and barely managing to keep up with work, so I haven’t really stayed in the loop.

ImA4Wheelr, great job. I like that KD2 driver much and it's nice to see the drawing of it. Hopefuly you'll do it like this at DX forum (pic.source http://i.imgur.com/WzPgF8g.gif). It has identical user interface, but it's boost driver for 3 to 6 leds in series.

Maybe this drawing would help you somewhat.

Thank ledoman. That may be very helpful. Do you know if there is a free program out there that would enable me to create a diagram like that for the this KD driver?

Unfortunately not. I'm not EE, just end user of those driver.

Maybe Eagle can do that for me. I need to study this thread by Mattaus.

Your diagram will be good for verifying mine for the relevant parts of it. Thanks again ledoman. :)

Glad to see progress ImA! Sorry this project has become so difficult! I didn't intend to torture you when I asked you to take this on!

-Garry

No worries. Learning a lot. Hoping to wrap this baby up this or next week.

Eagle can do the diagram. IMO using a CAD program like Eagle is much less frustrating than attempting to map out an unknown circuit on paper.

I think jotting down observations on a piece of paper seems much easier than burning time searching for library elements for an unknown MCU and other components. Maybe for a more complex circuit, but for our drivers a sketch seems adequate.

Would be nice to document all tidy and all for future reference though.

One factor is how well you understand the circuit to start out with. The better mental image you have of the circuit, the easier it is to draw in either format.

There’s no reason to go running around looking for library components. Just pick something that uses the same package and go with that. It’s not like someone is going to flip a power switch on your Eagle schematic: it’s just a representation. More experienced Eagle folks may normally just make any missing parts, but I don’t usually bother for a schematic.

Number of components that will be swapped over is 15. Actually, 13 swaps and 2 additional components (EEPROM and a 30K resistor) will be added. Six of the ten swaps will be resistors, three the colored indicator LEDs, then the MCU, EEPROM, thermistor and the tantalum capacitor. I'm not crazy about tantalum capacitors, but since it is part of the MCU's and the EEPROM's power supply circuit, I will error on the side of caution and swap it over.

Heaps of air wires will be needed. Some traces will need to be cut and new "traces" laid down for the indicator LED's. They are feed a positive charge from the MCU on the KD driver, but a negative charge from the MCU on the HD-016.

If I was handy with Eagle and Gerber files, I would make an adapter PCB for the MCU. Well, maybe not. I don't think I would want to wait for an order to be fulfilled. I'll air wire and secure wires/mcu/eeprom with a little silicone.

I noticed my diagram does not show the tantalum capacitor connection to B-. I will eventually make a nice diagram for future reference and post it. I'll try to do it in Eagle.

Hi, I’m new to his forum and first I would like to thanks ledoman for his great review of this light, ImA4Wheelr for his reverse engineering job and others for their contribution to this thread. I’m engineer in electronics, hobbist and embedded systems programmer, and I’m the recent owner of a HD-016 from Gearbest that I bought for my mtb. I’m very interested in modding this light, and I would like to add my “little grain of sand” to this thread. It seems to me that the stock MCU is an Attiny 24, (VCC and GND pins match Attiny pins, OC1A and OC1B, (ATtiny PWM outputs), are tied to led1 and led 2 PWM controllers, maybe Aref is VCC and not internal ref…), so maybe the best solution would be to reprogram the stock MCU using ISP pins. I will try to read it’s firmware,maybe it is not protected, but even if I couldn’t, it would be very easy to program a new custom firmware.

This weekend I will try to make some photos of my semi-modded light.I have improved thermal dissipation using thermal compound and two pennys attached to the back of the pills.

Ledoman, I like your idea of connecting both pwm’s in parallel and use a combination of Rsense’s, but I’m not sure if current regulation will be stable. I will give it a try.

Sorry for my bad english,

Jose Luis

Welcome to BLF Jose! Glad to have your contributions. Feel free to post up pics of what you've done.

-Garry

Jose Luis, welcome to the club ;-). it would be nice to have some EE here helping us (and yourself) solving electronics issues. We are mostly lack of that knowledge.Please see my post 100 with plan of another driver with same user interface as KD2 driver has and there should be the same chip IC4 regardless it is a boost driver.

Please rethink about my idea using both output circuits combined. Probably there can be some interference, but since there should not be any PWM this should not be an issue. It is just if the current from one circuit can interfere to another. Diodes should prevent that, but please take a closer look. Thanks. Of course I would also use different sense resistors in the case this idea should work. This would eliminate a lot of hassle to reprogram IC.

Hi, I have tried to communicate with MCU by using both TPI and ISP modes, but with no luck :frowning: ,may be it is a PIC, and I have no experience working with pics, only with AVR’s. Next step will be combining Rsense resistor and put leds in parallel, but I need to find SMD resistors with low values.

Are you still going ahead with this light mod?

^ Yes, it's been progressing slowly partly do to it's complexity and partly due to lots of life interrupting events. I haven't had a chance to mod any of my lights in ages. When I do get a chance, this project get the attention.

I'm hoping to bring the frankendriver to life tonight or tomorrow. I'll be honest. I'll be holding my breath. I've never so massively changed a driver. The MCU's have the same number of pins, but that is the extent of their commonality. For instance, the KD MCU feeds a positive charge to the indicator LED's, but the HD-016 MCU feeds a negative charge to them. The forced me to cut traces and wire in new circuits to keep that functionality. I wouldn't be surprised these two MCU are from completely different companies.

Anyway, I hope to be reporting good news and updating the OP with all the mods that have been made to the light by the end of this weekend.

Things are not going well with the MCU air wiring and I will be ditching that approach. Keep running into complications. There are 12 needed in total. Below is second attempt before the blue wire in back broke free and I gave up air wiring this MCU. Thinner wire would help, but still be problematic. Please ignore the sloppy LED lead solders on top. I just tacked them to have load testing purposes.

Garry is being very patient with my pace on this light and has OK's me going with an adapter board. So I'm finally going to learn how to used Eagle and make Gerber files and such. I don't know what MCU I'm dealing with. I think I will just build the element from scratch based on dimensions. If anyone has any tips for a better approach, please advise.

Time to go watch a Mattaus tutorial.

Thanks ImA for all the hard work! As I stated via PM, I never expected this mod was going to be so difficult and frustrating for you. Keep up the good work!

-Garry