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

222 posts / 0 new
Last post
fixed it
Offline
Last seen: 1 year 9 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

DavidEF wrote:
chouster wrote:
Wow, that’s cool. I wonder why nobody hasn’t done this before…

Probably a few reasons:
1) Only on/off possible, no PWM

About that, on the “nobody has done it before” theme… any idea why nobody has done software based PWM? Only because it has not been needed before? I understand the 13A has built-in PWM on two pins but from what I’ve seen of driver code, it spends most of its time idle so it shouldn’t be too much trouble to toggle any output pin on and off in a loop during that time. I haven’t thoroughly read the CPU’s specs so maybe there’s a catch but the way I see it, it should be possible to get some kind of PWM done on all pins.
fixed it
Offline
Last seen: 1 year 9 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

pilotdog68 wrote:
I'm down to a final few errors.
This is where two errors come from:
#define TURBO // Convenience code for turbo mode

The code expects TURBO to have a value, like BATTCHECK, STROBE, etc defined just below it. It was 255 in the initial code and that will do fine.

You also need to #define FET_PIN to something. eg:

#define FET_PIN PB4

If I followed everything correctly, which is uncertain given I'm overdue for some sleep Smile No guarantee it will work, I haven't read anything but the non compiling code.

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

Thanks for the help! I’m the opposite of a wizard at this stuff.

Minor point, but it would be better to use something like 245 for turbo instead of 255, so that 255 is still open to be used as a pwm value on the larger bank of 7135’s

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

chouster
Offline
Last seen: 7 months 2 weeks ago
Joined: 02/20/2014 - 15:05
Posts: 746
Location: germany

Mike C wrote:
chouster wrote:
Wow, that’s cool. I wonder why nobody hasn’t done this before…

I’ve made five channel drivers by putting the off time cap, voltage monitoring divider and the E-switch on the same pin. Nothing released though, still working on the 17mm version with four channels of AMCs and a FET on the fifth… and the five AMC channel driver in this light isn’t finished yet either: http://budgetlightforum.com/node/42886

I’ve read some of your posts around the forum and I think you’re a magician in what you do. Crazy good work! And I’d love beeing able to reflash my drivers directly in the light. When I said it hasn’t been doen before I meant three channels on a tiny13A. At least I don’t know of anything like that. In your other post, I think you confused PilotPTK with Bocian. Bocian was the guy that made that 105C-based tiny25V driver, he’s also admin of a polish flashlight forum, AFAIK. Threads of his can be found here and here.
fixed it
Offline
Last seen: 1 year 9 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

pilotdog68 wrote:
Thanks for the help! I’m the opposite of a wizard at this stuff.

Minor point, but it would be better to use something like 245 for turbo instead of 255, so that 255 is still open to be used as a pwm value on the larger bank of 7135’s


Yes, I missed that subtlety as the original BLF A6 firmware mixes FET PWM values and mode IDs in the same array. So there turbo needs to be 255 as it is used both as an ID and as a PWM value. This new version with TURBO in the array is definitely clearer (should be used in MODESNx2 too, I think). You may not be a wizard but you’re not half bad either if you can pick this up.
finges
Offline
Last seen: 17 hours 57 sec ago
Joined: 11/19/2014 - 14:50
Posts: 504
Location: Germany

Sooo with this driver it should be possible to do the following modes

Moon, Low, 0.35A, 2.1A, Turbo

where the last three modes are non pwm?

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

finges wrote:
Sooo with this driver it should be possible to do the following modes

Moon, Low, 0.35A, 2.1A, Turbo

where the last three modes are non pwm?


If you use 350ma 7135’s, yes. (380ma would give 0.38A and 2.28A). Or if you want the ‘high’ mode to be lower (like I do) you can just leave off some of the 7135’s on the back.

edit: and you can have the top 7135 on at the same time as the other 6, so technically your ‘high’ mode could be up to 2.66A

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

finges
Offline
Last seen: 17 hours 57 sec ago
Joined: 11/19/2014 - 14:50
Posts: 504
Location: Germany

