LED drivers and Accessories you want, but don’t exist

Yeah, but I ordered the wrong LDOs, so for now it’s 1S only. I ordered the TPS706 instead of the TPS709. They are the same, just the maximum input voltage is different.

This was also pretty much exactly the control scheme we came up with for the Texas buck. If you're going to have analog output that gets compared to an external reference (it does), of course you're going to need an LDO. Well, I suppose you could compensate PWM value for the battery voltage in software, but, and I think Schoki pointed this out in other discussion, it's likely to not be very smooth or could even oscillate, and of course you need the software, a pretty large table to get good resolution, or likely some math libraries, either way it would probably need that better chip and more work. And how do you compensate 30% battery level changes at a PWM value of 2? Probably ok if the light gets dimmer with low bats in moon you might not mind, but it's a bit sad if a boost driver can't even do moon without voltage sag.

Hey Mike C, are there any major gotchas with moving software to that chip? I assume one should review all the matchups between I/O pins and clocks, ORCX etc ADCMUX etc, mostly just header define stuff aside from possibly clock modes and speeds, Obviously there are some new sleep modes available. It doesn't seem like porting software should be painful, no?

Are you using for those this Attiny package?

https://www.mouser.de/ProductDetail/Microchip-Technology-Atmel/ATTINY85-20MUR/?qs=sGAEpiMZZMvqv2n3s2xjsduPWajY%252b7cdD%2FyGmvLk9iQ%3D

Yes, the 20M1 package, but I use the tiny25v, and they seem to be rev E and F (85°C and 125°C versions) at mouser

if this driver works well with 5-6A this would be definitely worth building

BTW, that is the parts cost?

The parts cost for this buck or boost driver is likely 10€
Makes more work to place the parts on it
The tiny pins of the parts require to get a stencil for the solder paste

This would bump the price quite high

There is high and there is high. If we want near-Zebra efficiency, double output and on top of it better firmware I don’t think it’s going to be a bad deal. :slight_smile:

I was using the 841 before but got tired of always having to optimize my code to fit into 8kb. I’ve also found the 1634’s power down modes better, for OTSM and E-switch only drivers. However, the 841 had en advantage that I miss, the PWM channels could be configured and assigned to any IO pin. The 1634 has the PWM pins fixed.

Ultimately I chose the 1634 because it’s currently the only 20 pin 4x4mm package with 16kb programming space that is easily available to me. I find 20 pins in 4x4mm to be as small as I want to go for hand mounted hot air soldering. I don’t want to go down to 3x3mm or 24 pin 4x4mm, the pins are tight enough as they are and I’ve had a few issues with shorts so I’m not all that interested in the 1616 or 1617.

I didn’t find porting the software painful, it was just something that had to be done. I’ve been using it for a few projects and am happy with it: Project Gemini: Yet another headlamp mod. Not a cheapo this time though. and Mike C drivers: v8 series, ATtiny1634 based.

The parts cost more than 10€. I sometimes bought more parts than I needed (for example 4 MP3431, or 4 of each tiny25v version with the right package, to hopefully get rev E parts), and it cost me around 58€ (for 3 to 4 drivers). If you just buy the necessary parts for the driver, and more sets, it will be cheaper. Idk, maybe 15€ less (so 43€ for 3 drivers, without boards).
And 3 boards cost 5$, I will make it a little bit smaller for less sanding.

BTW, here’s a programming socket for $40 (free shipping to my place):
https://www.aliexpress.com/item/QFN20-MLF20-WLCSP20-Adapter-IC550-0204-009-G-Programming-Socket-IC-Pitch-0-5mm-Clamshell-Chip/32676558392.html?spm=2114.search0104.3.10.H8ZL1Q&ws_ab_test=searchweb0_0,searchweb201602_1_10152_10065_10151_10344_10068_10345_10342_10343_10340_10341_10171_10541_10562_10084_10083_10561_10304_10307_10301_10060_10155_10154_10056_10055_10539_10537_10312_10536_10059_10313_10314_10534_10533_100031_10550_10103_10073_10551_10102_10552_10553_10554_10557_10142_10107,searchweb201603_25,ppcSwitch_2&btsid=aaf308f6-4c9a-41ec-88f4-177c5a275951&algo_expid=989691e9-b513-44ae-9744-c9d3b7ee472f-1&algo_pvid=989691e9-b513-44ae-9744-c9d3b7ee472f

