Low power on/off circuit

Buzby

Senior Member
Hi All,

The next challenge I have is to turn my PICaxe 'on' with a push-button, then 'off' under software control. ( This part of the project is a handheld device with a few buttons and LEDS. It's just the sort of thing that someone will forget to turn off when they've finished using it !.)

I found this gadget, http://www.pololu.com/catalog/product/750 but it seems a bit of overkill, especially if my attached circuit has a chance of working.

The logic is quite simple. Pressing the PB turns on the FET, thus powering the PICaxe. The PICaxe then drives the output low, thus keeping the FET conducting. When the time is right the PICaxe drives the output high, which turns off the FET.

Has anybody tried anything like this ?. Are there any pitfalls I might run into ?.
 

Attachments

jaka

Member
RS have a nice little reed relay. Works directly from a picaxe output. Also has a built in back emf diode. I have a front door push that shorts out the relay. 08M switches the relay on, plays a tune then switches it off.

Ok it costs a couple of pounds, but saves a lot of hassle.
 

jglenn

Senior Member
His fet circuit looks like it will work, but you have to hold the button down until the picaxe turns the fet on, a led indication of that would be nice.

I have used the 4013 D flipflop for this, controlling a N fet in the ground lead of a circuit. The only thing is that the 4013 needs to be powered all the time, it only took a few microamps out of the 9V battery. The set and reset inputs are simple to use, and I configure the D input so that it does a power up reset (small cap on clock input to ground, and a pullup resistor.).
 

Buzby

Senior Member
Hi All,

Thanks Eclectic, I've spent the last three hours following posts from your links !.

The general consensus seems to be that you need two transistors, either FET or bipolar, to make the idea work properly. Although these are simple circuits to build I want the project to have as little custom construction as possible.

Jaka's suggestion of a relay is a solution I had dismissed earlier as being too clunky and old-fashioned !.

However, this application will be drawing between 15 and 50mA for about 1 minute, followed by about 5 minutes 'off' time. In a whole 'working day' it will not be 'on' more than about 20 times. In these circumstances the extra few mA for a relay coil would have hardly any impact on battery life, and it is less custom construction, so I may go that way after all.

But the forums also showed me a completely new idea.

Use a second PICaxe, which spends most of its time sleeping, just to detect the pushbutton, and use 4 outputs from this PICaxe to provide 100mA ( 4 x 25 ) as the supply to the 'main' PICaxe and the other circuitry. Also, this solution has no custom circuitry, just one PICaxe board wired to another.

So it looks like I'm going to use a relay or a second PICaxe.

Time to get the breadboard out !.

Thanks for all your help.
 

leftyretro

New Member
Last edited:

BeanieBots

Moderator
The logic is quite simple. Pressing the PB turns on the FET, thus powering the PICaxe. The PICaxe then drives the output low, thus keeping the FET conducting. When the time is right the PICaxe drives the output high, which turns off the FET.
.

Think about that for a minute.

A 'HIGH' turns the FET off. The PICAXE is not powered.
What then happens to the 'HIGH' on the PICAXE output?

This has been covered several times here and although I've not followed all the links posted above I'm they will give good suggestions.
Bottom line is that you need some form of latch.
A relay is the simplest solution where a high from the PICAXE keeps it ON.
Personally, I use latching relays with two coils. One coil turns latches it on, the other latches it off.
 

Buzby

Senior Member
Hi all,

BeanieBots said - "What then happens to the 'HIGH' on the PICAXE output?"

The PICaxe output does not actually need to 'drive high', it just needs to go O/C or tri-state, which is what I assumed would happen. However, the other forum posts seem to show that the output pin will 'tend to zero' when the +5 is removed.( Spurious diode effects etc. ) I think this is why all the working solutions are two transistor. ( I've attached the easiest one to understand, off the Stamp forum ! )


Retrolefty said - "I built a manual power on / software power off using a single coil latching relay".

That is a really neat idea !. Using the charge/discharge of a capacitor to create pulses of alternate polarity through the relay coil. I am going to buy some of those relays for future use. Thanks for the pointer.


Mpep said - "Even so... 2 transistors are still cheaper though! "

Very true. But cost is not always the priority.

One aim of this project is for it to be replicated by people who only have basic electronics experience, and a 'board-to-board' wiring solution will be a hundred times easier to faultfind over the phone !.


There's always more than one way to skin a cat, and this forum proves it !.
( Actually, I don't know how to skin a cat at all, nevermind in another way. Is there a cat skinning forum somewhere ?.)

As it is, I'm going to use my first idea, the Pololu switch.

"What ??", I hear you say. "He asks our advice then ignores us !."

Not at all. The forum has given me a lot of new info, and made me go over my requirements with a fine tooth comb. Without the forum to make me re-think I could quite easily have gone off on the wrong track.

Thanks again to all the contributors who make this such a lively place !.
 

Attachments

hippy

Ex-Staff (retired)
One thing to note for PICAXE's / PICmicro acting as power sources is that the latest Microchip datasheets have re-rated the total current that can pass through some of them / any I/O port as 95mA/90mA, down from much higher stated ratings in earlier datasheets.
 
Top