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

Each driver build seems to behave a little differently, especially if you change the components used to build it. However, the firmware should work if you do a little calibration on it. Or it might work without any changes.

I generally calibrate firmware for a few things on each light:

  • OTC values for ~0.5s and ~1.5s button presses.
  • Voltage detection hardcoded values for 4.2V, 4.0V, 3.8V, 3.5V, 3.0V, 2.8V, and 2.7V. Makes LVP and battcheck work.
  • Lowest usable PWM level, for moon mode.
  • Other PWM levels, if needed.

For the OTC, I flash offtime-cap.hex and measure a few button presses, then plug those values into my target firmware.

For voltage, I flash battcheck.hex and hook the light up to a variable power supply plus DMM, then adjust it to each desired level. It blinks out values I can plug into other firmwares.

For moon mode, I put my best guess into the target firmware, measure it, then adjust up or down and reflash until it’s how I want it.

For other PWM levels, I can usually just plug in some lumen estimates into level_calc.py and it’ll give me the numbers I need.

Stock store-bought drivers will probably “just work” with the default values, but custom-built drivers tend to vary more and need more calibration.

Wow…nice guide. Thank you! I will flash the driver tomorrow with offtime…maybe it works out of the box. If not, I do your hints step by step. But nice to know that there are different “tools” which help to customize the firmware.

I’m using star off-time with stock adc values and a 22k ohm resistor, need to set a lower adc value or use 19.1k should work better.

This driver also works with star momentary? Where I have to solder the e-switch then?

Yes, for connection see this picture http://drjones.nerdcamp.net/lumodrv-connect.jpg

Solder it to the OTC pads

If I recall correctly, this driver has an unused pin, pin 3 (a.k.a. PB4). At least, that’s the unused pin on wight’s FET+1 driver. I think he used the same pin layout here, except for not using the second PWM channel.

So, if you configure your firmware to put the switch on PB4, and solder the switch wires to pin 3 and ground, it should work without sacrificing the OTC.

In the OP, it shows pin 3 next to the “W” in “WELLS”.

Or, of course, if you don’t care about the OTC, use those pads instead. OTC isn’t normally used with e-switches, and this will make it a lot easier to flash the driver again later.

Ok, thank you! Can I use the Standard firmware when I use the OTC pad? OTC goes to Pin2? I have to solder the switch to both ends of the otc place?

Maybe reprogramming to pin3 is also a good idea, I will think about it. Thank you very much!

Not sure if stock uses that pin the way you want, but changing a pin is usually as easy as changing one line of #define near the top of the file.

Ok I found it, but sodering to the pins of the attiny makes flashing on the board complicated. So using the otc pad is for me the way to go I think.

But I am not sure with the otc pads, are they connected to pin2 (#define SWITCH_PIN PB3)?

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

Is it necessary to leave c1 in place when i place a 10uF Cap on the zener place with a zener stacked on top?

Why is it better to replace R1 with 36K, the picture show a 22k resistor?

Thanks!

Which board revision are you building? You shouldn’t need two 10uF caps but I haven’t tried just one on wight’s board. I use RMM’s boards (from his MTN store) and you only place one 10uF.

The 36k resistor isn’t required if you already have a 22k. It just gives you more options with the ADC calculation for the LVP (low voltage protection). With the 22k and 2S (~8.4V) you end up being in the upper range of the ADC (limit of 255) with 6V LVP. If you wanted to have something higher for your LVP like 6.4V you would need the 36k resistor. You can see the calculations on RMM’s Google sheet that he so nicely shared with us before:

If you look, the 36k brings the ADC values more into the middle rather than the upper limit.

Ahh I understand. Then 36k seems to be very usefull! And the calculations, too :wink: Thanks!

I use this Layout (should be the same like in the picture here: 17mm & 20/26/27mm single-sided DD/FET driver release: A17DD-SO8 / A20DD-SO8 / etc):
OSH Park ~

I’am not sure now, if one cap 10uF is enough….

One 10uF should work. On the board you linked to, place the 10uF on the zener pads then stack the zener on top of the capacitor.

Thanks Richard! I will give it a try :wink:

The Zener direction is the same like printed on the layout? Cathode points to R2?

Yes, same as printed.

Works like a charm! Thanks

https://oshpark.com/shared_projects/OODIn7Cf

Can somebody confirm this as a working zener-layout? (no workaround)

Does anyone happen to know what could be causing one of these drivers to change modes on its own?

I made 50 of these last batch and they all work fine normally. I had even used one of them with an eswitch in the past and it was fine. However recently I tried using JohnnyCs dual switch firmware with them and this is what I get.
https://youtu.be/vw5rxIBh7_M

It will just sit there and skip upward in modes at random on its own. I tried multiple drivers and even assembled a brand new one and the result is exactly the same. I tried both 6 and 12v configs too with no luck.

I tried using the default firmware from JC and TomEs eswitch one and they both skipped. I had used toms before too and did not have this issue so the only thing I can think is that I was shipped a bad batch of components. Problem is I have no idea which part could cause this :(


Any one got an idea?