If you only use those, the MCU has to come off the board if you later want to update the firmware. I still think it’s better with vias on the board for acupuncture style flashing, providing that you can fit the vias. As a driver and firmware developer I make sure to fit them myself:

hmm sometimes these quotes won’t die after a link.

PWM's aren't even fixed on the attiny25. See my bistro-HD code, especially the timer interrupts. Ok, of course hardware PWM is fixed, but you can do whatever you want with interrupts. Only issue is I may recall those chips can do hardware PWM in some nice sleep modes, and that wouldn't work so well with software PWM. Mostly though I don't mind clocks being tied to pins. There's a point where there's too many options. That many pins in that small a space doesn't sound too easy. 8kb not enough for a flashlight? Wow. You must have run with that plan to accept data through light from the led and setup a TCPOFL network. If you want to do a lot of dynamic stuff like better regulations of various types I suppose I can see it though. Narsil is about maxed out now.

The vias are nice of course but on this boost driver, I'm not sure there's a way. Really though flashing a bunch is mostly for development, on my EDC I'd prefer not to keep flashing it (but then I don't have much else for development). I'd take a boost driver like without easy flashing if that's what's required. Seems like a nice driver.

If you have the programm socket you can flash the driver before soldering
Saves time

For reflash later instead viases small solder spots take less space

There are also 2x3mm small SMD. Onnectors, but then the wiring gets more complex

Those drivers are 4 layer so more expensive right?

I hit the 8kb limit because I have multiple UI types and everything configurable by button presses. That could all fit, but I had very little room left for a bunch of experimental stuff and found myself having to take code out for it. As the 841 uses the same footprint and is (for me) the same price, there really was no reason not to switch. But yeah, in normal end user firmware 8kb is enough by margins.

I managed to fit vias on my GXB17 rip off design. I have the boards but haven’t built one yet:

I’m quite sure I can squeeze the vias in on a new board modified with the boost circuit discussed here as it appears to use less components. Updating firmware is of coarse not needed for everyone, but as I’m always coding something I like to be able to.

Mine are 4 layers but that’s not a problem because in terms of community interest, my boards and firmware don’t really have any. A saving of $0.82 per 17mm board is for me really not worth the hassle of trying to squeeze everything into 2 layers. Of coarse the additional copper thickness option isn’t available for 4 layer boards, but I don’t see that as a show stopper.

Your boards look pretty cool and your firmware likely better. But isn't your work all closed source? (which is cool,but not what this project is I guess) and I suspect this will stay open, and in that spirit 2-layer as you point out, and at least for this proto it's getting bistro-HD which fits on this attiny25 and is open, and is an incremental continuation of the previous community project. Of course people just buying a driver would likely buy yours. I would have a year ago. A lot of the "community interest" (not that bistro-HD has so much either) does it to build up the open source toolbox though, because that's fun, maybe even more than to make our own lights work.

Do you think it's possible to get the vias on a 2-layer board? What about with the attiny25 (it's also only 4 mm)?

You are correct Flintrock, my involvement in this has been primarily to expand the open source driver options. If someone wants to rip it off and make or even sell their own closed source version, please do! More options, more better in my book.

Yeah, and well it's not even all about open source but about the community path. I've seen some probably really great open source code too that still gets ignored. I'll gladly admit that I "took advantage" I suppose you could say of bistro popularity with HD, or you could say I supported the popular thing. People don't generally like too much change and too many choices and like to stick near something they know for awhile. The main thing HD did was just fix one big issue with previous bistro boards. You can keep using bistro over some fancy new thing, but it's hard to keep using old bistro when there's a new bistro that's basically the same but fixes one clear problem in your light. Even that though has probably been used by less than 50 people, maybe less than 20. Of course there really aren't that many people building and flashing their own boards.

Jesen, I haven't seen your work, will have to check out. Sorry if I stepped on anything here. Schoki asked about getting HD for this in PM, and it's basically already done, just not released (it's just a config anyway). Anyway, as you say, more options=better.

As for "ripping off" I kind of agree. Bistro was already gpl3 though from TK. I figure I own completely copyright to large parts of the stuff I've added and so could open those bits up to BDS or MIT or such but I'd consider if somebody asks. Of course in a world of Chinese flashlights, you have to figure it could happen without asking too, so whatever.