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

Nice work! I'm taking a snapshot of that.

Yea, but might be a way of keep'n the PWM clock running? We talked about methods of doing indicator LED blinks in a power saving mode. You can keep the WDT running, I believe, and if you set the frequency lower, could wake up on occasion then a blink for example to show low voltage, then back to sleep. Don't think it would take much power, not as much as keep'n the full processor running all the time. Haven't had time to pursue this though. The best use of it would be for reducing output in standby mode, but if it takes too much power, than not good. I believe you make good use of this though in the Rocher F6 driver, maybe not in standby, not sure.

Last I checked, at least on tiny13 (for fancy lighted tailcaps), I recall there being no way to keep PWM running while asleep. It uses the main processor as its clock source, normally, so when that clock is off it means PWM is off too. You might be able to do it with an external clock source, but we don’t have one.

About standby mode, I don’t recall exactly what I did in Ferrero Rocher to dim the indicators in standby mode, but I think it involved abusing a bug in the attiny. IIRC, it’s not supposed to do that. It normally sets the pin high or low (on or off), but I found a third state which produced a much dimmer glow. I’d have to check the sources and reference manual to remember what exactly it’s doing.

Could someone explain to me now I can adjust the firmware to include a mode with 0 output. I have a lucidrv driver from dr jones and I can program one of the mode groups to include zero output. Idk if it is a bug or if it was intentional, but I’ve found it works great for some of the hunting lights I’ve been making. This way the hunter can turn the light off and on with a quick noiseless tap.

Anyway, is this an easy thing to do?

In bistro-tripledown, you should be able to get most of the way there by adding a 0,0,0 entry to the ramp tables then adding that mode index to a mode group somewhere. However, that likely won’t turn the light completely off. The third power channel seems stuck in “fast” PWM mode, which lights up a little bit even at 0.

Alternately, you could define a special no-output mode, assign it a number, put that number into a mode group somewhere, and add a special case to handle it (like how strobe works). It would just need to set all three PWM pins to stop sending a signal. Maybe even put the MCU to sleep to reduce power use more. This will likely require looking a few things up in the attiny reference manual though…

Eeeeek… Sounds a little too deep for me at the moment. However, the partially off may work well enough. It sounds like its just a matter changing some code that already exists. I may give that a try.

Ok. Can I change the first ramp entry from 3,0,0 to 0,0,0? and if I want to put that into a mode group, I would enter a 1 where I want it to appear. So I could change the first mode group to 1,40,0,0,0,0,0,0 and that would give me one faint glow mode and one high mode. Am I correct?

Yes, that should work. If you still want moon mode though, you should probably edit the thing which adds moon to set it to level 2 instead of 1.

Or you could just use “moon” as the “off” mode, which would only require setting the first level to 0,0,0.

If I left the moon settings as is, could I then use the moon config toggle to rather toggle the false off mode? I’m trying to think what to call a fake off mode:) have others talked about this concept for hunters or others needing an off without a click?

Yes, you could simply set moon to “off” and use it otherwise the same.

Ordered some v2 boards today .
In the bistro-tripledown.c , do i need to change something to flash it on a attiny25 ?

thanks pd for the boards and tk for the fw .

Bistro-tripledown is intended for attiny25, but after verifying the hardware works you’ll probably want to change some things in the code. It’s still configured more for testing at the moment, and less for actual use. You may also want to re-calculate the ramp, depending on how bright your host is.

Thanks tk .
I will probably need your help in modifying the code , or some tips , but i will ask when i have the drivers ready…

Any news about this?

I would like to use this driver in a dual switch light (modified Courui D01)! Control the modes with the e-switch and on off via rear switch with mode memory.

Not tested just quickly put together during lunch break.

http://pastebin.com/f11HDPZw

Feel free to give it a go

Mk2 Version here

Not sure which will work best.

“fixed it” also posted some code a couple pages ago that I still haven’t gotten around to testing.

Flashlights have been on the back burner for awhile now

Thanks pyro1son, I’ll give it a try.

I see that #define ALT_MODES is commented out, do I need to remove the comment?

For example, if I would like to have 5 modes I would write the following?

#define MODES 1,90,255,255,255
#define ALT_MODES 0,0,0,255,0

So I would get moon, low, single 7135 on full, single + secondary 7135s on full, FET ?


edit: mmh I think with this config I would get the Turbo mode in mode 3 already. So it would be good if I could write

#define MODES 1,90,255,255,TURBO
#define ALT_MODES 0,0,0,255,0

use ALT_MODES for the single 7135
MODES for the larger bank
put 254 in MODES for the FET turbo and 0 in the ALT_MODES

I’ve commented in ALT_MODES

Nice clean looking code! Thanks!

Ok, so I built a board and tested it with a working rear clicky firmware. All fine and working :slight_smile:

Then I uploaded the new dual switch firmware and soldered a small cable to the outer ring.

I connected it to a battery and it starts in direct drive (=the highest mode).

If I touch the otc pad (=pin 2) with the small cable it should change modes right?

Anyway, nothing happens. I tried a few other pins on the attiny, but only the fet pin (=pin 3) did lower the output and as soon as I removed the small cable it was at direct drive again.

I tried both firmware versions and also tried it with and without the otc cap, because this is not needed in a dual switch light right? But no difference, I can’t get it to switch modes.

Here is a pictures of the driver, sorry it is a little bit dirty looking now.

Which code did you use?