Company news

Your present location > Home page > Company news
One-button power on/off circuit with anti-leakage current protection
time:2025-05-16
Number of views:9999
Back to previous page

Today I will share with you a one-button power on/off circuit based on PMOS tube.

image.png 

Principle of power on/off function

Power on : When the switch is pressed, the gate of PMOS is pulled down, PMOS is turned on, and the power is supplied to the subsequent circuit through PMOS to start the machine. If you release the switch within 3 seconds, the circuit will automatically shut down due to program control; if you press and hold for 3 seconds, the microcontroller will set PowerCtrl to a high level, pull down the gate of PMOS, and keep PMOS turned on. At this time, you can keep the machine turned on by releasing the switch, and the indicator light will be on.

Shutdown : After turning on the power, press and hold the switch for 3 seconds. The microcontroller sets PowerCtrl to a low level, releases the PMOS gate, and the PMOS is turned off, cutting off the power supply, turning off the light, and stopping the program. At this time, release the switch to truly shut down the machine, and there is almost no leakage current.

The role of diodes D1 and D2

Function of D1 : The GPIO of some microcontrollers is not in high impedance state by default. When the PMOS gate is grounded through the switch, current may flow out through the GPIO. Setting D1 can prevent this leakage current, ensure the stability of the PMOS gate potential, and avoid false triggering.

Function of D2 : When PG is low, the NPN transistor is turned on. If there is no D2, the Vce of NPN may pull down switch_check. D2 prevents the current from passing through NPN to ground. When the mechanical switch is disconnected, the microcontroller reads a 3.3V high level through the pull-up resistor. Switch_check is pulled down only when the button is pressed, realizing accurate detection of the button status.

Relationship between input voltage MAX and PMOS Vds

Under the premise of controlling the voltage divider ratio of R1 and R2, the input voltage MAX is mainly limited by the Vds of PMOS. Because when PMOS is turned on, its source is connected to the input power supply and its drain is connected to the subsequent circuit. If the input voltage is too high and exceeds the Vds withstand voltage of PMOS, it may cause PMOS damage. Therefore, it is necessary to select a suitable input voltage range according to the Vds parameter of PMOS to ensure safe and stable operation of the circuit.

 


Sample Req

Online

Telephone

400-655-8788

WeChat

Topping

Sample Req
Online
Telephone
WeChat