I did indeed try uploading it to OSHpark, far as I can tell there is no change from the design spit out by Diptrace. I just checked it again and I could not see any differences in either the traces or silk screen, except the logo looks a bit lower resolution on oshpark but that is to be expected.
I will double check the pad spacing for the 7135, I just redid the pad sizes yesterday with measurements from the ones I have on hand here after it was brought up by DEL. Luckily diptrace makes that easy and automatically adjusts them all if a change is needed. (yeah, I know I am hyping on diptrace but I would never have appreciated it if I had not tried eagle first lol)
Really nice work TA. Love the organic layout. I haven’t been keeping up on driver ciruits. So I may have missed recent developments. I’m curious about the voltage divider being fed by R5. Doesn’t that make the cumulative resistance of 9.426.7 22,004.7 ohms after passing R2 R1?
Power to the MCU also goes through R5 (and then the polarity protection diode). What is the purpose for R5? I’m certain you have it there for good reason. I’m probably not aware of issues that it must remedy.
EDIT: Fixed error.
EDIT2: Fixed another error. Brain fart. Not really a difference from 22K.
Basically these changes came about when DEL was scoping out the new Q8 driver, he determined that these changed provided a much more stable and reliable driver overall as it was getting some nasty voltage spikes with the classic circuit.
This animation from the tiny25/45/85 thread shows the impact of R5. Its main purpose is to prevent wiring inductance from ringing together with C1 when the FET is PWMed (or in fact every time it is switched off). Yellow is the voltage at pin 8 of the MCU:
The Q8 driver ‘stock’ BOM already had some refinements added to the basic DDm driver circuit (R4 and C2). But R5 made all the difference.
Honestly I intended to do this long time ago. Just never took the time. It is also not obvious setting up something that electrically looks like a high-power flashlight, but is simple to probe, power (with cells, not a power supply) and monitor.
Ok, since it appears that these designs have passed the “first round” of BLF critiquing I have now uploaded them to OSHpark with the source files included in the download for anyone that wants to play with it.
I will also be placing an order for them on Sunday or Monday so it anyone spots an issue please do point it out.
I did make some minor changes to the Silk screen on the 17mm version as it was just too tight to be able to read clearly once OSHpark reduced the resolution but otherwise it is unchanged.
I also added a few more minor size variations as you will notice, just for the sake of completeness. If anyone knows of another size that would be useful please do let me know.
At this point, I still need 17/20/22 boards with the proper R3, R4, R5 and C2, simple FET+1, Pin #2 for a switch, pin #3 for an indicator LED. Basically our SRK Q8 driver shrunken. I'm really stuck at this point - dunno what to do...
Not sure if I could do PWM on pin #3 (FET), along with pin #5 (single 7135), but if I could, then maybe I could use pin #6 for the indicator LED - use the thru hole as a pad.
I could rearrange it for the different printout if you needed.
I know you can do PWM on pins 3, 5 and 6 though, and I am pretty sure some of the other pins as well. I know this because it does it in bistro tripledown.
Now how TK managed to do that? I have no clue, I can edit values in code and do minor coding myself but my skills quickly run out after that. You are obviously welcome to take a look at the code and see, I am sure you could figure it out in a hurry.
I am using this pinout simply because that is what the firmware was made around. I would rather build the driver that I can do myself, around the firmware that others would need to build for me.
I would LOVE to have both a Bistro and Narsil firmware available for this driver, allowing for both Clickly and E-switch use and further extending the versatility of the driver.
If you would be interested in making Narsil compatible with this driver let me know if there are any changes I would need to make, if a compromise can be found between it and Bistro allowing both to be used easily that would be epic!
Thanks, I am a big fan of open source for projects like this. I mean I am stealing using the hard work of many many before me, might as well pass on anything I may have added to the pool of knowledge.
Plus I feel that the next step in driver tech will be int he form of buck/boost drivers, I think we have pretty much reached the limits of linear drivers.
Only other thing I would like to do with linear drivers is add a 4th channel as I have seen someone on here do.
This would allow for low, med and high non-PWM modes along with an FET and still have the ability to PWM for whatever additional modes you may want, that is the ultimate that linear drivers will ever reach IMHO when it comes to flashlights.
I don’t have the coding skills to make the firmware happen though and TK is really busy right now so figured I would wait until she was up to figuring out how to use the reset pin.
Where is Bistro tripledown? Do you have a link? I can't find a link in this OP or your OSHPark page. Just Bistro is listed under TK's repository, and it's from Dec 2015 - think it's the original Bistro. Dunno where else to look.
Only 2 I/O's can support PWM, least at one time. Does she do all PWM on all 3 I/O pins simultaneously? Is there info on this?
Yeah, I guess it is time to link to the firmware. Forgot about that in the OP.
It is in the repo but in the tiny25 side of things I guess, I never have figured out exactly how to navigate that repo, I just use different bookmarks to get me close to what I am looking and and navigate from there lol.
Far as the PWM, she is indeed doing PWM on all 3 outputs at once, you can setup the modes in the firmware for whatever combo you want.
I read online before talking to her about this and saw others doing this as well. It is apparently a little known feature of the tiny25+ series that is interesting to setup, I did not take the time to understand all the technicality of what they were saying. You can apparently use up to 4 PWM channels at once, just not on certain pins.
One of the drivers I saw posted on here was apparently using PWM on the reset pin as well, forgot which one it was though.
The end point is that TK got it to work, so I know it can be done lol.
Ahh - ok, seems I was wrong. I probably forgot bout this - saw posts on it a while back. Reviewed the Bistro-Tripledown source code just now, and certainly does look like all 3 output channels have PWM's enabled. I'd have to review the code more vs. the 25/45/85 spec sheet to see how it's done.
This is good news for using an indicator LED as well. We could PWM control the output level of the indicator LED, though if you want to do that with the MCU in sleep mode, it might mean keeping the PWM portion "awake", so might contribute to parasitic drain.