zero standby current

hax

New Member
I have a battery powered application where I want the picaxe to turn itself off. That is to say, disconnect power to itself.

During the off state the circuit must use zero current and wait till a momentary pushbutton is pressed. I have thought of this solution

http://www.members.optusnet.com.au/philpawlowski/psucontrol

In the off state, there is no current used up at all. When the Power pushbutton is momentarily pressed, the picaxe gets power and immediately latches the relay, which continues the power supply after the momentary switch is released. The circuit then does what it needs to do, and turns off once it is done by releasing the relay.

This works, but I would like a solid state solution. I don't think a transistor would work for this purpose, as a transistor needs a "non floating" ground. Is there another way to do this without a physical relay?

I know there are techniques to decrease the amount of power the picaxe can use, but I'd prefer a circuit that shuts everything off including the picaxe.

Could a logic level mosfet be used for this purpose? I'm not too familiar with mosfets.
 

Michael 2727

Senior Member
There are Micro Relays available, they run on 5, 6, 12 Volt types, they draw very
little power, as much as an LED or just over.
You may even find one in a dead modem card free,,
If you get a DPDT model it can be made to
self latch, or just let the picaxe control it.
These relays are for signal voltages, nothing
heavy duty but should run a picaxe with room to spare ( Typ 30V Max @ 1A ).

Edited by - Michael 2727 on 1/14/2006 7:55:41 AM
 
First, if you use relays its a good idea to get in the habit of protection diodes for back EMFs.

Some years ago I did a 2 transistor+ 3 resistor design to do (I think) what you want. I used an NPN-FET(P) config.
The quiescent current wasn't sensibley measurable on my cheapo micro-ammeter. I'd guess <0.2 microamps at room temp.
Easy, cheap and reliable. In fact still working after 4 years on same lithium battery.
You'll have to write some latching software but its nice because you can use a 'reset/reboot' button as an OFF switch too. Works with PICAXE and Stamp and I would assume just about anything.
 

Gussy

Member
interesting... this got me thinking, would it be possible to turn a picaxe off, or into a low power state, via some 434 tx/rx, the turn it back on remotley?
 

manuka

Senior Member
It may be worth checking the collected wisdom on this from eaxactly a year ago =&gt;<A href='http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=2176&amp;forum_id=14&amp;Topic_Title=Shut%2Bdown%2Bof%2Bexternal%2Bcircuitry%2Bto%2Bsave%2Bpower&amp;forum_title=No+new+posts+please%21+8 ' Target=_Blank>External Web Link</a>
 
Don't see why not.

Though if you turned the PICAXE right off using this method, you would still have to provide power to the Rx receiver.
I suppose you have 2 main options;
1. Use the RF plus code to put the PICAXE into a NAP routine from an RF command where it powers-up Rx at intervals to have a listen. (perhaps even reduce clock speed too with a little more fiddling)
2. If you powered the PICAXE right off you could duty-cycle the Rx Module using a timer chip e.g. CMOS 7555 or better a 4538 as it uses less power.

Personally, I'd NAP the PICAXE and use a bit of code to duty-cycle the Rx mod. I assume the Rx mode is one of the Industry standard SIL modules like those from RF Solutions or Radiometrix? If so you could use the RSSI pin to monitor for an RF signal in your duty cycle design.

Anyway, just a thought off the top of my head. I haven't sat down and sketched it as I have to wallpaper my Mother In law now.
 

mikek

Member
There is a solid-state solution (using a single transistor, I believe) on Parallax's web site. I don't have a link handy, but I'll post it if/when I can find it later today (Saturday).
Mike
 

wilf_nv

Senior Member
This may in part account for the discrepancy between the mfr's specs and measured standby current.

From my experience of working with discrete CMOS logic, standby current of static digital CMOS devices is lowest when the voltage level on the input pins is near Vss or Vdd. When the input levels hover around the CMOS switching thresholds, the standby current is highest.

By forcing input levels to near the supply rails during standby, the CMOS device (Picaxe in this case) supply current can be minimized.

wilf
 

hippy

Technical Support
Staff member
Don't forget that a PICAXE can provide power to other PICAXE's and devices ( 20/25mA per pin, 100mA total per port ) so a PICAXE could be used as a master power controller for the main part of a circuit, running at low Osc speed and sleeping most of the time.

I believe from other posts that there are some issues on 08/08M's in achieving ultra low power operation, but a dedicated PICAXE would appear well suited to wake-up on 433MHz etc.
 

hax

New Member
Mikek,

Thanks for that. That circuit was exactly what I was after- that is- something that switches off the power to the picaxe completely.

As I understand it, the pressing of the momentary button causes the 2N3904 to conduct momentarily, which turns on the 2N3906 and supplies power to the picaxe (or stamp or something else). The moment this happens, the picaxe should be programmed to set its output high to keep the power going.

When the picaxe wants to turn itself off, it brings its output pin low, which turns off the 2N3904 and the 2N3906 gate begins to float high which turns off the power to the picaxe.

Of course, the only drawback of this circuit is that the picaxe can not turn itself on automatically. It has to wait till the button is pressed. That's not an issue for my application.

I have added a voltage regulator to the circuit so that the circuit can be used with any power source. In my case it will be a 12V battery. The voltage regulator only turns on when the picaxe does, which keeps the current ridiculously low while on standby. The zener is also added to clamp any voltage over 5V which may damage the output pin.

Credit goes to the original author of the diagram of course.

Do you think the zener is necessary?

Here is a modified original diagram with the zener and voltage regulator.

http://www.members.optusnet.com.au/philpawlowski/standbyCCT
 

wilf_nv

