Absolute lowest power

mhalbern

Member
What code and hardware will put a PICAXE 08M2 into a state of absolute lowest power (that is, current) after completing program execution?

I am using a 3 volt supply, DISABLEBOD, 31k clock, and 47K ohm pull-downs on all unused inputs. According to the manual, at the end of my program, using the END command should get me there.

My circuit measurements indicate about 12 microamperes after the END command has executed on the PICAXE power supply pin.

Is that the best (lowest) I can expect?

Thank you for a reply.
 

srnet

Senior Member
The datasheet for that PIC shows a typical shutdown current of 5.6uA at 3.0v.

And a max of 22uA at 85c, no room temperature max is given.

So 12uA could well be in spec.

Do you get 12uA when you put pulldowns on all the inputs ?
 

Dippy

Moderator
I can't remember the base PIC for the 08M2 but if you look at typical PIC Data Sheets under Electrical Specifications you can see figures for the internal peripherals ; BOD , WDT , ADC , Timer, comparators, etc.

And I can't remember what PICAXE BASIC does at the 'END'.
I'd be tempted to try Poking as many peripherals as poss into Disable and putting the thing into permanent Sleep.
Some options depend on the base PIC and all I/O retain status during Sleep so your external circuitry (which is?) can affect overall current consumption. Microchips Data Sheet specs tend to put all I/O into high impedance mode and tied high.

Have a play and let us know. When you get to these levels even apparently trivial changes can have a significant %age effect.
 

sages

Member
If you want the lowest possible power consumption in the 'off state' put an active device ( transistor/fet ) in series with the power or ground. Use a physical switch across the active device to power on the cct, the first thing you do in code is to 'turn on the active device using one of the output pins. When you want to power off then the last thing you do in code is turn off the active device.

eg use an NPN transistor in series with the ground connection. collector to gnd of pic cct, emitter to power gnd and base with pulldown resistor connected to pic o/p with another resistor. Momentary on power switch is connected across collector and emitter. When you press the switch it provides power to the PIC cct, PIC code turns on the transistor providing power after you release the switch. When you've finished the PIC turns off the transistor and the cct draws 0 current.
You can do similar in the +ve supply with appropriate transistor/cct and/or use a FET.
 

hippy

Senior Member
What code and hardware will put a PICAXE 08M2 into a state of absolute lowest power (that is, current) after completing program execution?
For the absolute lowest power consumption you probably cannot beat the zero current a mechanical relay will give you.

The code will depend on what type of relay you have and how you interface it.
 

Dippy

Moderator
Ultimately it depends on operational requirements and design and power supply....
A relay ,yes, would give the best results but yukky in a small battery powered device. If done correctly, a transistor power control could provide consumption so low that a battery would likely rot first.
Without knowing full details we can't advise the best solution.
 

Jeremy Harris

Senior Member
I implemented a transistor power-off switch in this application: http://www.picaxeforum.co.uk/showthread.php?22014-Squeezing-functionality-out-of-an-OLED-display where a Picaxe turns off its own power supply when the code ends. I couldn't measure the leakage current through the transistor switch, so suspect it's far less than 1µA.

In that application the push button both applies initial power to the Picaxe (allowing it to then latch its own power on) and also provides a digital input signal that the Picaxe then uses to turn its own power off (it can also turn itself off from another programme event, too).
 

Dippy

Moderator
There have been a number of variations on that kind of theme over the years here.
I've done a couple with MOSFETs that I couldn't measure the current, but the device was still running on the same PP3 after 3 years .... but is it applicable to OP's requirements?
We need a little feedback :)
 

mhalbern

Member
Gentlemen, thank you for your replies to my post.

I was unable to find the base PIC device for the PICAXE 08M2 so that I could study the data sheet. Anybody know what part it is?

The application for my post is a door opening annunciator. It is activated by a form A (SPST) magnetic reed switch. My existing design uses a CMOS 555 timer in monostable mode to drive a piezo beeper. I achieved about 9 months of battery life but I thought I could do better.

I obtained a form C reed switch (SPDT) and connected it between the battery and the PICAXE. When the door is closed there is no current, consequently zero power. When the door opens, the PICAXE executes its code (upon power-on-reset) then terminates with the END command, where the manual states the device is in its lowest power state. I was surprised to have 12 uA of current flow after END, but maybe that's nominal. The issue is that the door is occasionally propped open and 12 uA quiescent current will compromise the battery life.

The suggestion to have the PICAXE shut itself off via a transistor is intriguing; maybe workable.
 

boriz

Senior Member
What's the self-discharge of the battery? You might be going to a lot of trouble for little gain.
 

srnet

Senior Member
The issue is that the door is occasionally propped open and 12 uA quiescent current will compromise the battery life
If the door is only 'occasionally' propped open, and then the current drain is 12uA, I doubt that would have a great effect on battery life.

Though without details of the circuit and the battery being used, who knows ?
 

Technical

Technical Support
Staff member
To reduce current the rules generally are:
1) use a disablebod as the first line in your code
2) use a slow clock speed
3) don't leave any pins floating
4) sleep or nap


'End' does do a 'sleep' command but only in bursts of 2.3s or so, as it still checks the download pin every 2.3s for a new download. On the M2 parts the nap command now has an extended time interval range (now over 4mins, previously only 2.3s) so a long nap for 4 minutes will be marginally more efficient than multiple sleeps of 2.3s. It does have other side effects (e.g. hard-reset needed for download) however in this particular case they don't matter as the power to the chip will be reset when the door closes anyway.
 
Last edited:

mhalbern

Member
'End' does do a 'sleep' command but only in bursts of 2.3s or so, as it still checks the download pin every 2.3s for a new download.
Thank you Technical. Here is the code I was using:

main:
disablebod
disabletime
disconnect
setfreq k31
high c.1
wait 1
low c.1
end

I thought that by executing the DISCONNECT command the issue of scanning for downloads every 2.3 seconds or so was addressed.

Not so?
 

Technical

Technical Support
Staff member
Correct, disconnect does take care of the download. But it still wakes up every 2.3s, then sees that it doesn't need to check the download, then sleeps again.. Nap 14 will take this 2.3s cycle to over 4 mins. Marginal in the overall scheme, but still slightly better.
 

TinkerJim

Member
Recently I was looking for a similar circuit. With the help primarily of senior member "sghioto" we got the following circuit to work perfectly:

Picaxe Latching Circuit.JPG

First step in the program is "High 4" and the last one is "Low 4"
It turns on with a touch of the button switch, keeps itself on, and after running through its program, it turns itself off completely.

Another thought for your application is to replace your CMOS 555 with the new ultra low power CSS555 timer. It is pin compatible with the old 555s and just takes about 4uA to keep going. I have used it successfully in a number of applications, both astable and monostable.

TinkerJim
 
Last edited:

g6ejd

Senior Member
Supercapacitors are another option: where charge-hold-up time is given by T = C. (V1 – V2) / IL where T is the hold-up time, C is capacitance, V1 is the charge voltage prior to discharge, V2 is the minimum allowable voltage at the end of the discharge and IL is the load current.

Using a 1.0Farad and 5Volts and a load current of 2uA, a minimum operating voltage of 3.3V, then the hold-up time is = 1.0F x (5V – 3.3V) / 2uA = 850000 Secs or 236Hrs or ~10-days. Cost about £1

1F.jpg
 

TinkerJim

Member
I edited my earlier post to show the circuit schematic again. It works now and it worked when I intially posted - don't know why the link then stopped working for some. Sorry for the inconvenience if I did (or still am doing) something wrong !

TinkerJim
 
Top