How to save battery power?
ManAtWork
Posts: 2,176
I think I'm quite familiar with propeller programming, but now I have to do my first battery powered project. The application requires that I frequently poll a sensor (once a second or so). This should require as little power as possible. It would be nice if I could survive a year from a 18650 Li cell. In the case activity is detected I have to wake up and perform some actions which require two or three cogs to run at full speed. The "active" time is only around one minute per day, so I think most effort should be put in keeping the standby power low.
I plan to keep the propeller always on but shutdown all cogs except for one and run in RC slow clock mode. What takes less power, WAITCNT or charging an external capacitor and WAITPNE for it to discharge? Precise timing is not required, I just must not miss a trigger event. In active mode I'd switch to XTAL clock mode for better performance.
What voltage regulator would you recommend? When fully charged the Li cell can have up to 4.2V, too much for the propeller. The TS1117 regulator I normally use has too much voltage drop and too much leakage current.
I plan to keep the propeller always on but shutdown all cogs except for one and run in RC slow clock mode. What takes less power, WAITCNT or charging an external capacitor and WAITPNE for it to discharge? Precise timing is not required, I just must not miss a trigger event. In active mode I'd switch to XTAL clock mode for better performance.
What voltage regulator would you recommend? When fully charged the Li cell can have up to 4.2V, too much for the propeller. The TS1117 regulator I normally use has too much voltage drop and too much leakage current.
Comments
5 MHz crystal + 80 MHz PLL looks to be 1 mA before any Cogs are running. Admittedly, that's only about 1% of a full-on 8 Cog burn but how much of that PLL time is full burn?
A 18650 cell has >2Ah. This would allow for 20h active operation @100mA or one year of standby if consumption is <200µA.
It could be argued if the other cogs really need be switched off, while the unused pins have to be set.
Check the forum, there are a lot of threads about that.
I asked a similar question here:
http://forums.parallax.com/showthread.php/142124-Low-power-guidelines
With RCslow and nothing else running you can be in the uA comsuption range.
Besides the lithium + mcp1700 you can also try using a LiFePO4 battery (nominal voltage 3.3V...)
Another couple of ideas:
If you need accurate timing consider a RTC.
You can the use the 1pps from the RTC to correct the frequency of the prop using RCfast (lonesock made a serial object using on the flight clock change to exploit this very opportunity..).
Would it be possible to recharge the battery using energy harvesting (solar, vibration, ..)?
Massimo
Consider comparing sub-zero battery operation with various chemistries. And even then, many devices are actually buried in snow in order to raise the operating temperature.
http://batteryuniversity.com/learn/article/discharging_at_high_and_low_temperatures
http://www.quora.com/What-is-the-best-battery-technology-for-deep-freezing-temperatures-up-to-minus-30-degree-Celsius
Consider all the details. Also, you can get 250 to 300 ma voltage regulators that have uA quiescent current. The 1 amp regulators have a much higher quiescent current demand. It is even better to avoid low dropout regulators as the current quiescent currents goes way up in the low dropout region.
Outdoor cameramen are well aware of Lithium cell failures in snowy frozen conditions. You might see what they prefer to do to solve the problems.
Energy harvesting is no option here as everything providing more than 10µA charging curent is too big, too expensive or too brittle. I need maintenance once or twice a year anyway so I can change batteries if required.
I need predictable timing only for communication (serial or servo signal, for example) in active mode. An RTC for exact long term timing is not required.
I've choosen the 18650 cell because it fits the container (a water tight tube) very well. The one I have is rated to operate down to -20°. I know that capacity decreases and resistance increases at low temperatures. As I don't need peak currents above 0.5A I expect it to be no big problem. If I'm wrong I have to choose a different battery. I plan to run only the propeller on a regulator and connect the higher power loads directly to the battery with a MOSFET switch.
Startup time is also no issue. So I think there's nothing wrong with cogstop-ing all cogs except one and run it in RCSLOW mode. Some applications will simply wait for a passive (mechanical) switch for wakeup. Some other will require a sensor drawing power. For those I have to wakeup frequently (say once a second), power up the sensor and poll it and go to sleep again. Only when I detect a trigger signal I'll switch to XTAL+PLL mode and startup the other cogs. This only happens once or twice a day so I don't care about the extra mA for the oscillator and PLL.
Active cogs only use around 1uA at RC slow. I wouldn't bother shutting them down until you're chasing the last few uA of standby current. Another couple of uA can be saved by disabling the internal brownout detector, and using an external TC54 instead.
I've tested the Micrel MIC5231 and MIC5232 LDO regulators. They do not increase ground current when the input voltage drops below the regulation set-point. If you have many other 3.3v loads, I'd put them on a separate LDO that has a shutdown pin.
I'd also recommend building a circuit that can measure uA currents and conduct the full load current with minimal resistance. (Google has a few)
Marty
Rare earth (Yttrium) batteries? Nobody wants to pay that except military, I think.
But, yeah, they are targeted as installation scale batteries. Solar/Wind installs are good examples. Certainly not for portable use.
They are popular for electric mod'ing of cars, particularly for competition racing. Rip out the petrol engine and fuel tank and shoe-horn in electric motor and battery pack.
It seems just about everyone starts out select a battery size they like and hopes it will do the job. It is blind luck when it does as most of us just want the project to be very small.
Why bother with rechargeable secondary batteries at all? Even with lithium chemistries, one-time primary cells have greater power densities?
http://data.energizer.com/PDFs/lithiuml91l92_appman.pdf
Note that the capacity (~3Ah for AA size) is hardly affected at -40°C, so long as the current is in the neighborhood 25mA or less. Two cells in series can operate a Prop without a regulator, better with a lower brownout setting. And the chemistry is safe, much more so than primary LiSOCL2 (http://www.greenergy-battery.com/Product-2.html).
In any system like this, no matter what the battery, add lots of capacitance in parallel. The battery impedance increases greatly at low temperatures and that is one of the main limiting factors on performance. If you can store the energy needed for pulses of operation on a capacitor, the battery will perform longer and at much lower temperatures than it would on its own, and it will deliver much more of its rated capacity.
Marty
Marty
A variation would be for the prop to run in RCSLOW and wait for a high on a pin. When it senses the high it switches to high speed, loads cogs, does its thing and then reverts to RCSLOW until the next trigger.
RCSLOW frequency can vary but using the CS555C would give you fairly precise timing.
Sandy
CLKSET (RCSLOW, 20000) somehow doesn't work. I have to set the clockmode with a literal number, eg. CLKSET (%000_00_001, 20000)
The first time I measured standby current draw it was 0.2mA. Not bad, but it would limit battery life to less than one year. Then I found out that I had a bug in my code causing it not to tie all unused pins to a defined level. After fixing that current draw was an amazing 8µA. Brownout detector is still enabled.
I use the following code to switch the clock speeds:
I had to modify my wait function because 10ms would be less than 384 clocks in RCSLOW mode
BTW, I have decided to use a 3V CR123 battery instead of a rechargable cell. It eliminates the need of a voltage regulator and I think that more devices get damaged or stolen before the higher cost of the rechargable battery gets a chance to be profitable.