Self-holding switch circuit for sleep function based on triode and microcontroller
By designing a self-holding switch circuit based on transistors and microcontrollers, the leakage current of transistors is used to achieve a low-power sleep function, which solves the problems of waste of power and high costs in the existing technology, and achieves a longer power life and low power supply. Cost low-power equipment.
Patent Information
- Application Number
- CN202010016945.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-07
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2040-01-07
AI Technical Summary
The existing low-power device wake-up circuits have high requirements for microcontrollers, high costs, and waste of power in sleep mode, which shortens the storage cycle and battery life of the device.
Design a self-holding switch circuit based on transistors and microcontrollers, and control the power on and off through program to reduce the power consumption during sleep, including microcontrollers, linear voltage regulator circuits, touch switches, NPN and PNP transistors , resistors and diodes, which utilize the leakage current of transistors to achieve low power self-holding function.
It effectively reduces the power consumption during sleep and extends the service life of the power supply. It has a simple structure, small area, low cost, and no high-power microcontroller is required.
Smart Images

Figure CN111130526B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a switch circuit, in particular to a one-key wake-up circuit for a low-power device, belonging to the field of new energy and energy-saving technology, and more specifically to a self-holding switch circuit for a sleep function based on a transistor and a microcontroller. Background Art
[0002] At present, the known low-power device wake-up method mainly uses the touch switch and the sleep function of the microcontroller (MCU). The touch switch is connected to the wake-up pin of the microcontroller. When the touch switch (especially the touch switch) is pressed, a high-level or low-level pulse will be generated on the wake-up pin of the microcontroller. This pulse will wake up the microcontroller from the sleep mode, and the low-power device will enter the working mode from the sleep mode. This method has a simple circuit structure, but when using this method, the microcontroller and peripheral circuits of the low-power device in the sleep mode are still in the state of being powered on, and the system power consumption mainly depends on the power consumption of the microcontroller and the power system when the microcontroller is in sleep mode, and an additional circuit is required to turn off the power of the peripheral circuit, which will not only increase the demand for the microcontroller and increase the cost, but also cause a certain amount of power waste in the sleep mode, shortening the storage cycle of the low-power device and the life of the battery or its power supply. Summary of the invention
[0003] In order to overcome the shortcomings of the existing low-power device wake-up circuit, which has high requirements for the microcontroller, high cost, and certain power consumption when in sleep mode, the present invention provides a new self-holding switch circuit. The circuit can not only control the power on and off of the entire system through a program, greatly reducing the power consumption of the system when in sleep mode, but also has a simple structure, small footprint, low requirements for the microcontroller, and low cost.
[0004] The technical solution adopted by the present invention to solve the technical problem is: constructing a self-holding switch circuit for sleep function based on a transistor and a microcontroller, including: a microcontroller, a linear voltage regulator circuit, a touch switch, a working power supply, an NPN transistor, a PNP transistor, first to third resistors, a first diode and a second diode;
[0005] The e-pole of the PNP transistor is connected to one end of the touch switch and is also connected to the positive power supply end of the working power supply. The first resistor is connected between the e-pole and the b-pole of the PNP transistor. The c-pole of the PNP transistor is connected to the input end of the linear voltage regulator circuit. The output end of the linear voltage regulator circuit is connected to the positive power supply input end of the microcontroller. The linear voltage regulator circuit is used to linearly regulate the voltage at the c-pole input end of the PNP transistor and then provide it to the microprocessor; the other end of the touch switch is connected to the anode of the second diode, the cathode of the first diode is connected to the cathode of the first diode, and the negative power supply end of the working power supply is connected to the negative power supply input end of the microcontroller;
[0006] The e pole of the NPN transistor is grounded, the c pole and the b pole of the PNP transistor are connected in series with a third resistor, the b pole of the NPN transistor is connected in series with a second resistor and the cathode of the first diode in sequence, and the anode of the first diode is connected to a control output pin of the microcontroller.
[0007] Furthermore, in the self-holding switch circuit for sleep function based on a transistor and a microcontroller of the present invention, the control output pin is an I / O terminal of the microcontroller.
[0008] Furthermore, in the self-holding switch circuit for sleep function based on transistors and microcontrollers of the present invention, the touch switch is a light touch switch.
[0009] Further, in the self-holding switch circuit for sleep function based on transistors and microcontrollers of the present invention, at T0, the touch switch is pressed, the e-pole of the PNP transistor inputs a valid high-level signal, the c-pole of the PNP transistor is connected to the positive power supply end of the working power supply S, and the linear voltage regulator circuit starts to provide the power required for the operation of the microcontroller, and then the microcontroller starts to work; the microcontroller starts and executes the initialization program, and after ΔT, at T1, the microcontroller controls the control output pin to be high level, and the c-pole of the PNP transistor continues to be connected to the positive power supply end of the working power supply; after ΔT1, at T2, the touch switch is released, the c-pole of the PNP transistor loses the high-level signal generated by the touch switch, but still retains the high-level signal generated by the I / O pin controlled by the microcontroller, so the self-holding switch circuit continues to work, the microcontroller continues to work, and the circuit startup is completed at this time, that is, after the user touches the touch switch lightly, the circuit starts and self-holds.
[0010] Furthermore, in the self-holding switch circuit for sleep function based on transistor and microcontroller of the present invention, when the user wants to put the self-holding switch circuit into sleep state, the microcontroller sets the control output pin to a low level, so as to turn off the power of the whole self-holding switch circuit and wait for the next wake-up start.
[0011] The self-holding switch circuit for sleep function based on transistors and microcontrollers of the present invention has the following implementation effects: the present invention can reduce power consumption during sleep without considering the use of a low-power microcontroller, and compared with most existing solutions, the power consumed during sleep is lower, which only depends on the leakage current of the transistor, thereby increasing the service life of the power supply of the low-power device and controlling the on and off of the power supply. At the same time, the structure is simple, the circuit board area is small, and the cost is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0013] Figure 1 It is a circuit diagram of an embodiment of a self-holding switch circuit for a sleep function based on a transistor and a microcontroller of the present invention;
[0014] Figure 2 This is a control timing diagram of an embodiment of a self-holding switch circuit for a sleep function based on a triode and a microcontroller;
[0015] Figure 3 yes Figure 1 The specific implementation circuit of the embodiment in the embodiment. DETAILED DESCRIPTION
[0016] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0017] refer to Figure 1 , Figure 1 1 is a circuit diagram of an embodiment of a self-holding switch circuit for a sleep function based on a transistor and a microcontroller 3 of the present invention. The self-holding switch circuit for a sleep function based on a transistor and a microcontroller 3 of this embodiment includes: a microcontroller 3, a linear voltage regulator circuit 2, a touch switch 1, a working power supply S, an NPN transistor, a PNP transistor, first to third resistors R1, R2, R3, a first diode L1 and a second diode L2; the touch switch 1 is a light touch switch in this embodiment.
[0018] The e-pole of the PNP transistor is connected to one end of the touch switch 1 and is also connected to the positive power supply end of the working power supply S. The first resistor R1 is connected between the e-pole and the b-pole of the PNP transistor. The c-pole of the PNP transistor is connected to the input end of the linear voltage regulator circuit 2. The output end of the linear voltage regulator circuit 2 is connected to the positive power supply input end VCC of the microcontroller 3. The linear voltage regulator circuit 2 is used to linearly regulate the voltage of the c-pole input end of the PNP transistor and then provide it to the microprocessor; the other end of the touch switch 1 is connected to the anode of the second diode L2, the b-pole of the NPN transistor is connected in series with the second resistor R2 and the cathode of the first diode L1 in sequence, and the negative power supply end of the working power supply S is connected to the negative power supply input end GND of the microcontroller 3.
[0019] The e-pole of the NPN transistor is grounded, the c-pole is connected in series with the b-pole of the PNP transistor, the b-pole of the NPN transistor is connected to the cathode of the first diode L1, the anode of the first diode L1 is connected to a control output pin of the microcontroller 3, and the control output pin is an I / O terminal of the microcontroller 3. When the touch switch 1 is pressed or the I / O terminal of the microcontroller 3 outputs a high level, the c-pole of the PNP transistor and the positive power supply terminal of the working power supply S can be turned on.
[0020] refer to Figure 2 At T0, the touch switch 1 is pressed, and the e-pole of the PNP transistor inputs a valid high-level signal, and the c-pole of the PNP transistor can be connected to the positive power supply terminal of the working power supply S. At this time, the linear voltage regulator circuit 2 starts to provide the power required for the operation of the microcontroller 3, and then the microcontroller 3 starts to work. At this time, the above steps can be regarded as being completed at the same time at T0; the microcontroller 3 starts and executes the initialization program, and after ΔT, at T1, the microcontroller 3 controls the I / O pin to be high level, and the c-pole of the PNP transistor and the positive power supply terminal of the working power supply S can continue to be connected; after ΔT1, at T2, the touch switch 1 is released, and the c-pole of the PNP transistor loses the high-level signal generated by the touch switch 1, but still retains the high-level signal generated by the I / O pin controlled by the microcontroller 3, so the self-holding switch circuit continues to work, and the microcontroller 3 continues to work. At this time, the self-holding switch circuit is started. That is, after the user touches the touch switch 1 lightly, the self-holding switch circuit starts and self-holds.
[0021] When the user wants to put the self-holding switch circuit into a dormant state, the microcontroller 3 sets the I / O pin to a low level, thereby turning off the power supply of the entire self-holding switch circuit and waiting for the next wake-up start.
[0022] refer to Figure 3 , Figure 3 yes Figure 1 The specific implementation circuit of the embodiment in the embodiment.
[0023] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A self-holding switch circuit for sleep function based on a triode and a microcontroller, characterized in that: include: A microcontroller, a linear voltage regulator circuit, a touch switch, a working power supply, an NPN transistor, a PNP transistor, first to third resistors, a first diode and a second diode; The e-pole of the PNP transistor is connected to one end of the touch switch and is also connected to the positive power supply end of the working power supply. The first resistor is connected between the e-pole and the b-pole of the PNP transistor. The c-pole of the PNP transistor is connected to the input end of the linear voltage regulator circuit. The output end of the linear voltage regulator circuit is connected to the positive power supply input end of the microcontroller. The linear voltage regulator circuit is used to linearly regulate the voltage at the c-pole input end of the PNP transistor and then provide it to the microprocessor; the other end of the touch switch is connected to the anode of the second diode, the cathode of the first diode is connected to the cathode of the first diode, and the negative power supply end of the working power supply is connected to the negative power supply input end of the microcontroller; The e-pole of the NPN transistor is grounded, the c-pole and the b-pole of the PNP transistor are connected in series with a third resistor, the b-pole of the NPN transistor is connected in series with a second resistor and the cathode of the first diode in sequence, and the anode of the first diode is connected to a control output pin of the microcontroller; The control output pin is an I / O terminal of the microcontroller; At T0, the touch switch is pressed, and the e-pole of the PNP transistor inputs a valid high-level signal, and the c-pole of the PNP transistor is connected to the positive power supply end of the working power supply S. At this time, the linear voltage regulator circuit starts to provide the power required for the operation of the microcontroller, and then the microcontroller starts to work; the microcontroller starts and executes the initialization program, and after ΔT, at T1, the microcontroller controls the control output pin to be high level, and the c-pole of the PNP transistor continues to be connected to the positive power supply end of the working power supply; after ΔT1, at T2, the touch switch is released, and the c-pole of the PNP transistor loses the high-level signal generated by the touch switch, but still retains the high-level signal generated by the I / O pin controlled by the microcontroller, so the self-holding switch circuit continues to work, and the microcontroller continues to work. At this time, the circuit startup is completed, that is, after the user touches the touch switch lightly, the circuit starts and self-holds.
2. The self-holding switch circuit for sleep function based on transistor and microcontroller according to claim 1, characterized in that: The touch switch is a light touch switch.
3. The self-holding switch circuit for sleep function based on transistor and microcontroller according to claim 1, characterized in that: When the user wants to put the self-holding switch circuit into sleep mode, The microcontroller sets the control output pin to a low level to turn off the power supply of the entire self-holding switch circuit. And wait for the next wake-up start.
Citation Information
Patent Citations
Self-holding device of road lamp control switch and implementation method of self-holding device
CN102752933A
Power management circuit, method and system
CN104859565A
Self-hold switch circuit for sleep function based on triode and microcontroller
CN211209687U
Computer wake up circuit
US20120297208A1
Power-saving standby method for waste bin sensing circuit
WO2018184317A1
