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

222 posts / 0 new
Last post
giorgoskok
giorgoskok's picture
Offline
Last seen: 8 hours 51 min ago
Joined: 11/13/2015 - 10:46
Posts: 2659
Location: Greece

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…

finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

pilotdog68 wrote:
e-switch and dual-switch firmware adaptations are in the works (possible already done, I just have been to busy to properly test them).

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.

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

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.

Pastebin                                      &nbs

pilotdog68
pilotdog68's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 05/30/2013 - 23:31
Posts: 6419
Location: Held against my will in IOWA, USA

“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

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

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

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

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

Pastebin                                      &nbs

LightRider
LightRider's picture
Offline
Last seen: 7 months 4 weeks ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

pyro1son wrote:
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.

Nice clean looking code! Thanks!

finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

Ok, so I built a board and tested it with a working rear clicky firmware. All fine and working 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.

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

Which code did you use?

Pastebin                                      &nbs

finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

I tried both, just changed the modes to

#define MODES 0,0,0,255,254
#define ALT_MODES 1,90,255,255,0
#define MODE_PWM PHASE,FAST,PHASE,PHASE,PHASE

pyro1son wrote:
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.

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

Just make a fix in Mk2 there was a slight issue with some of the brackets. Try now.

I will try and get some time to test this myself but wont be for a while

Pastebin                                      &nbs

finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

Thanks, I’ll try the updated Mk2 version.

finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

Ok tried it and still the same problem, the driver does not switch modes.

——————————

I also tried changing the switch_pin and fet_pin, because the switch is connected to pin 2 and the fet to pin 3 right?

#define SWITCH_PIN PB2
#define FET_PIN PB3

But also no luck with that …

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

Hmmmmmm,

I’ve tried something more like the current clicky switch FW HERE

Can you make sure that TK’s Ferrero_Rocher works on your driver first.

Pastebin                                      &nbs

finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

Ok I tried your new version but still the same, it starts in direct drive and won’t change modes.

I then downloaded the ferrero rocher hex file and flashed this and it also behaves strange.

If I connect it to the battery the led flashed one time very short and then it is dark again.

If I connect ground to pin 2 it cycles through the modes staring high to low.

If I connect ground to pin 2 for a short time it is at direct dirve and stays there.

Strange maybe I did something wrong with the driver.

The only firmware that I get to work properly is the one in the op for a rear clicky light.

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

Hmmm sound like there is something else wrong

Pastebin                                      &nbs

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

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.

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

Been looking into it a bit more.

Mk4

Pastebin                                      &nbs

finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

nope sorry, tried it still no mode switching Sad

Izombie
Offline
Last seen: 1 year 9 months ago
Joined: 10/13/2015 - 22:11
Posts: 17

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.

LightRider
LightRider's picture
Offline
Last seen: 7 months 4 weeks ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA
ToyKeeper
ToyKeeper's picture
Offline
Last seen: 30 min 57 sec ago
Joined: 01/12/2013 - 14:40
Posts: 8260
Location: (469219) 2016 HO3

Izombie wrote:
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.


Nearly every firmware in the repository has PWM above 8 kHz. Click the link in my signature for more information.
finges
Offline
Last seen: 1 day 2 hours ago
Joined: 11/19/2014 - 14:50
Posts: 485
Location: Germany

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

https://github.com/HarleyQuin/Flashlight-Firmware/blob/master/STAR_momen...

LightRider
LightRider's picture
Offline
Last seen: 7 months 4 weeks ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

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

LightRider
LightRider's picture
Offline
Last seen: 7 months 4 weeks ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA
PPDB22 wrote:
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?

LightRider
LightRider's picture
Offline
Last seen: 7 months 4 weeks ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

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

LightRider
LightRider's picture
Offline
Last seen: 7 months 4 weeks ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

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.

pilotdog68
pilotdog68's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 05/30/2013 - 23:31
Posts: 6419
Location: Held against my will in IOWA, USA

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!

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

LightRider
LightRider's picture
Offline
Last seen: 7 months 4 weeks ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

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.

LightRider
LightRider's picture
Offline
Last seen: 7 months 4 weeks ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

Ahh man… This is hard! I have so many questions Sick
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?

Pages