17mm & 20/26/27mm single-sided DD/FET driver release: A17DD-SO8 / A20DD-SO8 / etc

I always recommend configuring LVP to each driver, but usually LVP is configured around 19.1k lately.

If you are able to flash firmware I would highly recommend flashing the Batt check firmware first. I’ve always had issues with it stepping down way too early or some odd behavior if I neglect to do so. This will give you the right LVP values.

Yes, the battcheck thing is highly recommended if you want it to respond correctly to low voltage or if you want it to have a working battcheck mode.

Flash battcheck onto the driver, measure a near-empty cell, measure a near-full cell, save the values to a file, run a script on that file, and plug the values into your target firmware. Then build and flash the target firmware.

For example, I measured my Convoy S7 at 4.09V at 3.15V. The ADC values were 179 and 136, respectively. So I saved those to a file:

readings/tk-s7.volts contains two lines:
179 - 4.09V
136 - 3.15V

Then I can run a script to calculate the ADC values it should see at various voltages:

(~/src/torches/trunk/ToyKeeper/battcheck/)-]> ./battcheck.py readings/tk-s7.volts 
#define ADC_44     193
#define ADC_43     189
#define ADC_42     184
...
#define ADC_22     93
#define ADC_21     88
#define ADC_20     83

You may need to change the format, depending on which firmware you’re using… but it should include usable values for everything from 2.0V to 4.4V.



Can you clarify what fuses are? Are they something that would be coming along with any of the open source trunk firmwares and are unique to each firmware, or are they something that is set inside AVR that is used for every file?

0xFF 0x75 are the standard fuses for most attiny13a firmware, including the dual switch firmware you've mentioned. I don't think it's the fuses.



I dont think it is either. I am starting to lean toward it being the layout on my board. I ordered some of yours and some of your components so I can try and pin down the problem.

I dug out a board I had of yours from a long time ago and it was still populated with mostly your components ( accept for some I had robbed) and it eliminated the slow strobe I was getting.

I needed a working driver with strobe asap so I did no other testing yet.


Ok, I am making some progress now.

I do think a dirty trace is part of my problem. Starting with the dual switch firmware.
http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/view/head:/JonnyC/STAR/STAR_dual_switch/STAR_dual_switch.c


Your board with my components does much better. I still get skips or auto changes but it cut it by about 90% on the 2 cell board. ( even mine worked fine with the 1 cell setup)

Using your boards and your components reduced this further ( another 5 % or so), but i could still get it to change modes on occasion just by touching the end of the switch + wire with my fingers.


What I am wandering now is this. Do you think that I might be able to reduce that over sensitivity by changing the firmware a little? I see that there is a place where the amount of time considered to be a "long" press can be changed. How about if I changed what is considered a "short" press or a click to be a few milliseconds longer?

Do you know which line of code would need to be modified to do this?

EIDT: Also is there a rampdown function for the turbo timer on this one, I did not see anything to set it?

If you handle that in firmware, you’re probably looking at adding or extending some de-bounce logic. By default, it requires four 1s in a row before it considers the button press, but you can make that longer.

I still think that something is wonky. Firmware fix is just a bandaid for it. I would add some more capacitance to it and see what happens.

Also, that switch behavior with it unhooked is seen in a lot of drivers. I can often get them to change modes by touching the reset pin, even without any wires attached. Your body has enough charge sometimes to do some funky stuff. Try it with a real switch hooked up and make sure that's not the problem.



Your correct again. Using a real switch isolated by a rubber boot did complete the task.

It appears you may also be using better caps than I am. Since the switch issue was solved I did not try this on an e-switch board, but when I switched the cap I had on my board to an 11uf robbed from another it actually helped my strobe function issue almost as much as using one of your base boards. No idea why, but glad it helped.


Would you mind telling me what brand/part number of cap you use for these boards?

Also I think the FET your using might be different. Can quite read the numbers, but this is the one I use.
http://www.mouser.com/Search/ProductDetail.aspx?R=PSMN3R0-30YLDXvirtualkey66800000virtualkey771-PSMN3R0-30YLDX


As long as you mentioned it… I recently ran into an issue with strobe too. Strobe modes were actually making the driver reboot.

I thought it must be a flaky diode, or maybe C1 was getting overloaded, or maybe I had a weak solder connection… but no.

It turns out the issue was a weak spring. I guess going from zero to 100% FET in a single clock cycle was enough to literally knock the spring off the cell, for just long enough to interrupt power and cause a reboot.

I have used several different capacitors depending on availability. Regardless, you want a 10V+ at least X6S capacitor. X7R or X7S is even better. Preference should also be given to 10% instead of 20%. The ones I sent you are 16V X6S 10% Murata. I usually use Murata (Japanese made) but there are lots of good manufacturers; just don't buy Y5V capacitors or capacitors from unknown sources. The cheaper capacitors suffer from more DC bias derating, temperature derating, and their lifespan isn't as good. When you're building an expensive driver or light it's worth it to spend the extra pennies and get a capacitor that will go the distance.

Here are a few suitable capacitors.

I also use the PMSN3R0-YLDX and also the PSMN4R0-YLDX depending on the board and what I can get. There was a while when the 3R0 was unavailable so I had to buy some 4R0.

Thanks RMM. X7Rs on the way..




I was wandering if anyone knows, will this board work for both the 1S and 2S driver? The boards I use now have 2 different pads for the 10uf cap C1 and Cznr. I only see one spot on this.

A usefull mosfet update: i got my hands on AP1A003GMT-HF-3TR MOSFET lately (PMPAK®5x6, INFO HERE)

Using this one vs the default recommended i got steady 5-8% better high amps on both XPG2/XPL emitters

thanks for letting us know. Any hint where you got them from? I recently ordered the board vestureofblood posted above and all I am missing is the FET. not sure which ones/where to get them from.

Since you are in the US try MNT or Mouser( Element 14 aka Newark NEVER- bloody thieves they are), or Ali for the default ones

Those that i mentioned came from a local EU vendor but i am sure Mouser have those too, bought them mainly for their price…with the vat( we do love vat in EU, 22) and tax( 4.5) 52 cents/pc :bigsmile: …and they turn out good ones

Thanks Mitko! I'll be checking those out too. Sounds like a real nice bump for those high Vf LED's, I assume better than the SIR800DP.

Thanks Mitko :wink:

Can't locate those MOSFET's anywhere. The manufacturer, APEC, doesn't seem to be popular. Can't find them on Mouser or DigiKey.