Electronics > Beginners
Writing EEPROM, sudden battery loss, capacitor keep-alive calculation?
jnz:
--- Quote from: mariush on October 14, 2018, 06:02:14 pm ---No, in general capacitors will have the same capacitance no matter the voltage, you don't get less capacitance at lower voltage. Ceramic capacitors have an important exception... their capacitance can DECREASE as the voltage gets close to their maximum rating
--- End quote ---
Have you read on MLCC capacitors? Because your text is 100% counter to what I’ve read elsewhere. The issue being that X7R or X5V or whatever are just ratings that need to be true-ish for the stated voltage, but for less than the rated voltage can be wildly off, where a R rating may be closer to a V percentage at the voltage you actually hook it up to. What I read on MLCC is that a 50V rating may be 40-60% less capacity at lower voltages. IDK, maybe I’m wrong about that, but that was my take-away. Their advantage being you get more density and still have high frequency response of ceramic which I don’t need. Please correct me if I’m wrong!
I’ll look at that part for a switching regulator, but I’m running up on space and height requirements for all components.
For $.40 to $.60, if I use a polymer electrolytic I need one single component and the micro’s built in brownout detection should let me know when my internal reference is lowering (which I don’t really underatand how that works, but it’s a different post I’ll make). I’m highly inclined to go that route where I have 5v, 330uF, and as long as I’m above 4.5V I’m good to write knowing it’ll be X time before my 330uF let’s the voltage come down to my minimum 1.8V the chip stops working at. Or I’m all mixed up!!
jnz:
--- Quote from: GeorgeOfTheJungle on October 14, 2018, 06:17:22 pm ---
E= V*I*t
5[V]*50e-3[A]*2e-3[s]= 0.5 mJ (after the LDO)
12[V]*50e-3[A]*2e-3[s]= 1.2 mJ (before the LDO)
E= CV²/2
22e-6[F]*12[V]*12[V]/2= 1.58 mJ
--- End quote ---
I’ll also copy that down into my notes. I think it does make sense to consider in joules as well as in farads.
GeorgeOfTheJungle:
--- Quote from: jnz on October 14, 2018, 09:52:17 pm ---
--- Quote from: GeorgeOfTheJungle on October 14, 2018, 06:17:22 pm ---
E= V*I*t
5[V]*50e-3[A]*2e-3[s]= 0.5 mJ (after the LDO)
12[V]*50e-3[A]*2e-3[s]= 1.2 mJ (before the LDO)
E= CV²/2
22e-6[F]*12[V]*12[V]/2= 1.58 mJ
--- End quote ---
I’ll also copy that down into my notes. I think it does make sense to consider in joules as well as in farads.
--- End quote ---
I find it easier to think about this in terms of energy.
We know:
Vo= Initial voltage= 5V
and
Eo= Initial energy in the capacitor= CVo²/2= 330e-6[F]*5[V]*5[V]/2= 4125 µJ
and
The µC consumes 500 µJ every 2 ms === 250 µJ every 1 ms. (*)
To know the voltage of the capacitor at a given time as a function of its energy:
E= CV²/2
=>
V= sqrt(2*E/C)
and
E= Eo-(250*t) (t in milliseconds)
=>
V(t)= sqrt((4125e-6-250e-6*t)*2/330e-6) (t in milliseconds)
And then we get:
https://docs.google.com/spreadsheets/d/1e7VZKLXoYMvlpKKmdPDZG3AF-rFIVKtU4AA9TOVvR8s/edit#gid=0
(*) V(t) at constant power is a different curve than at constant current than at constant R. Constant power is best in this case i.m.o.
http://google.com/search?q=capacitor+discharge+at+constant+power&tbm=isch
http://google.com/search?q=capacitor+discharge+at+constant+current&tbm=isch
http://google.com/search?q=capacitor+discharge+at+constant+r&tbm=isch
T3sl4co1l:
Here's a JS calculator for three common scenarios:
https://www.seventransistorlabs.com/Calc/PSHoldUp.html
Tim
max_torque:
--- Quote from: SL4P on October 12, 2018, 02:31:02 pm ---I have a dinky ATMEGA1284 project with some other stuff on the board... some fairly hungry
I detect loss of the unregulated incoming supply, and have a primary 1000uF in front of the protection diode, and 470 after... before the regulators...
The processor has enogh time to write at least 2 of EEPROM - before the board gets shut down.
I work it this way because I keep a lot of transient variables which would wear down the EEPROM life,so only save it at shutdown or when power fails.
--- End quote ---
If your device only needs a small amount of power, simply "hide" it behind a suitable self reseting polyfuse and make sure the power rail after that fuse is clamped with a suitably rated TVS diode. One other thing to note is that depending where you get your power for your device from, your supply could be in parallel with existing loads, and when the supply is interupted, those loads can "steal" power from your device (if you don't have a suitable input current direction limitier in place) meaning any capacitance on your incomming rail gets discharged into those other loads, rather than sitting their and being available for your micro.
And conversely, if your circuit is being fed on it's own, when that feed is opened, your internal power rail capacitance may tend to keep the feed at highish voltage, meaning you may not detect a nice obvious drop in voltage to be able to say "oh look the powers gone off".........
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version