Update Oct 3: PD68 TripleDown/TripleStack - Tri-Channel Driver

Hmmm sound like there is something else wrong

FWIW, Ferrero Rocher is supposed to blink once and shut off when power is connected. Short and long presses should go through the modes in opposite directions. However, it also tries to use two pins for battery indicator LEDs, and that could be messing with the behavior.

I suspect that what happens is a short or long press cycles normally until you let go, then it tries to indicate battery status by turning on one or two pins. This causes the light to turn on another power channel at 100%, and it drowns out any mode changes you do afterward.

If you disable the battery indicator code, it’ll probably behave a bit better. But this at least suggests that the e-switch pin is physically working.

Been looking into it a bit more.

Mk4

nope sorry, tried it still no mode switching :frowning:

Sorry for the basic question,

Is there a driver that has a PWM above 8 kilohertz? I would like to shoot video with flashlights, but the pwm flicker isn’t good. Thanks.

Like this? NLITE, a free firmware for NANJG drivers

Nearly every firmware in the repository has PWM above 8 kHz. Click the link in my signature for more information.

Thanks to HarleyQuins SRK driver I now have a working e-switch firmware for this driver

I have the 20mm Rev2z board. If I am using a single cell, do I need to populate the zener pad?

Anyone know? I didn’t think it needed the zener if using with one cell. But I see that the new blf fet+1 includes a zener even when used with one cell. So IDK?

Never mind. I determined I don’t need it.

Well I build my first driver for good or for worst… Now I’m trying to sort through bistro triple down so I can flash it to this driver. This is the version optimized for two less, but I’m going to use all three channels on one xpl hi.

I know it’s late but none of my driver boards should need the Zener for single-cell.

I hope it works out for you!

Pilotdog68, under the 7135 on the top of the board is the trace that can be cut to separate the 7135s on the back from the fet on the front. The trace is small, would that small trace carry the current ok? It’s probably common, but I never thought about how much current goes through these traces til now.

Ahh man… This is hard! I have so many questions :confounded:
I just realized I need to change the pin layout in tks bistro tripledown firmware. The layouts between board versions are a bit different. Do I just start changing pin labels in the attiny.h file?

You would probably need to change a few lines in tk-attiny.h in the section about “TRIPLEDOWN_LAYOUT”.

It may help to have the attiny reference manual open, to see which pins have which internal names.

Also note that the PWM on pins 5/6 works a bit differently than on pins 2/3, so you may also need to edit the first page of main() if you move any parts from one of those groups to the other.

Ok. I wil give it a try. Thanks! :slight_smile:

So… In the attiny.h file do I need to mess with the output compare register if I change the pins? All three pins need changing. FET is on pin6, 8x7135s on pin5, and 1x7135 is on pin3.

And also, In the .c file, do I need to mess with the PWM counter in some way?

Let’s see… I think you can just rotate the assignment of names to values like this…

#define PWM_PIN     PB0     // pin 5, 6x7135 PWM
#define PWM_LVL     OCR0A   // OCR0B is the output compare register for PB0
#define ALT_PWM_PIN PB4     // pin 3, 1x7135 PWM
#define ALT_PWM_LVL OCR1B   // OCR0A is the output compare register for PB4
#define FET_PWM_PIN PB1     // pin 6
#define FET_PWM_LVL OCR0B   // output compare register for PB1

… and then I think it should work. But with 1x7135 on pin 3 (second PWM counter), your moon mode is probably going to suck. IIRC, that channel is locked at 31 kHz but moon usually needs to be significantly slower than that. If the lowest PWM level is too low, you’ll need to recalculate the ramps. And the lowest levels will probably still be more voltage-sensitive due to the short pulse time.

Thank you TK! I will give it a try.