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

I just received this light from ImA with the custom firmware installed in order to test it. Couldn’t wait, so I didn't . I pulled the 18650 from my EDC (old Sanyo 18650 laptop pull), dropped it in, and gave it a whirl. I have to say “I LOVE IT!!!!” Timing seems great! The press-n-hold 2 seconds to turn off or access strobe (which is only accessed from off) feels perfect! Mode spacing appears good (shining under my desk at work), but I’ll give it a better review when it gets dark out. The strobe timing seems good. It's a slower beacon type strobe which is definitely not seizure inducing like so many lights.

Thanks ToyKeeper for such an awesome firmware and thanks ImA4Wheelr for giving it a good home! (Now excuse me while I crawl back under my desk and go back to playing with the light :) .)

-Garry

Garry, nice to hear you are satisfied. Can you tell what spacing exactly have you choose to set in this sample?

My desired modes are: Low (10%-15%), Medium (40%), High (75%), Turbo (100%) with turbo step down to "high" after +/- 90secs. ImA will be adjusting the firmware to hit levels close to my goals. I wanted a low that wasn't anything like "moonlight" and was enough to leave on while stopped to light up the surroundings. Turbo is intended as generating heat than the small light body can handle (this is really just a guess) but for those times that you just want a quick boost to see just past the fringes of "high". High at +/- 75% should be around 2.0A per emitter and likely at the limit of heat the body can handle, while yet still providing pretty good runtime on an 8.4v 5200mAh battery pack.

The U.I. is as follows:

Blinks once when the light receives power, just to let you know it’s connected.

From off:
Short click for low.
Long press (2 seconds) for strobe.


While on:
Short click to increase brightness by one level. Loops from turbo back to low, bypassing “off”. If in strobe, short press goes to high.
Long press (2 seconds) to turn light off.

Strobe timing: 4Hz, 20% duty cycle

My intention was to have "Off" and "Strobe" only accessible intentionally so that a cyclist is never left in the dark, nor accessing stobe while riding.

Whether or not the battery monitoring will work is up in the air. I don't expect it will, but having it work will just be icing on the cake!

Oh, and I should have also given thanks to ledoman for giving me input and feedback on this U.I. and mode levels. And without his review I probably wouldn't have bought this light in the first place.

-Garry

nice, can’t wait to see the beamshots.

Too bad that’s all those things are good for right now. :wink: Maybe I should get back to that project.

The big plans in the OP sound good.

Sorry I haven't been around folks. Been busy gathering info from the driver lately. It seems pretty sophisticated. Has a lot of stuff going having 2 buck drivers and 3 voltage indicator leds. Good news is I think there may be 2 voltage divider circuits. I've taken snap shots of as many traces as I can get and have recorded some voltage readings relative to Ground. I need to get more readings and also at a different voltage level for some. It appears that the pinout for the MCU might be quite different from my X2. Can't definitively say at this point.

Still have ways to go to get all the pieces fitting together in my mind. Being hampered by traces disappearing under components. It appears the critical traces I need to see are under the switch. Problem is, I can't just unsolder it from the driver to see. It's a big switch that has big pins/legs in every quadrant of the base board. I would need to heat the whole thing to remove it. Given the 3-dimensional nature of the driver and weight of some of the components, the driver would probably partially fall apart in the process.

I think it's a good thing that Garry only wants to do a modest increase in current to the emitters. The inductors on this driver are pretty small. Also, each driver has only one large diode per inductor. The X2 has 2 for the one inductor.

Anyway. I have more work to do and it will probably take me a few days before I can post a coherent report on the driver. But, that's the hard part. Once understood, the mod is the easy part.

The heat sinking mod is on hold while we sort out the AR coated lens Garry wants to use. The stock lenses are 1mm thick. He may be going with a 1.5mm thick lens. That will impact the pill as it's the only place that can realistically be adjusted to accommodate the thicker glass.

I'll report back when I have some good progress or coherent information.

Gonna park some driver pics here for folks in the future that may be interested in modding this driver.

Two buck drivers. Large diodes labeled "SS34", Inductors "100", Sense Resistors "R150", Buck Controllers "LEDA 1406",

Here's a couple, much better pics. These are of Ledoman’s HD-016 driver from his review (Post#13).

Where most the action will take place:

The 3 pads with long traces going off to the right go to each of the 3 voltage indicator LED's.

The big trace in the center is B+ and connect to the 2 inductors. The biggish traces on each side are the other side of the inductors and also connect to the LED+.

Need to redo this one below.

Switch and voltage indicator LED's side of driver.

Those back lit photos are great for trace finding, niiice.

ImA4Wheelr, two better pictures (non backlited) are mine from the review.

^ Opps. You're correct. Garry even told me that when he included them in a PM. Sorry. Correcting post right now