Ok, great!

Mike C
Mike C's picture
Offline
Last seen: 14 hours 58 min ago
Joined: 01/22/2014 - 08:03
Posts: 2584
Location: Sweden

chouster wrote:
I think you confused PilotPTK with Bocian. Bocian was the guy that made that 105C-based tiny25V driver, he’s also admin of a polish flashlight forum, AFAIK. Threads of his can be found here http://budgetlightforum.com/node/27994 and here http://budgetlightforum.com/node/39747.

Oh yeah, the baby face avatar. Yep, sure got ‘em confused up, just as I suspected Smile Thanks to you and pilotdog68 for sorting it out… and for the nice comments, but I’ll stop hijacking this thread now I think.
pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

Mike C wrote:
…but I’ll stop hijacking this thread now I think.

I usually don’t mind it actually. Even off-topic chatter keeps the thread on the the main page and gets more attention. I like when people test/use something I’ve made.

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

finges
Offline
Last seen: 17 hours 57 sec ago
Joined: 11/19/2014 - 14:50
Posts: 504
Location: Germany

Hmm every link from the first page to oshpark brings me to their 404 page.

Edit: Is it possible to add a pass-through for an LED+ wire like in your DoubleDown driver?

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

PD I’ve tweaked the firmware you linked now compiles ok.
HERE

Pastebin                                      &nbs

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

finges wrote:
Hmm every link from the first page to oshpark brings me to their 404 page.

Edit: Is it possible to add a pass-through for an LED+ wire like in your DoubleDown driver?


Yeah sorry, I took down the links to make the upgrades I mentioned in post #47, but I haven’t had a chance to put them back up. Hopefully tonight I’ll have the links updated.

Sorry, I just don’t think there is any way to fit a big hole in this mess. The 20mm Rev1.1z does have the hole though.

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

Ok, post 1 is updated with new links to some boards and all links are active again.

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

pyro1son wrote:
PD I’ve tweaked the firmware you linked now compiles ok.
HERE

Good news, Gents! I just did a brief test this and I could only find one issue: turbo timer/stepdown isn’t working. Once that is fixed, I think we will be set. Mode switching back and forth between channel 1/2 and toggling FET on/off works perfectly.

That’s all the time I have tonight, more tests tomorrow.

Thanks for working on this Pyro, I really appreciate it.

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

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

No worries glad it works I’ll try look at the turbo timer later

Pastebin                                      &nbs

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

With the kind help of pyro1son and DEL we now have a working firmware. It is essentially BLF-A6 modified to work with the output configuration of this driver. It has not been extensively tested, but appears to work great so far. As uploaded, it is configured for testing correct driver function. You will want to change mode, turbo, and LVP settings before installing in a light. Here is the link.

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

Since the FW is working, I wasted no time in putting it in my S8.

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

kiriba-ru
kiriba-ru's picture
Offline
Last seen: 2 days 8 hours ago
Joined: 01/17/2016 - 02:34
Posts: 2128
Location: Russia

Can I use this driver`s hardware (with some modifications in software) to implement a locator function with blinking secondary red LED?

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

kiriba-ru wrote:
Can I use this driver`s hardware (with some modifications in software) to implement a locator function with blinking secondary red LED?

Yes

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

kiriba-ru
kiriba-ru's picture
Offline
Last seen: 2 days 8 hours ago
Joined: 01/17/2016 - 02:34
Posts: 2128
Location: Russia

May be I don`t understand smth, but where I can get full components list? Is it standart and needs only pcb, some parts kit like http://www.mtnelectronics.com/index.php?route=product/product&path=25_12... and several extra parts with MCU re-programming?

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

kiriba-ru wrote:
May be I don`t understand smth, but where I can get full components list? Is it standart and needs only pcb, some parts kit like http://www.mtnelectronics.com/index.php?route=product/product&path=25_12... and several extra parts with MCU re-programming?

