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

70 posts / 0 new
Last post

Pages

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA
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.  
 

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Edited by: wight on 07/08/2014 - 16:31
ImA4Wheelr
Offline
Last seen: 3 weeks 4 days ago
Joined: 02/03/2013 - 14:51
Posts: 7918
Location: SC

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.

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

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).

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

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.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

HiTiT
Offline
Last seen: 11 months 4 days ago
Joined: 06/30/2012 - 18:12
Posts: 98
Location: Israel

Wow great news!
Subscribed Wink

Can you take a photo of the black component?

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

HiTiT wrote:
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.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

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 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.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 month 1 week ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

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!

Lothar
Lothar's picture
Offline
Last seen: 4 days 2 hours ago
Joined: 10/26/2011 - 11:22
Posts: 504
Location: Stellenbosch, South Africa

Excellent work! Watching with a keen eye Smile

Current Collection: BTU: Shocker (3 x SST-40 @ 8A)Lumintop: BLF GT70 (CW Sliced), BLF GTmini; Solarforce: 2 x L2P (XM-L2 U3 2C @ 4A), MPP-1 (XP-L HI @ 6A), MPP-3 (3 x XM-L2 U2 2C @ 12A), M6 (Nichia 319A @ 6A), M8 (Cree XHP-50.2 @ 9A), 9x (9 x XM-L2 U2 1A @ 2A)

Coming Soon: Lumintop: BLF GT4; Sofirn: BLF-LT1;

Werner
Werner's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 10/19/2012 - 15:00
Posts: 3679
Location: Germany

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.

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Werner wrote:
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.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Werner
Werner's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 10/19/2012 - 15:00
Posts: 3679
Location: Germany

That’s nice.

HiTiT
Offline
Last seen: 11 months 4 days ago
Joined: 06/30/2012 - 18:12
Posts: 98
Location: Israel
wight wrote:
Pulling pin 3 to VCC and Pin 8 to VCC seems to work fine (maximum output).  
 

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. Shocked

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

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.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

HiTiT
Offline
Last seen: 11 months 4 days ago
Joined: 06/30/2012 - 18:12
Posts: 98
Location: Israel

wight wrote:
Crap. I’ve mislabeled them! And after I got on ima4wheeler about the same thing.
:~ sorry to hear that

wight wrote:
What you are thinking is fine

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?

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

HiTiT wrote:
wight wrote:
Crap. I’ve mislabeled them! And after I got on ima4wheeler about the same thing.
:~ sorry to hear that

wight wrote:
What you are thinking is fine

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 Sad

HiTiT wrote:
B.T.W
so without an MCU, this driver can work with a momentary switch connected between pin 3 to vcc and pin8 pin5 to vcc ?
I mean while pressed: light is on, otherwise: light is off. Shocked
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 Silly ] Remember that this gives you no low voltage protection or anything else that the MCU would normally provide.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

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

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

HiTiT
Offline
Last seen: 11 months 4 days ago
Joined: 06/30/2012 - 18:12
Posts: 98
Location: Israel

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 Smile just for fun.

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Werner wrote:
[snip]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.
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.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

HiTiT
Offline
Last seen: 11 months 4 days ago
Joined: 06/30/2012 - 18:12
Posts: 98
Location: Israel

The new generation boards on OSH should work okay?

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

HiTiT wrote:
The new generation boards on OSH should work okay?
v06 should work. I’ll test one when I get them.

EDIT: Here is an Eagle screenshot showing both sides of the board. The ATtiny is on the red (top) layer, the bottom layer sits on the driver board. Pin 1 is marked with an empty white circle.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

HiTiT
Offline
Last seen: 11 months 4 days ago
Joined: 06/30/2012 - 18:12
Posts: 98
Location: Israel

Is that real?
I paid 0.40$ for 3pcs incl. shipping.
Maybe they had a mistake on their website…

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

HiTiT wrote:
Is that real?
I paid 0.40$ for 3pcs incl. shipping.
Maybe they had a mistake on their website…
That’s correct. Smile

See my post #1059 in the Oshpark Projects thread for info on shipping.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 month 1 week ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

That’s what that little contact board was for in your OSHPark projects bin…awesome!