No problem, it's just to be correct. :-)

Oops, looks like a different firmware will be needed. I didn’t know this thing had battery indicator lights.

Then again, if it’s running on 2x18650 in series, I don’t think I can measure the voltage anyway. We’ll see.

Hi ToyKeeper. The driver appears to have 2 different voltage dividers (Still trying to sort out). One MCU pin pad reads close to 1.5 volts and another at about 1 volt with fully charged cells. I don't have exact numbers here at work. I also need to measure with different input voltage levels. I can adjust the values in the FW as needed. I don't know of anyone pulling this off yet though. I just know the theory the wight taught me.

Yeah, I set those a tad bit different than requested. They’re actually about 1.6, 12, 46, and 100. But after adjusting the values on a visually-linear cube root scale with a maximum of about 1600 lumens, the resulting “perceptual” percentages are 25, 50, 77, and 100.

The low end may be a bit off since I’m not totally sure where “zero” is on this hardware, but I’m guessing it’s at about PWM=6/255.

That sounds like it’ll probably take a lot of trial and error, manually checking lots of different values and reflashing. And that’s if it works at all. It might deliver a constant voltage due to the buck driver, and it could possibly be too low to measure accurately (the attiny13a’s reference voltage is 1.1V). In any case, it likely won’t be easy.

ImA4Wheelr, did you measure both of those voltages as changing with different Vbat? Just based on what you wrote I’d expect that one of those two voltages was probably a reference voltage to compare the other voltage against. (If so, the ATtiny13A will not need that.)

I think that the easiest course of action is simply to make up a new voltage divider and work with what we know.

^ Haven't had a chance to try different voltages yet. Just trying to understand some basics about this driver.

The traces don't make sense to me yet. I can't completely track the PWM traces going to the Buck Controllers. I expected 2 separate pads to control PWM for each driver because the stock light operates them independently. But only one pad seems too activate both of the drivers simultaneously. So far, this diagram is about all I think I know about the stock MCU pin pads. The voltage readings are from ground. Doesn't that the Vcc seem high?

The indicator LED's are always connected to positive power. It appears that the MCU must a path to ground to turn them on, but when I try to ground those pads, the emitters do not light. They light when tested with a DMM though.

Something seems to have gone wrong. Now when I connect power to the driver, one led turns on and one of the sense resistors starts to smoke within seconds. Wondering if a Buck Controller failed.

It's late and I got to crash for work tomorrow. I think I will replace the Buck Controller is connected to the burning sense resistor and begin testing circuits all over again. Probably should reflow the MCU and see if the driver still works properly too. I'll decide tomorrow.

Yeeee Haaaa! We're in business. Finally, got this driver sorted out. It turned out one of the Buck Controllers had failed (Probably when I was poking and prodding around trying to figure this damn thing out). I reluctantly pulled the switch so that I could see the traces under it. That helped answer more questions. I still can't follow the traces for PWM, but process of elimination gave a clear indication as to which pads were for that. I think the traces are hiding under the vertical board. I have much better trace pictures that I will soon replace some the pics in Post 16 with. Here are a couple views of the traces under the switch:

We also seem to have a viable on-board voltage divider. It measured 1.43v at 7.61v input and 1.55v at 8.2x input. More measurements will soon be taken. The other "voltage divider" seems to decrease voltage as input voltage increases. So it doesn't seem like anything we will be utilizing in this build.

So, I'm at a point where I can now start modding the driver. I should have something to report some time before the weekend it up.

EDIT: To all the folks that said nice things up above. Thank you very much. I'll reply to those posts sometime soon now that I'm starting to see some light at the end of the tunnel.

Bad news ImA4Wheelr: The 1.4-1.6v range does not make for a simple mod. If there is not a rock solid Vcc available then it’s not useful at all to the ATtiny13A, which uses an internal 1.1v reference with current firmwares. ATtiny13A units without a fully regulated voltage supply cannot measure above 1.1v in other words.

I think I said it earlier, but the easy way out here is definitely just to build a new voltage divider. If you have a rock solid Vcc then the firmware could be modified to measure the stock voltage divider against that, but it would require (minor) code changes and (unknown amounts of) testing.

Good luck with figuring out anything strange relating to controlling the two buck circuits independently, I’m looking forward to that. Maybe there is a transistor which switches the availability of the PWM signal on or off for one of the circuits (so it would be controlled by a binary output from the MCU).

Having an on-board circuit makes this so much easier. I just need to change out resistors to get the appropriate voltages. I think it's good news.

The drivers were independently driven stock. The will both be feed the same PWM signal from the Attiny. One may end up putting out more current overall to balance the beam pattern, but they will both get the same PWM feed.

Thanks for the input wight. Always appreciated and valued.