Today, we analyze a classic single-chip power supply circuit. The schematic diagram of the circuit is shown in the following figure:

▲ The simplified circuit of the switch circuit

before the circuit is powered up. The switch “TEST” is open and the microcontroller is not powered up through VCC. At this time, the base of T1 is grounded through R9 (100k) and is in an off state. The Test and T1 connected to the base-level resistor R7 of T3 are in the cut-off state, so T3 is also in the cut-off state.

The power supply +9V is isolated by T3, and the voltage regulator chip IC2 is not loaded, and the output VCC of IC2 remains low.

▲ Circuit off state

Press the button “TEST” to start the circuit, the base of T3 is grounded through R7, Test, and be of T2, so that T3 is turned on. At this time, +9V is added to IC2 voltage regulator chip through T3. IC2 output VCC is added to the microcontroller.

After the microcontroller works, it outputs a high voltage through IO2, and turns on T1 through R8. At this time, even if the Test is released, the base of T3 can be grounded through R7, LED1, and T1 to realize the self-locking of the power supply.

▲ Press TEST to start the circuit

▲ After the circuit is started, the MCU provides the base voltage of T1 to maintain the conduction of T3

After that, the MCU software can make the IO2 port return to a low level, so that T1 is turned off, and then T3 is turned off.

According to the IO1 port, the switch state of T2 can be read, and then it can be judged whether the user presses the function key. After judging that the user presses the Test, after the user releases the Test, the IO2 can be set to a low level.

It is also possible to automatically delay the power-off according to the software function, thereby reducing the consumption of the power supply.

Reviewing Editor: Tang Zihong


Leave a Reply

Your email address will not be published.