Senior Member
The zener is not required as the 2N3904 base is clamped to 0.6V. The circuit can be simplified as shown here:

http://snipurl.com/lkzr

The 2N3906 transistor is fine for currents up to 100mA. Use a PN2907 or equal for current up to 500mA.

wilf
 

andrewpro

New Member
RE the parallax circuit:

It would be easier to jsut use a single darlington transistor, and a cap and resistor and a pushbutton.

The pushbutton shorts the emitter and collector of the darlington, which feeds power to the picaxe. The picaxe then turns on, sets a pin high, and the darlington turns on, keeping the power going to the picaxe until the pin goes low. The resistor and cap are for debouncing the push button.

If you used a small relay as well, you could get 0 current draw when off, since a relay has no leakage.

--Andy P

Edited by - andypro on 1/15/2006 5:39:41 AM
 

hippy

Technical Support
Staff member
The problem with a relay is that it draws current, thus reducing the time the unit can be on for before replacing batteries.
 
I thought it only had a 'single' transistor Mike? Is there a different one? I'd be interested in that as I couldn't get anything to work properly with only one.
I'm sure someone will use circuit theory to prove this...
I'd be also interested to see how a single Darlington would do the job as that would save circuit space.
 

andrewpro

New Member
ok, this is the general idea. Sorry about the quality, I whipped it up in MS paint :).

<A href='http://research.plistin.com/power.GIF' Target=_Blank>External Web Link</a>

You may be able to do away with the RC part, as I suppose it doesn't matter how many times the picaxe resets itself, unless your keeping track of that sorta thing.

When you bypass the transistor with the switch, you apply power directly to the picaxe. Then you make the IO pin high, turning on the transistor, and allowing you to let go of the switch. That's the principal anyways.

--Andy P
 

hax

New Member
Andy, I think your circuit would only work with a 5V power supply. I think it would be incompatible with switching a regulator on and off. Right?

Wilf, I reckon you onto something. I could take out the LED if I didn't want one right?

-Phil
 
Ah, I'll try it out later. Ta.

A couple of comments on the parallax and similar.
Firstly, Question: How much current are those circuits drawing when switched on? I guess it'll more than the PICAXE.(if it can light an LED enought to see). I used FET/Bipolar arrrangement which only uses a tiddly quiescent current - please I'm not being a big-head, its just that I needed as low a power consumption as possible at all times.

Secondly, and especially if you're doing commands that may affect all O/P pins; you will probably have to introduce some capacitance into the latching circuit and a 'power refresh' command regularly in your code.
I had exactly this situation when using 18X+LCD (I know why so lesson not required).

I merely mention this if you find that your circuit keeps switching itself off.
 

hax

New Member
Frankeltham, I'm using the LCD code as well. I have put high commands just after each LCD command. It should be OK. I'll add some caps and see how I go.

This is all going towards my cox box project, which I will publish online for anyone to build, so I will keep a record of what works and what doesn't. Thanks all for helping out. This forum is fantastic and credit will go to all that helped!

 
Hi Haxby, same here.
But I did have problems without caps.
In my case I am using a button connected to the 'reset' pin to switch off. The caps (depending on value obviously) introduce a lag, so if you use the reset button as an off you may have to have a pause at the beginning of the code so it doesn't restart. Anyway, I'm sure you'll get round that if necessary.
 

mikek

Member
I said I thought it had a single transitor. The link I posted is the one I was referring to (2 transistors). The &quot;one transistor, I believe&quot; was supposed to convey uncertainty. :)

Sorry, but I can't add any additional info. The circuit isn't mine. It comes from here: http://forums.parallax.com/forums/default.aspx?f=15&amp;m=88548&amp;g=88695#m88695
 

wilf_nv

Senior Member
Baxby - yes, the LED is optional but you may as well put the 10ma base curent of the PNP to good use with the LED indicating the active on state of the latch. btw This basic complementary transistor circuit is often referred to as a &quot;SCR&quot; which it mimics. The embedded picaxe would probably make this the most intelligent SCR in the world!

Andypro - I was curious how you were planning to do this with a single darlington. The problem is that the base voltage must be 1.2V higher than the emitter but the voltage at the i/o pin can never be more than the emitter. You would need to use a toggling i/o pin and a voltage pump to boost the base voltage. Probably more complicated than the SCR.

wilf
 

wilf_nv

Senior Member
Andypro and Haxby - when I said voltage pump I meant something like this:

http://snipurl.com/llbh

Somewhat complex but illustrates the general principle of high side boost drive of N-ch. MOSFETS. Note the 10K series resistor protects the I/O pin from +V transients.

The I/O pin needs to oscillate continuously using the 0.1uF the source to gate capacitor shown. If that cap was 10uF then a periodic burst of pulses every few seconds can be used to refresh the gate voltage.

The effect of the relatively slow FET turn-on and turn-off times need to be taken into account, for example on the slew rate of the switched Vcc.

wilf
 

KMoffett

Senior Member
I haven't been following this forum, but someone on the Yahoo forum said you were looking for a solution to a problem that I had just solved. I developed and tested a circuit (picaxe 08M) that: a momentary PB turns on the Picaxe, the picaxe turns on a 2n3904, the transistor turns on a P-channel MOSFET, and the MOSFET maintains power to the Picaxe. In my case a second push on the PB shuts the circuit to zero current draw. Or you could have the Picaxe shut itself down at the end of a process. I don't know if there is a place to post files and images here, but they are in the FILES section of the Yahoo forum under a folder: &quot;Servo vs Pulse Problem&quot; or just use: http://groups.yahoo.com/group/picaxe/files/Servo%20vs%20Pulse%20Problem/
 
Top