Investigating low power consumption modes.

fernando_g

Senior Member
I will be working on a project running from supercaps in the near future, and was looking at ways to minimize current consumption, for obvious reasons.
I will write about this project later.

Right now, I investigated the 14M2's current draw vs frequency, and in the sleep and disablebod modes.
I wrote a simple routine, and set all the ports as outputs (yes, non terminated inputs increases current consumption!) but kept them always at logic low.

I am only investigating the 14M2's contribution.

So, FYI only, please read my findings.
 

Attachments

Last edited:

hippy

Technical Support
Staff member
One thing which would be worth doing is trying to determine what the current consumption or saving is for every option individually when enabled or not. For example, whether BOD saves 50uA when disabled across all frequencies and configurations.

That way one could provide the data which will allow a program to created which would show the current drawn for a variety of options.

In that respect, results for different voltages would be useful to have, as well as for standard configuration, all inputs to 0V, with internal pull-ups on, all output high. It would be useful to know if there is a constant multiplier which can be applied to various options as voltage changes.

The way I would approach that is with an RS232 capable multimeter, have the PICAXE indicate what combination it is about to test to a PC, then have the PC record that and what the multimeter reads. Then it's just a matter of leaving it running, gathering a huge amount of data with minimal effort , which can be analysed at leisure later.

Of course, if you are only wanting to find the lowest operating current, then it is more a case of; what can I turn off, what does that save ?

That's probably a case of combing through the datasheets finding which peripheral blocks can be powered down which are on, what options other than defaults will give a lower current consumption.
 

AllyCat

Senior Member
Hi,

Yes, there are pages and pages of input current data in the base PIC data sheets, but I often find it difficult to determine which "optional" internal modules are active, particularly in the PICaxe environment. In addition to the Brownout detector (maybe a false economy to disable it), the FVR, Watchdog (aka Sleep) timer and PLL modules may be worthy of examination (the Comparators are presumably off by default in an M2).

Your measurements are useful and highlight that lowering the frequency doesn't save as much current as might be hoped. So for a really "aggressive" power saving method, it might be worth raising the clock speed to 8 or 16 MHz to perform any significant calculations in a burst of activity, and then Sleeping for the remainder of the time. ;)

In addition to minimising the current it may be worth minimising the supply voltage, although a PWM buck converter might consume more power than it saves. It seems slightly "strange" (and inconvenient) that the 08M2 has a significantly higher supply voltage requirement than the other M2s.

Many microcontrollers (from other manufacturers) rely heavily on (constant) current sources so the power supply current may be largely independent of the supply voltage (the input power will of course still increase with the voltage). However, the Microchip resistors (e.g. the Weak Pullups) actually look like resistors (i.e. they have a linear V/I characteristic) but I don't know if this has any significant bearing on the overall power consumption. FWIW, it may be safer to pull unused inputs High with the WPUs (or even the rather puny High pin-drivers) than pull them Low, which may destroy the Low drivers, if accidentally connected to the supply rail.

Finally on the topic of lowering the clock frequency (below 4 MHz): Note that for some instructions the "Watchdog" timer may cut in at 1 MHz and below, spontaneously resetting the PICaxe. Also note that the "base" PIC has two "31 kHz" oscillators, one derived from the "normal" clock and the other from the Watchdog timer (which is around 100 times less accurate, and I believe is the one used by PICaxe ). :(

Cheers, Alan.
 

fernando_g

Senior Member
Of course, this is a *very preliminary study*, which can be significantly enhanced with all the variables mentioned in the posts above. But on the other hand, my intention is not to write a full blown datasheet...;)

AllyCat's comment I had already noticed....while increasing the clock speed to double, the actual current consumption increases less than double.
To that effect, I updated the spreadsheet with a figure of merit, frequency/current ratio, normalized to 4 Mhz = 1. The m32 mode appears to be the most efficient.
See attached.

If the application allows to be run at high speed bursts and then go to sleep, this would be the most energy saving strategy. Fortunately, what I am considering will allow this strategy....(y)

Finally, Hemi345: Thanks for bringing up the MCP16252 boost regulator. Very intriguing circuit! Definitively I will have a read at its datasheet.
 

Attachments

Top