Yes, that parts kit is most of it. It’s just missing the extra 7135’s and you will need to reprogram the mcu like you said

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

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

Is there someone subscribed to this thread who could help me on a driver mod? I plan on doing some testing today, but would really like some more input before I do. I am attempting to use the battery indicator circuit from one driver and connect it to another.
The details are here: http://budgetlightforum.com/node/44670#comment-892158

Sorry to poke my nose into this thread. If this is not appropriate, I appologize and please delete or disregard my post.

Thank you all…

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

In my Blue S2+ (link in Sig) I used the Rev 2 board, but it isn’t perfect so I made this one to swap into the S2+. This one won’t have a ton of uses, but it will work if you want to copy what I did.

TripleDown Rev3 on Oshpark

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

fixed it
Offline
Last seen: 1 year 9 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

The adapted STAR momentary firmware is ready for some testing. Patch is here . Compiled firmware is here .

This is of course completely untested but I think I was careful Smile It’s late as time ran away during some interesting R&D so I won’t be writing a manual. Hopefully the comments are enough. If not, feel free to ask about anything you don’t understand in there.

Oh and in case you’re not used to patches: put it in a file (say, SM.patch) and run something like “patch -p1 < SM.patch”.

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

Thanks! I’ll hopefully be able to try it tomorrow evening.

I’m going need some hand holding on the “patch” part though. I’m used to the way STAR was originally, I haven’t even figured out TK’s config files yet

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

fixed it
Offline
Last seen: 1 year 9 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

pilotdog68 wrote:
Thanks! I’ll hopefully be able to try it tomorrow evening.

I’m going need some hand holding on the “patch” part though. I’m used to the way STAR was originally, I haven’t even figured out TK’s config files yet


It doesn’t appear to use any of those config files. At least not the version I started from.

And a patch is just the difference between the original code and the new version, which is more compact than relisting the whole thing. But if you have trouble with it, this is the whole source.

pilotdog68
pilotdog68's picture
Offline
Last seen: 6 months 4 days ago
Joined: 05/30/2013 - 23:31
Posts: 6422
Location: Held against my will in IOWA, USA

fixed it wrote:
pilotdog68 wrote:
Thanks! I’ll hopefully be able to try it tomorrow evening.

I’m going need some hand holding on the “patch” part though. I’m used to the way STAR was originally, I haven’t even figured out TK’s config files yet


It doesn’t appear to use any of those config files. At least not the version I started from.

And a patch is just the difference between the original code and the new version, which is more compact than relisting the whole thing. But if you have trouble with it, this is the whole source.


Finally got a chance to build a driver and test this tonight, sorry for the delay.

It’s very close! For the most part it functions correctly, but the turbo timer steps down when channel 1 is at ‘255’ and it doesn’t step down on the new ‘Turbo/254’ (when the FET is on.) I haven’t tested any lvp function yet, maybe tomorrow.

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

fixed it
Offline
Last seen: 1 year 9 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

pilotdog68 wrote:
Finally got a chance to build a driver and test this tonight, sorry for the delay.

No worries, I have my own firmware project to keep my busy. And kids. And work. etc :] So take all the time you need, I’ll still be around to fix bugs.
pilotdog68 wrote:
It’s very close! For the most part it functions correctly, but the turbo timer steps down when channel 1 is at ‘255’ and it doesn’t step down on the new ‘Turbo/254’ (when the FET is on.) I haven’t tested any lvp function yet, maybe tomorrow.
I always forget the simplest things Sad Got it fixed and updated.
fixed it
Offline
Last seen: 1 year 9 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

The modified STAR dual switch could use some testing. Source is here and compiled firmware here .

The SRAM is nearly full because of the way the eeprom is read so you can add at most one extra mode. This looks easy enough to fix but I’d prefer if you tested this version before I introduce more potential problems.

The whole thing is now eerily similar to the STAR momentary code.

Edit: STAR dual switch seems to have buggy low voltage protection, at least from reading the code. It looks like it will step down from low to turbo. Better be careful with it in its current state.

Pages