Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Power switch PMOS controlled by button or Microcontroller (or both)

Status
Not open for further replies.

bmalbusca

Newbie level 5
Joined
Dec 22, 2021
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
76
Hello,

I´m trying to design an analog circuit to use a push button to turn on an MCU and then use it the same push button to change modes. A "one push button circuit". To achieve that, I used a pmos to work as a switch on the power signal and then used a 2 nmos circuit for or signal circuit that controls the pmos. In beginning, the pmos gate is at 5V by the pull-up resistor 14. When the user makes a long press on the button, the nmos1 will turn on and consequently put the pmos gate to 0V. This will turn on the pmos and power the MCU, which will turn I/o port D6 to high (still pressing the button) that turn nmos2 and will keep the pmos ON. I then tested the circuit on the simullide and everything worked so far (files attached).

Things started to go wrong when I converted this to a real circuit. I used for nmos DMN53D0LQ-7 and for pmos I tried 2: PMN30XPX Nexperia, AOTS21115C‎ . To choose the transistors I looked to vth and I make sure the vth levels are compatible with TTL 3.3V (checking current vs vg and saturation zones), leakage currents, and vds. The nmos side worked as intended but the pmos didn´t work. The behavior was different on the two pmos. The AOTS21115C‎ never fully turned on but showed an interesting output, oscillated between 0.2V and 1.1V. The PMN30XPX was always on, never turned off. Any suggestions will be welcome.

schematic.png
 
Last edited:

Hi,

I did something similar. I find more simple.

power_on.png


When SW1 is pressed: it activates Q2 to power ON the MCU
R1, C1 are for delayed switching OFF power (maybe 100ms ... 1s) like R1= 1MOhm, C1 = 1uF
At power up the MCU sets Pin (2) HIGH to ensure power stays ON
at MCU Pin (1) your firmware is free to detect button press and react on it.
To switch OFF power just set Pin (2) = LOW

There is room for improvements. ;-)

I recommend to use the MCU internal watchdog to ensure proper power up after power down

Klaus

P.S.: no need to use exact parts for Q, D, R, C
 

Hi,

I did something similar. I find more simple.

View attachment 173516

When SW1 is pressed: it activates Q2 to power ON the MCU
R1, C1 are for delayed switching OFF power (maybe 100ms ... 1s) like R1= 1MOhm, C1 = 1uF
At power up the MCU sets Pin (2) HIGH to ensure power stays ON
at MCU Pin (1) your firmware is free to detect button press and react on it.
To switch OFF power just set Pin (2) = LOW

There is room for improvements. ;-)

I recommend to use the MCU internal watchdog to ensure proper power up after power down

Klaus

P.S.: no need to use exact parts for Q, D, R, C
Hello KlausST,

Thank you for sharing your circuit. I was hesitant of using a bipolar transistor because of the static current consumption. Do you remember the current drain from your circuit? The C1 is mandatory to this circuit?

Bruno
 

Hi,

The BJT needs no power when OFF.
The ON current is maybe 0.3mA and can be reduced when using a higher value base resistor.
It should be negligible compared to the other application current.

Klaus

You don't like Cs?
I'd say a circuit without a C is no circuit. ;-)
Try it with and without C .. if you don't need it, omit it.
 

Hi,

The BJT needs no power when OFF.
The ON current is maybe 0.3mA and can be reduced when using a higher value base resistor.
It should be negligible compared to the other application current.

Klaus

You don't like Cs?
I'd say a circuit without a C is no circuit. ;-)
Try it with and without C .. if you don't need it, omit it.
Thank you very much @KlausST, I will order the components and test it
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top