Reducing propeller power consumption
heliboy
Posts: 18
I have a battery powered application, but I am concerned about the high power consumption of the propeller. In my previous experience with PICBasic it is possible to reduce power in idle conditions by commands such as SLEEP. I have found no such command for the propeller. I need the 80mHz speed because of high baud rates but I only need to operate for 5·seconds every 30 minutes. Based on the circuit I have on the professional dev board I measure 83 mA in idle (on main 12V supply), 135 mA when all the 5V circuits are switched on (5 seconds) and then to 150 mA when transmitting on the RF (1-2 seconds). If I measure the power on the 3.3V rail I use on 0.33mA and this is essentially constant. The 5V rail is 0 mA at idle and 15mA when transmitting (the prop controls a relay that switches the 5V rail on and off). I was able to reduce the idle power (12V input)·to 70mA by·stopping the external cog runing MCP during the idle time. The RF Transceiver code (thanks to Beau) and some one-wire routines run in Cog0, but Cog is paused (power consumption ?) using the WaitSyncmSecs routine in the clock object obtained from the prop exchange.
I would very much appreciate any ideas for reducing power consumption. Even a 70mA draw for 30 minutes adds up to a big battery and it is particularily·inefficient since I only need it to operate for 5 secs. I could put an external PIC to turn power on and off to the prop every 30 minutes but this seems a bit stupid that the prop would need a power nanny !
- Heliboy
I would very much appreciate any ideas for reducing power consumption. Even a 70mA draw for 30 minutes adds up to a big battery and it is particularily·inefficient since I only need it to operate for 5 secs. I could put an external PIC to turn power on and off to the prop every 30 minutes but this seems a bit stupid that the prop would need a power nanny !
- Heliboy
Comments
What is the Propeller doing during the 30 min 'rest' periods? ...and do the wakeup periods need to be at exact intervals, or can they be approximate time periods. What if any external events would there be to act as a trigger to wake the Propeller up?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Nothing really. Just waiting for the next time to transmit. Now the idle time is adjustable from 10secs to 60 minutes (via pot).
General scheme :
repeat
... clock.MarkSync
....MCP.start, turn 5V power on etc
... perform calculations
... transmit RF
... clock.WaitSyncSec(5)· ' must complete within 5 secs
... clock.PauseSec(Datasecs) ' IDLE time - wait for Datasecs·( for 30 minutes = 1800-5 seconds )
... back to repeat
Thanks,
what about something like this.
My power supply shows about 40ma.· I have measured it accurately.· And, as I think what Beau getting at, this isn't very precise.· If you don't need the precision, I think it uses less power than the clock object.
Duane
You can get power consumption down to as low as a few micro amps if you turn off all the Cogs except for one and have that do the delay timing for you. That low current requires the clock to run at 20KHz (Internal RCSLOW) while the unit is "sleeping". Then, on time-out, simply crank the clock back up to 80 MHz, and get your work done. Then slow the clock down and go back to the long sleep.
Unfortunately the 20 KHz internal oscillator is not very precise nor stable with temperature. It is easy to get a 10% variation, and if that is not suitable, then some method of introducing more precision is required. This is a bit of a hassle, but should be able to be accomplished by waking up much more frequently, and calibrating the 20 KHz to the 80 Mhz (5 Mhz crystal) you have on board by timing the charge rate of an RC circuit at both clock rates.
I am currently exploring this and expect to get to a few tenths of a percent by calibrating once per second, yet not increasing the average current due to the extra calibration procedure too high..... values to be determined.
My target is 3 years of operation on 3 "D" cells with the processor being awake at 80 MHz·for 2 to 5 mSec every minute, and making a cell phone call-out (2 Amp peaks) once per day.
Hope that helps.
Cheers,
Peter (pjv)
Post Edited (pjv) : 3/22/2010 4:38:16 PM GMT
I tried your suggestion but it did not make any significant difference - maybe 0.5mA. Yes, I do not need great precision, but I do not have any external triggering event except timing.
Heliboy
If I understand you right - I need to move my code to say cog1. Leave only the timing routines in cog0 which I believe cannot be stopped. Run cog0 at 20kHz and then execute the main code at 80Mhz in cog1, shut down cog1, crank down to 20kHz and then wait for the next timing event. Correct ?
- Heliboy
As usual, I'm thinking only in terms of assembler, but presumably you are running SPIN, evenso what you describe should be correct. I have not much experience at SPIN, but I assume that a WAITCNT consumes the same power in SPIN as in PASM.
The calibration routine might need to be written in assembler unless you can create that with your required precision/repeatability in SPIN. Perhaps the cog's built in counter modules operating in logic mode can help here.
Post edit;
OOPS, forgot to mention to be very sure you observe the timing requirements in switching from internal RC clocks to crystal clocks. If you use the crystal before it has stabilized, the PLL will not lock on properly, and you'll have trouble. The specs ask for 10 mSec, but I have found that the time required is a function of how long the oscillator has been out of the crystal mode. By waking up often enough (don't recall the numbers just now) I was able to get it to come up without any delays...... so please experiment to find your sweet spot.... 10 mSec is a long time if you need absolute minimum current.
Another answer is of course to add an RTC at 32 KHz to wake the unit up.... but that's more parts.
Cheers,
Peter (pjv)
Post Edited (pjv) : 3/22/2010 5:23:15 PM GMT
If you have real time clock, it can supply a periodic 1 second heartbeat or an alarm that can be sensed by the RCslow via a waitpin, to get accurate timing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
-Heliboy
By the way, the Demo Board has a plug-in jumper between the power supply and the Prop power pin, so you can measure its current directly, independent of the regulators and the peripherals.
Following up on what Mike said, in order to realize the lowest possible current you will have to move your project onto a board that has only the needed peripherals, with good power management, and if the regulators will have to be high efficiency types with micro-Amp level quiescent currents.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I have got the base load (no prop) down to 3.89 mA. This is basically the 5V and 3.3V regs. With the prop, using the tricks to choke it down to 20kHz the draw is about 23 mA. This seems to be about the best possible. When the prop is speeded to 80MHz the current is about 70mA When all the peripherals are active the draw goes upto 130mA and when actually transmitting it peaks at 150mA. Much improvement in the idle state, but not microamps ! I could replace the voltage regs with better efficiency devices but the prop is still the major load even when idle.
Thanks to all. - heliboy.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Post Edited (Leon) : 3/23/2010 7:39:37 AM GMT
Make sure you don't have any floating inputs, as they can make the Prop draw excessive power. Either use pull-ups/pull-downs or set unused pins to outputs to reduce power consumption.
-Phil
humanoido
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Post Edited (Leon) : 3/23/2010 6:14:45 PM GMT
-Phil
The peak is very narrow, and is due to the fact that both p and n channel transistors are conducting at the crossover point of the totem pole input structure in order to speed up the transition. I expect there would be variation from this length of string to that, but the string does have a characteristic curve. A floating pin subject to AC pickup and noise may draw an excess of only 50 or 100 µA, because it does not stay right at the threshold. This current and its fluctuation is especially important in limiting the performance of things like RCTIME and sigma-delta conversion, because they purposely hover the input at the transition point.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 3/23/2010 6:47:34 PM GMT