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

I remember some Polish(?) guy made a PIC based driver that did about the same about a year ago, and was going to put a mini USB interface on it. I never saw if that project ever got finished. Anyhow, it was his driver and ideas that planted the seed in my head, but at the time I had no skills to make drivers. Anyone know if those drivers with mini USB interface ever became a reality? I’ve probably jumbled up a bunch of different people and projects, I don’t really remember.

If I’m hijacking the thread, let me know and I’ll shut up.

This is the one:

The OP hasn’t been online in over a year, it probably won’t ever happen. It would have been pretty freaking awesome honestly. I wish the pictures would load so I could see how it was laid out.

I think my earlier issues were due to me having no idea how to work with how TK has the new FW set-up (with .h files and such). So I took this and moved all of your changes over to an earlier version of blf-a6 that I can comprehend. Here is a diffcheck of what you posted on the left, and what I just threw together on the right.

I’m down to a final few errors.

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.

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 :-) No guarantee it will work, I haven't read anything but the non compiling code.

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

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.

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.

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

Ok, great!

Oh yeah, the baby face avatar. Yep, sure got ’em confused up, just as I suspected :slight_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.

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.

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?

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

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.

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

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.

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

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.