Will it need to be jumpered over to the old IC pads or are you going for a one for one dropin approach?

And no…teeny tiny boards are crazy cheap…this is why it’s only like $1.70 for 3× 15mm SK68 boards I designed

ImA4Wheelr
Offline
Last seen: 3 weeks 4 days ago
Joined: 02/03/2013 - 14:51
Posts: 7918
Location: SC

HiTiT wrote:

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. Shock

OH MAN!  I so like where you are going with that.  I've always missed being able to do manual pulsing (e.g. Morse code, etc).  I'm gonna add another momentary to my current mod for that.  Thank you!

EDIT: Love the adapter board wight.  Nice work.  Smile

HiTiT
Offline
Last seen: 11 months 4 days ago
Joined: 06/30/2012 - 18:12
Posts: 98
Location: Israel

@ wight & WarHawk-AVG

Yep, it is totally cool! it is so easy doing mods with such prices.

@ImA4Wheelr

No problem Smile It might be a nice project!
you may also use a reed switch instead of a clicky switch, it might be cooler – that’s what I plan to play with.
I have ordered some more components and LD-29.
I’ll try to make a nice mod when I receive it. H)

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

WarHawk-AVG wrote:
That’s what that little contact board was for in your OSHPark projects bin…awesome!

Will it need to be jumpered over to the old IC pads or are you going for a one for one dropin approach?[snip]

Smile I’m going for ‘dropin’. If we had to use jumper wires I’d just stick w/ a tiny10. You do have to file each one down. Once I had the non-functional v04’s in hand I filed down all 4 edges.
ImA4Wheelr wrote:
[snip] EDIT: Love the adapter board wight.  Nice work.  Smile

Thanks guys. I must have been not in my right mind when I did v04 of the adapter board. Hopefully I’m in my right mind now. Wink I’ve reviewed the board a couple of times and it v06 continues to look right, so I think we’re OK.

Since this PCB does not expose any of the bottom leads to your soldering iron I consider it similar to a MLF package. In my opinion the best way to install these is going to be hot air reflow onto a clean PIC landing pattern. Use desoldering braid to clean up all the old solder, then apply solder past, then reflow the PCB into position.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

I was reviewing the pinout just now to do the required STAR firmware modifications and realized that there’s a small problem with the adapter PCB for this application. The offtime cap is on pin 6, which the adapter brings straight through (to pin 6 on the ATtiny13A). Unfortunately there is not an ADC on that pin, it cannot be used for offtime.

Also, it seems that hardware PWM is only available on Pin #‘s 5 & 6! Lucky for us #5 is the PWM pin.

For the LD-29 Pin #2 is NC, so hooking the ATtiny up to that pin doesn’t do anything. Instead we’ll move Pin2 on the attiny to the #6 position on the PCB and not worry about losing any features. At this point the board is getting a little crowded:

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Cereal_killer
Cereal_killer's picture
Offline
Last seen: 4 hours 39 min ago
Joined: 07/22/2013 - 13:10
Posts: 3984
Location: Ohio

Damn I ordered 6 of the v6’s literally 10 minutes ago!

Still should work or no?

 RIP  SPC Joey Riley, KIA 11/24/14. Now I am become death, the destroyer of worlds.

wight
Offline
Last seen: 2 weeks 4 days ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Cereal_killer wrote:
Damn I ordered 6 of the v6’s literally 10 minutes ago!

Still should work or no?

Yeah, I expect it to work fine. You just can’t use the integrated offtime cap unless you do an airwire from Pin 2 to Pin 6.

Here is the v07 from the previous post – https://oshpark.com/shared_projects/iN0zkxJn

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Cereal_killer
Cereal_killer's picture
Offline
Last seen: 4 hours 39 min ago
Joined: 07/22/2013 - 13:10
Posts: 3984
Location: Ohio

So I would wire a cap to the ATTiny pin2 (or just a jumper wire from pin2 to pin6 to use the on board cap)?

And this uses stock off-time FW or the ports need changed?

Thx

 RIP  SPC Joey Riley, KIA 11/24/14. Now I am become death, the destroyer of worlds.

Pages