here is the LD-29 MCU pinout (eg how to put your ATtiny13A in there...)

Here we go.

The LD-29 has been reviewed by HKJ in two forms, see here:
Review/test of LD-29 2.8A 1/2 Cell Circuit board
1-2* Lithium 2-Group 3/5-Mode 2.8A LED Flashlight Driver (LD-29)

Mine is from FastTech but I'll note that it uses the taller inductor pictured on the IOS version. It was definitely stacked with wires like the FT model HKJ reviewed (rather than solid pins like the IOS model he reviewed).

This board uses the Microchip PIC12F683 (datasheet link) MCU. The numbering starts at the pin1 indicator (dimple or dot) and continues counterclockwise around the chip. Here are the readings I got:

  1. 2.48v [this pin is Vdd aka Vcc in Atmel lingo or V+]
  2. 2.45v [output pin, disconnected I think]
  3. 2.46v [output pin, "enable" for the buck circuit]
  4. 2.48v [not sure what this is. hooked up through a resistor, cannot supply any current]
  5. PWM out [note - the stock firmware does not use 100% duty cycle for high. More like 80-90%]
  6. 2.48v [output pin, offtime memory cap charge I think]
  7. ~0.45-2.0v depending on input voltage. 0.45 at 1v, 0.55 at 2.8v, 1.67 at 8.4v, and a little higher at 8.7v
  8. 0v [this pin is Vss aka GND]
When removing the MCU be careful - on my sample a lower temp solder was used on the inductor side than the MCU side. That means that when you heat the board those components will tend to come off, so definitely do *NOT* use a clamp or vise attached to the inductor. That's what I did at first and I ended up having to put the inductor back on. Instead clip onto the PCB directly and be careful not to bump it hard while you are working.
Pin 2, 3, and 6 appear to be outputs which the PIC normally pulls high. One or more of those pins are likely enable/run pins which are required for the board to operate. The board does not work with the MCU removed and those pins floating @ 0v. Pin 2 is disconnected. Pin 6 is connected to a what appears to be a dummy component. It looks like a diode but does not conduct in either direction. EDIT:my mistake, it seems to be a small 100k resistor. The other side of that component connects to a cap. Pin 3 is the enable pin.
Pulling pin 3 to VCC and Pin 5 to VCC seems to work fine (maximum output).
EDIT: corrected everything (I hope). I originally listed the descriptions for pin 5-8 backwards.

I don't understand half of what you are saying (my fault, not yours), but it sounds like you figured out how to swap in a Attiny MCU on a LD-29.

Yes, but some small tweaks need to be made for voltage monitoring and to turn the driver on. Should be no problem.

  1. Voltage monitoring is on a different scale with this board, we need to change a flag in the firmware to accomodate that. We must tell the ATtiny to compare the voltage divider output with our regulated VCC (2.48v across all input voltages according to my measurements) rather than comparing it with the normal internal 1.1v (+/-10%) “reference” voltage the ATtiny has.
  2. The initialization/setup section of a clicky firmware should pull pin 3 high. For a momentary firmware we may be able to use Pin 3 to reduce parasitic drain while the light is off (we’d pull it low while the light is off).

Now that I think about it, this driver probably has offtime memory. I still don’t understand what that little black component is, but I now assume that Pin 7 is for offtime checking. Maybe I’d better check the little black component again.

Wow great news!
Subscribed :wink:

Can you take a photo of the black component?

HKJ has already provided us with a clear picture. Please take a look on his site at this image. Pin #6, as I mentioned. (count from the divot at the bottom counterclockwise back around). I have just checked mine again, and while I still cannot get my continuity test to show anything, it seems to be a 100k resistor. I am very confident that the resistor and capacitor are for offtime memory.

I have flashed a 150hz STAR firmware w/ ontime memory and no LVP onto an ATiny13A and successfully operated the driver.


Clearly the PWM is no good. I will increase the frequency and see what happens - later.

In another thread (post #58) I posted an ‘adapter’ for placing an ATtiny13A where a PIC12F683 goes. The link in post #58 is an update to the seriously dumb mistake I made in the one from post #47/#50. It is still untested, but I have a few on the way. As I mention over there, it requires a little filing to get working. The PCB is 1.6mm thick, so it won’t really increase the size of the driver much and should really clean up the install.

Would the BLF Tiny10 give you a solid platform to piggyback the ATtiny and supporting hardware and be able to shoe horn it in the pill?

comfychair and others seem to be getting VERY good at that lately

Excellent investigatory work there…awesome!

Excellent work! Watching with a keen eye :)

Have you checked the “regulated voltage” input with different voltages?
If it is not absolutely the same on all voltages especially on low voltage it would be better to replace just the resistors for voltage monitoring…
A small driver board is ideal to do this kind of work, the tiny10 has everything needed. If the voltage gets hooked up directly with a wire the diode might not be necessary.

I checked a wide range of voltages. It seemed rock solid to me.

That’s nice.

B.T.W
so without an MCU, this driver can work with a momentary switch connected between pin 3 to vcc and pin8 to vcc ?
I mean while pressed: light is on, otherwise: light is off. :open_mouth:

Crap. I’ve mislabeled them! And after I got on ImA4Wheelr about the same thing. What you are thinking is fine. I’ll come back and fix everything.

:~ sorry to hear that

I thought about another thing.
I believe that the components are not meant to work in higher currents.
What if we change the Inductor and the Diode to something more quality for example IHLP2525CZER4R7M01 and SBRT15U50SP5-13

Do you think it will help?

I haven’t looked into replacing the components on the LD29. I haven’t measured but I think the LD29 can produce 4A at least without dying. I do not know the efficiency at high drive currents. As you know I’ve been more interested in assembling a driver from parts than modding other drivers. Even though that hasn’t been working out so well :frowning:

What I would do is strap Pin 5 (PWM) directly to VCC. Then I’d switch Pin 3 (Enable). [unless that didn’t work. Then i’d do it the other way around :stuck_out_tongue: ] Remember that this gives you no low voltage protection or anything else that the MCU would normally provide.

I’ve corrected the OP. Anyone who sees errors left over please let me know and I’ll fix’m.

Thanks for the info.
Anyway, I ordered some parts, i’ll post the results when I get it.

Thanks for the info, i’ll try connecting a momentary switch as soon as I get the LD-29 :slight_smile: just for fun.

A tiny10 still takes up a lot of space and requires many air-wires in order to splice it into the stock driver (Vcc, GND, PWM, BAT+). An LD29 driver already wastes a fair amount of space since it must be installed with a contact board. See below for a picture of the first generation adapter boards. They do not work, I became confused when laying them out. I have already ordered replacements. These boards should just reflow in place of the stock PIC and lift the ATtiny up by that much. The whole assembly should remain shorter than the height of the inductor.

The new generation boards on OSH should work okay?