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

731 posts / 0 new
Last post
pilotdog68
pilotdog68's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

mattlward wrote:
I will need to run thru LVP setting in the firmware for that change?

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

My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

pyro1son
pyro1son's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 03/21/2013 - 08:18
Posts: 432
Location: UK

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.

Pastebin                                      &nbs

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 39 min 25 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10654
Location: (469219) 2016 HO3

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.

vestureofblood
vestureofblood's picture
Offline
Last seen: 23 hours 23 min ago
Joined: 08/17/2012 - 15:21
Posts: 1980
Location: Missouri

RMM wrote:

When you're pulling high amps with an FET you can make the MCU glitch if the layout and components aren't just right.

About the SOS speed: there is no reason why the speed would be different on an FET driver than it would be on any other driver with the same MCU. Are you sure that you're flashing the same file and fuses?



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?

In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

RMM
RMM's picture
Offline
Last seen: 1 year 3 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

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.  

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

vestureofblood
vestureofblood's picture
Offline
Last seen: 23 hours 23 min ago
Joined: 08/17/2012 - 15:21
Posts: 1980
Location: Missouri

RMM wrote:

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.


In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

vestureofblood
vestureofblood's picture
Offline
Last seen: 23 hours 23 min ago
Joined: 08/17/2012 - 15:21
Posts: 1980
Location: Missouri

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


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?

In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 39 min 25 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10654
Location: (469219) 2016 HO3

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.

RMM
RMM's picture
Offline
Last seen: 1 year 3 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

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.  

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

vestureofblood
vestureofblood's picture
Offline
Last seen: 23 hours 23 min ago
Joined: 08/17/2012 - 15:21
Posts: 1980
Location: Missouri

RMM wrote:

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


In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 39 min 25 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10654
Location: (469219) 2016 HO3

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.

RMM
RMM's picture
Offline
Last seen: 1 year 3 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

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.

 

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

vestureofblood
vestureofblood's picture
Offline
Last seen: 23 hours 23 min ago
Joined: 08/17/2012 - 15:21
Posts: 1980
Location: Missouri

Thanks RMM.   X7Rs on the way..

In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

vestureofblood
vestureofblood's picture
Offline
Last seen: 23 hours 23 min ago
Joined: 08/17/2012 - 15:21
Posts: 1980
Location: Missouri

wight wrote:
v043 !http://photo.jesusthepirate.com/blf/17mm_DD-S08/v043/top.png!:https://os... !http://photo.jesusthepirate.com/blf/17mm_DD-S08/v043/bottom.png!:https:/... https://oshpark.com/shared_projects/SQs9Pu4O * Updated top silk w/ L+/- identifiers & orientation mark for MCU. * Updated MOSFET footprint including tstop and tcream. Tcream isn't perfect but it's better than the old version (which put down way too much). * Updated spring bad on bottom. Main circle is exactly 8mm, the spurs extend to 11mm (for soldering on a 10mm spring). I'm still open to suggestions about what spring sizes people use. * Moved the lone via closer to center of board. Via is now w/in 0.5mm of being centered. * Updated bottom silk to fit new spring pad. The via being 0.5mm away from centered is bothering me. I'm aware that I can improve the appearance of the bottom by rotating the spring pad & silkscreen a little more. That will likely happen in a future version.



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.

In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

Mitko
Mitko's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 09/19/2014 - 05:20
Posts: 1537
Location: Bulgaria

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

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

bmwsancho
bmwsancho's picture
Offline
Last seen: 6 months 3 days ago
Joined: 05/08/2015 - 12:56
Posts: 537
Location: California, USA & EU

