PDA

View Full Version : How can a battery powered PIC turn itself off?



tekart
- 29th September 2008, 16:53
I am trying to build a battery powered device that runs on 2 CR2032 coin batteries. I want to be able to press a button to activate it, then it does its thing and powers itself off.

So I put the button switch between the battery ground and circuit ground and put a MOSFET across it. Push the button, PIC wakes up and sends a HIGH signal to the MOFET gate to hold power on when the button is released. So far so good.

Now when the PIC has completed its task I drop the MOSFET gate line low in code, but the circuit does not power down. A voltage remains on the driver line and I'm not sure why.

Anyone have a working solution to this problem. I am open to anything!

Guy

Jumper
- 29th September 2008, 17:00
Hi,

Add a pulldown resistor between the gate and ground. That will keep the gate closed when the button is not pressed ot the pic pin is high. 10k or whatever you have at hand.

/me

Melanie
- 29th September 2008, 17:23
This ditty does exactly what you want...

http://www.picbasic.co.uk/forum/showthread.php?t=3510

Ah... I think it's too big for the forum since the filesizes have been reduced since that was posted... here's another link to something similar but different...

http://www.picbasic.co.uk/forum/showthread.php?t=57

tekart
- 29th September 2008, 20:45
Jumper - a pull down does not work, don;t know why. But the thread Melaine pointed me to yielded a circuit that I simplified a bit that works like a charm. Thanks Melanie you totally made my day, I will cross post my solution to the other thread. See attached.
Guy

skimask
- 29th September 2008, 21:03
Jumper - a pull down does not work, don;t know why. But the thread Melaine pointed me to yielded a circuit that I simplified a bit that works like a charm. Thanks Melanie you totally made my day, I will cross post my solution to the other thread. See attached.
Guy
...disregard...misread the original question.
But...could be that you ended up with a voltage divider at the gate of the mosfet and when the PIC's signal was removed, the pulldown wasn't strong enough to pull it far enough and the FET stayed on...

Thoranaga
- 1st October 2008, 06:44
I use this small addon circuit to my PIC :

aratti
- 1st October 2008, 10:20
This circuit is capable of very high current, and I use it several times!

sougata
- 1st October 2008, 14:55
Hi,

If your circuit is not powering other blocks having higher quiescent current you may use the PICs sleep mode. Nanowatt PICs with internal or LP oscillator works great and never lets me down.
Advantage : You might end up using a single CR2032 for your circuit. Cause your circuit drops out at least 0.6 volts and PICs works from 2 volts.

Sean_Goddard
- 9th August 2012, 10:44
Had the same problem, then I looked carefully at the circuit and laughed my head off!

Like you I switched the POSITIVE side of the power....BAD MOVE..put the FET in the NEGATIVE rail so the circuit you want to power is effectively the LOAD use a pull down resistor of 10K or so and ALL will be well.

Took me a while to figure this out, but if you look at what is happening then it's obvious. :rolleyes:

Hope this helps.