I think TomE gets the off state of the MCU down to around ~.003ma? or was it .03ma?
I was wondering if a 0,1µF cap would suffice as an OTC as we use it right now?
If so, there are affordable 1206 caps that are C0Q spec’ed…
WOW. ok. I was guessing between 100 to 1000 times that. Sure at 3uA or even 30 it's sounds much easier (might depend how fast it shuts down). Of course presently C1 drains much faster than that because of R1 and R2, and it's on the wrong side of the diode. I'm not even sure you can get a diode to leak that slowly either (and that's also very, extremely, temperature dependent but it becomes a matter of it can last long enough or not, as opposed to an analog correction, which is of course the point). There might be possibilities.
I believe the spec now is typically 1uF. I'm pretty certain that going ten times lower will not work at all. 1uF 0805 caps are not expensive. Even 1uF 0603 shouldn't be too costly. There's no reason for 1206 unless going to much larger caps for different designs.
I'm silly. C2 is the cap for the job of running the attiny. C1 should actually be relatively small to let the voltage on top of R2 fall to signal a shutdown. Ok, so a big honking C2 cap and monitor R2 for a shutdown signal. It could be possible. For LDO lights there could be some better ways to wire it, but if you can make it work this way, with a 3V depleted 1S battery (using V version attiny's probably) then anything will work.
My question also comes down to, if going to a COQ (that shouldn’t be temperature-dependent at all) cap as an OTC - the way it is right now - would give consistent switching timing.
Ok, but they have tiny capacitance in a huge space. There are some apparently up to 0.47uF for $4 a cap. Of course there are inbetweens and one should look for the best performance they can find, but a c0g seems pretty impractical. Maybe in 10 years there will be cheap ones in 0805 1uF, but not now.
There is no significant OTC dependency on supply voltage. Temperature dependency can easily be handled in firmware:
Of course, if we manage to keep the mcu powered during off time for 1 or 2 seconds without using more or more expensive components, this might be a good idea since it offers more control options. I intended to test this for months now, but haven’t done yet since I was more involved in momentary firmware development lately.
You might be right. The mcu runs down the C2 and C1 caps until it reaches the same cuttoff voltage regardless. The question is does the OTC get pulled down to that same voltage that fast. Ok, maybe it does.
Apparently the V version is not all that different then the normal version run at 10mhz. Tom tested his all the way down to ~2.3v iirc and it works fine with the normal version of the tiny85.
Swapping the C1 and C2 cap sizes is possible, obiously we would need to figure out how much power we would need.
This is the far better course to think through IMHO as it would remove the OTC issues entirely and open up even more options. Space would be an issue but I have some ideas on that depending on the final size needed.
They may just be bins for all I know. Aren't the V versions specced down to what 1.7 1.8? Even if they only reach that, that's 0.6V more room, where 3 dropping down to 2.3 was only 0.7 in the first place, so it extends the time by twice (ish) for low batteries no? Anyway, it's not a game changer, just might help if it's a close call. Yep, just need to know the power draw.
strike my last comment (deleted), I was worried about getting the led off fast, but that's silly, outside all the caps.
The LED current is pulled before the schottky-diode so it doesn’t discharge the cap (if we have the cap after the diode which is better anyway). The mcu only drives FET and 7135 with little current.
Yeah, I figured that as soon as I said it.
In fact it should just pull C1 down fast so it makes that not an issue either.
I am guessing that the MCU could react in a handful of cycles at most. Although the LED is pulling power directly from the batteries through the FET, the power for the LED should not drain the caps should it? The power to turn the FET on would be the real worry it seems.
In which case it is more about putting the MCU in sleep mode to save power then the LED. Even when powered up the MCU should not pull more then a few ma it seems like I remember reading someplace. Which while a lot is much more reasonable.
lol, ya’ll were fast
We can’t put the mcu in sleep mode since it has no realtime clock. We have to count cycles.
Edit: Perhaps we can put it in sleepmode and use the watchdog to make it wake up every few milliseconds and count this cycles.
We can’t put the mcu in sleep mode since it has no realtime clock. We have to count cycles.
Ahh, well then “power saving mode”, aka shut everything down except the clock.
I am guessing that the MCU could react in a handful of cycles at most. Although the LED is pulling power directly from the batteries through the FET, the power for the LED should not drain the caps should it? The power to turn the FET on would be the real worry it seems. In which case it is more about putting the MCU in sleep mode to save power then the LED. Even when powered up the MCU should not pull more then a few ma it seems like I remember reading someplace. Which while a lot is much more reasonable.
yes, a few mA is what I found. So you've got 100/1 penalty for how long it takes to shut that down. 1ms wouldn't be a show stopper.
If I find the time I will test this next days. It would give me almost all options with a clickie which I have with my momentary driver.