Mitko wrote:
A usefull mosfet update: i got my hands on AP1A003GMT-HF-3TR MOSFET lately (PMPAK®5×6, 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.

Mitko
Mitko's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 09/19/2014 - 05:20
Posts: 1537
Location: Bulgaria

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

Tom E
Tom E's picture
Offline
Last seen: 4 hours 35 min ago
Joined: 08/19/2012 - 08:23
Posts: 14199
Location: LI NY

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.

shrick
shrick's picture
Offline
Last seen: 2 years 9 months ago
Joined: 10/15/2014 - 07:15
Posts: 699

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

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

Thanks Mitko Wink

Tom E
Tom E's picture
Offline
Last seen: 4 hours 35 min ago
Joined: 08/19/2012 - 08:23
Posts: 14199
Location: LI NY

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

Mitko
Mitko's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 09/19/2014 - 05:20
Posts: 1537
Location: Bulgaria

Hm.. strange, i posted those cause in Europe they are cheap( 52cents with our huge taxes) and good, was thining they would be an easy find in the US

At least we have something that cant be found in US! Wink

P.S

I am on a night swifth making some of those atm btw, hunters got pretty active lately, maybe cause of the Xmass

Tom i have a question, do you also like me recieve every time those with a different minus contact area thickness?

Those on the photo got thick minus contact rings, sometimes my order comes with thin ones, sometimes even the contact circle is covered completely and i have to rework them

vestureofblood
vestureofblood's picture
Offline
Last seen: 23 hours 23 min ago
Joined: 08/17/2012 - 15:21
Posts: 1980
Location: Missouri

vestureofblood wrote:

wight wrote:
v043 !http://photo.jesusthepirate.com/blf/17mm_DD-S08/v043/top.png!:https://os... !http://photo.jesusthepirate.com/blf/17mm_DD-S08/v043/bottom.png!:https:/... https://oshpark.com/shared_projects/SQs9Pu4O * Updated top silk w/ L+/- identifiers & orientation mark for MCU. * Updated MOSFET footprint including tstop and tcream. Tcream isn't perfect but it's better than the old version (which put down way too much). * Updated spring bad on bottom. Main circle is exactly 8mm, the spurs extend to 11mm (for soldering on a 10mm spring). I'm still open to suggestions about what spring sizes people use. * Moved the lone via closer to center of board. Via is now w/in 0.5mm of being centered. * Updated bottom silk to fit new spring pad. The via being 0.5mm away from centered is bothering me. I'm aware that I can improve the appearance of the bottom by rotating the spring pad & silkscreen a little more. That will likely happen in a future version.



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.



Mitko is this the version of the board your using?

In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

Tom E
Tom E's picture
Offline
Last seen: 4 hours 35 min ago
Joined: 08/19/2012 - 08:23
Posts: 14199
Location: LI NY

Boy, I'm confused... I'm only using FET+1 drivers - wights v009 version, same one that the BLF A6 driver was based on. I really love having the single 7135 to have very efficient low modes.

Think what you (VOB) and Mitko have are FET only boards - I never ordered that specific board - I used to use the ones in the OP though. OSHPark support told me they've had these weird masking problems with wight's boards (a few) intermittently - they dunno what's causing it, couldn't explain it. I got a batch in once with pads covered, asked them, and they rushed out a new set free of charge, even though I could scrape off the contacts and salvage the bad ones -- OSHPark has great support, try them.

For the masking of the ground (I think you mean the outer ring?), don't think I've seen that specifically, accept the set of boards that came in that one time completely covered, but it wasn't this board.

Mitko
Mitko's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 09/19/2014 - 05:20
Posts: 1537
Location: Bulgaria

Actualy that masking isnt that big issue….just asking, OSHPARK are quite good to me anyway

Yeah i am using mostly v44 cause most of my stuff simply dont need fet+1 drivers, plus i `ve discovered something interesting: some XPG2 emitters dont like FET+1 driver, for instance S2 1A from FT- i have absolutely no idea why

Hunters flashlights usualy dont have that low mode Smile 700ma, max, battery check, things like that…ppl got annoyed with too many modes

But ofc i am using Fet +1 too, just not that often, like 6-7 monthly

Ordered Attiny 85s btw, have to try our your new firmaware

Thanks for developing it TOm, greatly appreciated

Tom E
Tom E's picture
Offline
Last seen: 4 hours 35 min ago
Joined: 08/19/2012 - 08:23
Posts: 14199
Location: LI NY

 Thanks Smile. Ahh - true, good point bout the simpler mode sets. For tail power switch lights, the high mode count and advanced features can be frustrating - for me it's more awkward to deal with than a side switch., though I'd still like to have 2 e-switch's.

Can't recall - was there any advantage to this PCB alternate layout vs. the one in the OP?

VOB - sorry, what exactly is the 1S and 2S driver, and what is a Cznr pad? Think something to a with a cap and/or zener - not sure. Couldn't answer your question cause couldn't understand it.

vestureofblood
vestureofblood's picture
Offline
Last seen: 23 hours 23 min ago
Joined: 08/17/2012 - 15:21
Posts: 1980
Location: Missouri

Thanks Tom, I will clarify.   By 1S and 2S I mean can the board be configured to use 1 cell or 2.   On my drivers and on RMMs there are 2 separate places to put the 10uf cap.   One place is used if you make the driver for a single cell ( C1).   The other place is for putting the 10uf cap if the zener diode is use for the 2S board (CZNR).

On this board I see only one place show for the 10uf cap so I am wandering if the board works in both configurations or only when used with a zener diode.

In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

Tom E
Tom E's picture
Offline
Last seen: 4 hours 35 min ago
Joined: 08/19/2012 - 08:23
Posts: 14199
Location: LI NY

Ok - think everything is there - the C1 pad, the D1 pad to the right of C1 (unmarked though, but indicated by the arrow), then the zener pad to the right of that. Should be the same # of pads. I don't know off hand how to assemble a zener driver (for 2S). Can't find a pic...

Oops, this is one I did for a Roche LS01:

So the 200 ohm resistor goes on D1, and the cap stays where it normally is on C1, and the zener of course on the zener pad. At least this is how I did it, what I thought...

The more I look at the v043 design/layout, the more I like it. Simple but everything is there. Main problem I have is pin #3 and pin #5 are not wired, and would like to use them for LED indicators, so even if they went to a small pad, it would be great.

Update:

Ok - now I understand... You are talking about Richard's Mtn-17DD driver v1.11 here: http://www.mtnelectronics.com/index.php?route=product/product&path=25_122&product_id=272

That board has a CZNR pad that the 10 uF cap is moved to when in the zener (2S) configuration. Interesting, so he moves the cap after the resistor......  Hhmm... I'm thinking Richard had a good reason for moving the cap so it's after the 200 ohm resistor, and not before. If it's before, I'm thinking it's getting 8V from the 2 cells, but if it's after, it's at 4V, like the MCU... Oh boy.

Dunno - Richard, or someone more knowledgeable needs to address this.

RMM
RMM's picture
Offline
Last seen: 1 year 3 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

For the zener mod. configurations it is best to have the capacitor after the resistor and next to the zener diode.  If you don't, you will get a voltage blip on a lot of startup events that will wig out the MCU.  Wight acknowledged that this is a potential issue in the OP, and I found out with my very first revision boards that it doesn't work reliably unless you change the circuit, so in my second revision boards I added the second pad so that you could zener mod without having to stack anything.  

The only reason we don't always run the capacitor closer to the MCU is because driving the FET causes an MCU over voltage boost if you have the capacitor after the diode---the inductance from charging the gate charges the capacitor to 6V+ and it has nowhere to go with the diode blocking the backwards flow.  It was comfychair who first scoped this out, and I have since verified his results.  

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

Tom E
Tom E's picture
Offline
Last seen: 4 hours 35 min ago
Joined: 08/19/2012 - 08:23
Posts: 14199
Location: LI NY

Good to know Richard, thanks! I couldn't find it mentioned in the OP though. So, my wight driver in the Roche LS01 pictured in post #627 has it wrong because the cap is still on the C1 pad, before the resistor, but wight's boards don't have the extra pad your driver has. So probably best thing to do on his boards is stack the cap with the zener?

The LS01 seems to work fine, but probably because it happens to be tolerating the voltage blip?

RMM
RMM's picture
Offline
Last seen: 1 year 3 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

It really depends on the light and components.  I built some that worked, then some wouldn't work right.  Alex then tried some and found pretty much the same thing.  Moving the components closer together solved most, but not all, issues.  Stacking or changing the layout will work 100% of the time, which is why I went that route.  

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

Pages