News:

;) This forum is the property of Proton software developers

Main Menu

Software controlled power down

Started by david, Jan 04, 2025, 06:28 AM

Previous topic - Next topic

david

Hi All,
I need to make a small number of battery operated devices and I think an automated power down may be required in case they are left on.  I know I can put the micro to sleep but there are other loads that also sit across the supply so I'm thinking of using something like the attached circuit.
A press of the push button turns the circuit on and a delay in asserting RA2 determines the hold time.  For turning off, RA2 is set low and everything should power down. 
Is anyone using something similar to this for portable devices and is it as simple as it seems?  My concern is that as the supply drops to say 1.5V that the output pins may become unpredictable (no longer active low) and hold the circuit in a low voltage state. 

Cheers,
David

trastikata

Hello David,

if you put a pull-down resistor on that transistor base and instead of pulling down the pin, you make a it an input, this shouldn't cause a problem?. After power on you turn the pin to output to hold the transistor.


TimB


In case it's of use this is the power supply setup I used on a battery product


ken_k

#3
Quote from: david on Jan 04, 2025, 06:28 AMMy concern is that as the supply drops to say 1.5V that the output pins may become unpredictable (no longer active low) and hold the circuit in a low voltage state. 

Cheers,
David
Hi david.
Maybe you could place a resistor between Q2 base and ground such the 47k resistor and the new resistor form a voltage divider, the value could set such that > 2 volts from U2 would be required to hold Q2 on. If  instability happens at 1.5 volts RA2 cannot turn Q2 on.
kk

david

Thanks for the replies and ideas.
I think a resistive pulldown on the base of Q2 would be prudent even though the circuit works as shown.  It would allow 2 software only options to try.  i.e. Active high and active low vs active high and high-Z low.  I think I can also play the brown-out voltage level to some advantage here too.
I was cheeky enough to try using just Q1 and switching the PIC's output pin from active low (for ON) to input (for OFF) and that did hover around at about 1.3V on the supply - probably because the gate-source resistor would bias the PIC's input gate protection diode on and forward conduct to the supply line.

Cheers,
David

Mapo

#5
Hi David,
I took inspiration from this article

https://circuitcellar.com/resources/quickbits/soft-latching-power-circuits/

I have used the last scheme

Mapo

david

Many thanks for the interesting link there Mapo.  That's an excellent paper on the subject.  I think Figure 3 is very versatile and could be manual ON/OF or manual ON, software OFF depending on software used.
Much appreciated.

David

midali

The schematic from figure 3 I use it in the last 12 years .
Another way is LM2576/2596 -5V , it have a ON/OFF pin controll .I use this way when is necessary a high current (up to 2A) on 5v line .
Also look at Infineon, High side drive IC is a best way .
All variants can be controlled by push button and software .

david

12 years is a good enough endorsement for me.  I'm only after a few hundred mA so I think the discrete parts will do nicely.
Thanks for your comments.

David