circuit help: momentary switch for power on, picaxe to power off.

Hemi345

Senior Member
I remember reading a topic about this but can't seem to find it again.

I'm designing a toy for my daughter who likes to leave things on and run the batteries dead. I want to power it off automatically a short time after she's finished playing with it.

My plan is to have her press the momentary switch to pull the gate on the n-channel mosfet high to connect the Picaxe circuit. Once the Picaxe powers on, the initialize routine would put pin B.3 high and keep the Picaxe powered. I'll use a counter to detect when the device has been idle for ~10 minutes, then put B.3 low which would power it off.

In the attached schematic, there are two circuits. Would the first circuit work fine (the one on top without the p-channel mosfet)?

Thanks.
 

Attachments

Hemi345

Senior Member
So it looks like my 2nd circuit idea for switching the high side necessary. Would I still need to use pull down/up resistors on the mosfets to keep it in the powered off state?

I also have some ZTX1049A (NPN) and ZTX1149A (PNP) lying around that I could use. pull up/down resistors shouldn't be required on those, correct?

Thanks!
 

inglewoodpete

Senior Member
So it looks like my 2nd circuit idea for switching the high side necessary. Would I still need to use pull down/up resistors on the mosfets to keep it in the powered off state?
High-side switching is required. The PICAXE I/O will be high impedance when it is powered down, so you will need to ensure that MOSFET gates can't 'float' at any time.
 

PaulRB

Senior Member
In sleep mode, a picaxe uses only a tiny amount of power, so you could consider a momentarily push to break switch on v+ to reset the picaxe, and a sleep 0 at the end of the code, after a delay. No other components needed.
 

Hemi345

Senior Member
@PaulRB, I thought about sleep mode and triggering a reset, but this might sit for a month at a time with no use so I want it to shut it down completely to save the batteries as much as possible.

The project is going into my daughter's new Powerwheels. It's going to control headlights, turn signals and other stuff I'm adding. I'm tapping into the 4 C alkaline batteries that power the radio. I was planning on just using a diode with ~0.75 voltage drop to the Picaxe circuit. If I was using a higher source voltage, I would use MFB's circuit (great!).
 

MFB

Senior Member
There are 3.3.volt and adjustable versions of the regulator chip that I used for my auto shut-down circuit. Therefore, if you don't mind running the PICAXE from a lower voltage, there would be no problem powering from 3 or more AA cells.
 

Dippy

Moderator
The one I was thinking of was a variation on the Stamp one but using P & N chan MOSFETs.
If you use P chan as your high-sided main switch you will need pull-up on supply side; floating will end in tears as said by IP.
With the MOSFET you can use much higher value resistors and, if needed, include a push-off switch too.

When you've finished it successfully maybe put it in the finished projects section as the Tutorial section never appeared.
 

Hemi345

Senior Member
Here's a power up circuit I built using a PIR. The PICAXE automatically shuts itself down by putting C.5 low when it's finished. The connection on C.3 is just to check if there's still motion and reset the countdown timer which keeps the PICAXE powered up for another X seconds. The circuit uses something like 2uA (mainly the PIR) when inactive so 3 AA batteries last quite a while.
 

Attachments

srnet

Senior Member
I did a circuit that used a P-Channel MOSFET as a switch;

http://www.picaxeforum.co.uk/showthread.php?24254-Battery-Discharge-Protector

Push the button and it turns on the power, both to the PICAXE and what ever is connected to the 12V supply.

I use it to power some of my 12V Radios from Lipo batteries. To prevent over discharge of the Lipo (which ruins them) if the radio is left on, the 08M2 monitors the battery voltage and turns off the power when the voltage gets to low, or just press a button. In the off state I cant measure the current consumption, too low.

The P-MOSFET is generously rated, 29A.
 

Attachments

Top