Methods of conserving power

Richbk

New Member
Hi all,

I've been searching the forums and just wanted to confirm the best ways to conserve power whilst waiting for an input (I'm using an 08M2).

Currently I have the following:
- Setting the frequency to as low as possible (k31)
- nap for as long as possible during the 'waiting for input' loop

I've seen it mentioned that all unused pins should be directly connected to ground - Is this correct? Do they need to be set low in the programming or is this (as I assume) automatically done?

Are there any other things I can do to ensure minimum battery drain?

Thank you in advance and apologies for bringing up relatively common discussion.
 

Technical

Technical Support
Staff member
I've seen it mentioned that all unused pins should be directly connected to ground - Is this correct? Do they need to be set low in the programming or is this (as I assume) automatically done?
To conserve power don't leave floating inputs. So connect to 0V via a 10k resistor (don't short directly to 0V because programming accidents can then happen!) or simply make them a low output instead via a 'low' command.
Sleep is better than nap if you can tolerate the longer delays.
 

Richbk

New Member
Ah of course, disablebod. I was actually aware of this one but completely forgot it when writing my initial post! Sorry about that but thank you for the suggestion.

Thanks for your response Technical. I only have one input in my circuit which is currently tied to ground with a 10k resistor as suggested as I had floating issues with it initially. Would it be an idea to use the 'low' command as well or is that not necessary?

Just to run through how I've got the 08M2 currently connected:

(Pins are referring to physical pins)
1 . V+ (3v)
2. Tied to ground with a 10K
3. Connected to the positive leg of an LED with a 150 resistor inbetween
4. Not connected to anything
5. Connected to the positive wire from a Piezo transducer
6. Tied to ground with a 10K. Also connected to a switch which in turn is connected to V+
7. Connected to the positive leg of an LED with a 150 resistor inbetween
8. V-

So from what you've suggested I have the choice of either setting pin 4 to low OR connecting it to ground with a 10k?

I should probably explain that this circuit isn't used for downloading. I do that seperately and move the chip over to this circuit (hence the lack of the 22K). One thought I have had is to use pin2 as the input (after using the disconnect command) and save myself using pin 6 for the input. (unless unused pins still need to be tied to ground with a 10k)


Thank you again for your help. It's nice to find a forum that has incredibly helpful, polite members who don't jump on someone for asking a question!
 
Last edited:

AllyCat

Senior Member
So from what you've suggested I have the choice of either setting pin 4 to low OR connecting it to ground with a 10k?
Hi,

You can certainly do both if you wish, but it's rather "belt and braces". You can save a resistor by programming the pin an output "Low", or put in the resistor to potentially save a small amount of leakage current in case you "forget" to program it Low. However, personally I would put an extra resistor (perhaps 1 kohm) in series with the switch to avoid damage if it gets activated with that pin accidentally driven as a Low output at the same time.

I'm also working on a low-power-consumption project, with perhaps 20uA average current drain (to give several years operation from a pair of AA cells) so I'd be interested to hear what overall results you achieve and which methods seem most worthwhile.

Cheers, Alan.
 

lbenson

Senior Member
If this is wrong, I hope someone more knowledgeable will correct, but my understanding is that you want to set unused pins to inputs, and tie them through a resistor (e.g., 10K) to 0V. If they are inputs and they float, they may trigger some internal activity in the chip which would consume some power.

The danger if they are tied directly to ground is that if they are accidentally made into outputs and are set high the pins will be burned out from excess current.

I think I have read, but do not remember where, that inputs tied to 0V are better than outputs tied to 0v and set low.
 

manuka

Senior Member
-with perhaps 20uA average current drain (to give several years operation from a pair of AA cells)
I'm all for squeezing every last Joule out of batteries,perhaps via software tweaking,BUT a significant issue with "near shelf life" AA powered devices relates to terminal corrosion/cell leakage. An erratic supply can then result,perhaps long before the batteries themselves go electrochemically belly up.

Even quality AA cells can fall prey to this-I've just disassembled a no-go AA (alkaline) powered weather station & found dirty contacts (perhaps from salt spray- we live close to the sea) were it's only woe.

Rather than "lily gilding" at the consumption level, it may hence be worthwhile fitting a small solar PV onto the casing, along with NiMH cells or supercap? Naturally you'll need SOME cell illumination, but ambient room lighting can readily produce mA level outputs (at a few V) from the likes of cheap solar garden lamp PVs.

But -"We don't want no stinking solar panels"- consider the dual-action (emission/detection) of certain LEDs.(It's known as the “Mims Effect" after the discovery by Forrest M. Mims III). Exposing a 5mm green LED to low angle watery NZ sunbeams (down under seasons of course, so late Autumn) yielded ~½V at ~10 µA (into a 1 MegOhm load), with bright sun even giving ~1½V. Although such ambient energy scavenging may be tempting, pickup was noted as quite directional, so let's keep things in perspective & call it a few handy µA. However a series string of these neatly mounted & you could be good to go!

Extra: That small red ammeter is ex. my grab bag toolkit. These DMMs have long been popular down under, & sell/sold at Dick Smith for as little as US$5 - I've given away crates of them when enthusing youngsters. However they've a quirk in sunshine, as their internal IC seems light sensitive,causing fine readings to be influenced by errant shadows & sunbeams etc! It's not usually a problem, but can be when doing delicate outdoor work (as shown). The cure is a strip of black tape on the PCB underside- refer picture. Stan.
 

Attachments

Last edited:

srnet

Senior Member
I can sort of see some sense in adding series resistors to unused pins, to pull them low, in case during development you 'accidentally' set one high or low.

But for a finished project I dont see the need for external resistors or pulldowns, just leave the unused pins unconnected and set them high or low when the program starts.
 

Richbk

New Member
Thank you again for the responses everyone. I'm working with quite a confined space so I'll try simply setting the unused pins as low and leave them unconnected.
 

hippy

Ex-Staff (retired)
I'm working with quite a confined space so I'll try simply setting the unused pins as low and leave them unconnected.
It would always be worth prototyping before committing to a final design and that way you will be able to compare exactly what the different options give and choose the best. Plus you will have a reference for what should be expected of the PICAXE if you for some reason end up with higher consumption when the full board is designed.
 

fernando_g

Senior Member
Manuka has a point. Even the better alkaline cells tend to leach out.

A better, but more expensive solution is to employ lithium AA cells. Their capacity also holds better at lower temperatures, another plus.
 
Top