Power supply control circuit and method
The power supply control circuit detects the heartbeat signal and controls the conduction or shutdown of the power supply, which solves the problems of electronic products' flash and crash, realizes low-cost anti-flash and crash functions, and ensures the stable operation of electronic equipment.
Patent Information
- Application Number
- CN202111007150.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-08-30
AI Technical Summary
In the prior art, the hardware system solution to prevent electronic products from being flashed and frozen is complex and costly, making it difficult to apply to cost-sensitive products. At the same time, there is a lack of low-cost hardware control circuit to prevent electronic products from being flashed and frozen.
It provides a power supply control circuit that controls the conduction or shutdown of the power supply by detecting the heartbeat signal of the electronic device, including a charging circuit, a discharge circuit and a comparison circuit, and uses simple devices to realize power supply control of the electronic device to prevent flashing and crashing.
It realizes that when the electronic device is in an abnormal state, it automatically stops power supply, prevents flashing and crashing, ensures stable operation of the electronic device, and reduces the implementation cost.
Smart Images

Figure CN115729305B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of hardware circuit design, and in particular to a power supply control circuit and method. Background Art
[0002] With the widespread use of smart devices, various versions of flashing software and flashing tutorials have appeared on the Internet; among them, the flashing software is used to automatically flash the smart device when the user starts the software; the flashing tutorial is used to guide the user to flash the device according to the operating steps. At present, flashing for smart devices is not limited to mobile phones, but also for electronic products such as set-top boxes and routers. After the user flashes the electronic product by himself, it may cause functional instability, affect the operation of the electronic product, and even damage the hardware of the electronic product, affecting the service life, thereby causing inconvenience to the user. Flashing may also change the purpose of the electronic product, thereby violating the wishes of the electronic product manufacturer. Therefore, it is necessary to prevent malicious flashing of electronic products to ensure the stable operation of electronic products. In the related art, the hardware system solution to prevent flashing is usually complex to implement and has high cost.
[0003] On the other hand, excessive operation during the use of electronic products can cause system freezes, thus affecting their stable operation. To address this issue, watchdog chips are often used in hardware circuits to implement a system freeze prevention function. These chips periodically receive signals from the system to reset a timer; otherwise, they will reboot the system. However, dedicated long-term watchdog chips or hardware circuits are expensive to implement, making them unsuitable for cost-sensitive products and limiting their applicability.
[0004] Therefore, there is currently a lack of a low-cost hardware control circuit that can simultaneously prevent electronic products from flashing and freezing, so as to ensure the stable operation of electronic products. Summary of the Invention
[0005] To solve related technical problems, the embodiments of the present application provide a power supply control circuit and method.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] The embodiment of the present application provides a power supply control circuit, comprising: a control circuit and a switch circuit; wherein,
[0008] The control circuit is used to detect whether a heartbeat signal sent by an electronic device is periodically received to obtain a detection result; and to control the conduction or cutoff of the switching circuit according to the detection result, so that the power supply supplies power to the power management (PM) module of the electronic device or stops supplying power to the PM module.
[0009] In the above circuit, the control circuit includes: a charging circuit, a discharging circuit and a comparison circuit; wherein,
[0010] The charging circuit is at least used for intermittently charging the first input terminal of the comparison circuit to increase the voltage of the first input terminal;
[0011] The discharge circuit is configured to, during an interval of charging of the first input terminal, discharge the first input terminal when the heartbeat signal is received to reduce the voltage of the first input terminal so that the voltage of the first input terminal satisfies a first condition; and discharge the first input terminal when the heartbeat signal is not received and the voltage of the first input terminal satisfies a second condition to reduce the voltage of the first input terminal so that the voltage of the first input terminal satisfies the first condition; the first condition indicates that a comparison result between the voltage of the first input terminal and the voltage of the second input terminal of the comparison circuit can cause the comparison circuit to control the switch circuit to be turned on; the second condition indicates that a comparison result between the voltage of the first input terminal and the voltage of the second input terminal of the comparison circuit can cause the comparison circuit to control the switch circuit to be turned off;
[0012] The comparison circuit is used to compare the voltage of the first input terminal with the voltage of the second input terminal to obtain a comparison result, and control the conduction or cutoff of the switch circuit according to the comparison result.
[0013] In the above circuit, the discharge circuit includes:
[0014] a first discharging sub-circuit, configured to discharge the first input terminal when receiving the heartbeat signal during an interval of charging of the first input terminal, so as to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets the first condition;
[0015] The second discharge subcircuit is configured to discharge the first input terminal during an interval of charging of the first input terminal when the heartbeat signal is not received and the voltage of the first input terminal meets a second condition, so as to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets the first condition.
[0016] In the above circuit, the first discharge sub-circuit includes: a first triode;
[0017] The second discharge subcircuit includes a second transistor.
[0018] In the above circuit, the charging circuit is further used to use at least the power supply to charge the second input terminal to increase the voltage of the second input terminal; the charging speed of the second input terminal is greater than the charging speed of the first input terminal.
[0019] In the above circuit, the charging circuit includes:
[0020] a first charging subcircuit, configured to intermittently charge the first input terminal to increase the voltage of the first input terminal;
[0021] The second charging sub-circuit is configured to charge the second input terminal at least by utilizing the power supply.
[0022] In the above circuit, the first charging sub-circuit is used to charge the first input terminal using the signal output by the switching circuit;
[0023] The second charging sub-circuit is used to charge the second input terminal using the power supply and the signal output by the switching circuit.
[0024] In the above circuit, the first charging sub-circuit is further configured to discharge the first input terminal to reduce the voltage of the first input terminal when the switch circuit is turned off;
[0025] The second charging sub-circuit is further configured to discharge the second input terminal when the switch circuit is turned off, so as to reduce the voltage of the second input terminal.
[0026] In the above circuit, the first charging sub-circuit includes a first capacitor, and the second charging sub-circuit includes a second capacitor.
[0027] The present application also provides a power supply control method, which is applied to a power supply control circuit, including:
[0028] Detecting whether a heartbeat signal sent by an electronic device is periodically received and obtaining a detection result;
[0029] The switch circuit of the power supply control circuit is controlled to be turned on or off according to the detection result, so that the power supply supplies power to the PM module of the electronic device or stops supplying power to the PM module.
[0030] The power supply control circuit and method provided in the embodiments of the present application detect whether a heartbeat signal sent by an electronic device is periodically received to obtain a detection result; and based on the detection result, the switching circuit is controlled to be turned on or off so that the power supply can supply power to the PM module of the electronic device or stop supplying power to the PM module. The solution provided in the embodiments of the present application generates a detection result by detecting whether a heartbeat signal sent by an electronic device is periodically received, and then uses the detection result to control the switching circuit, thereby achieving power supply control for the electronic device. When the electronic device is in a flashing or frozen state, the electronic device is unable to send a heartbeat signal to the power supply control circuit according to a preset period. At this time, the control circuit can disconnect the power supply to the electronic device until the power supply conditions are met, at which point the control circuit will resume power supply to the electronic device. In this way, the problem of abnormal state of the electronic device due to malicious flashing or freezing, resulting in unstable operation, can be solved by simple devices, and the function of preventing the electronic device from flashing and freezing can be realized, while at the same time, the cost is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a structural diagram of the first power supply control circuit according to an embodiment of the present application;
[0032] Figure 2 This is a schematic diagram of the system structure corresponding to the power supply control circuit of an embodiment of the present application;
[0033] Figure 3 This is a structural diagram of a second power supply control circuit in an embodiment of the present application;
[0034] Figure 4 This is a schematic structural diagram of a third power supply control circuit in an embodiment of the present application;
[0035] Figure 5 This is a structural diagram of a fourth power supply control circuit in an embodiment of the present application;
[0036] Figure 6 This is a schematic diagram of the structure of the power control module of the embodiment of the present application;
[0037] Figure 7 This is a schematic structural diagram of a first discharge sub-circuit according to an embodiment of the present application;
[0038] Figure 8 This is a schematic structural diagram of a second discharge sub-circuit according to an embodiment of the present application;
[0039] Figure 9 This is a simulation result diagram of charging the input terminal of the first comparison circuit in the application embodiment of the present application;
[0040] Figure 10This is a simulation result diagram of charging the input terminal of the second comparison circuit in the application embodiment of the present application;
[0041] Figure 11 This is a diagram showing simulation results of discharge at the input end of a comparison circuit according to an embodiment of the present application;
[0042] Figure 12 This is a simulation result diagram of the comparator input terminal and the power supply output terminal according to an embodiment of the present application;
[0043] Figure 13 This is a simulation result diagram of the power output terminal when the application embodiment of this application does not receive a heartbeat signal;
[0044] Figure 14 This is a simulation result diagram of the first power supply control circuit when the application embodiment of the present application receives a heartbeat signal;
[0045] Figure 15 This is a simulation result diagram of the second power supply control circuit when the application embodiment of this application receives a heartbeat signal;
[0046] Figure 16 This is a flow chart of the power control module of the embodiment of the present application;
[0047] Figure 17 This is a flow chart of the power supply control method according to an embodiment of the present application. DETAILED DESCRIPTION
[0048] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] Before further explaining the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0050] (1) Heartbeat signal: refers to a pulse signal sent by one object to another object at a fixed period so that the objects can determine whether the communication between the two objects is interrupted.
[0051] (2) Flashing: refers to changing or replacing the original operating system in an electronic device through certain methods.
[0052] During the use of electronic products, users may flash the products themselves according to flashing software or flashing tutorials. However, malicious flashing of electronic products may affect the instability of the functions of the electronic products, making them unable to operate stably. On the other hand, electronic products may also fall into a dead state due to frequent operations, which will also affect the stable operation of electronic products. In the related art, in order to ensure the stable operation of electronic products and prevent malicious flashing and crashes, it is usually necessary to set up an anti-flashing circuit and a watchdog circuit respectively to achieve the purpose of anti-flashing and anti-crash. In this way, two circuits need to be set up at the same time to ensure the stability of electronic products, and the implementation steps are relatively complicated. At the same time, for each circuit, the cost of design and implementation is high, and the control logic is complicated. In other words, the technical solutions of the related art have the problems of complex implementation methods and high implementation costs.
[0053] Based on this, in various embodiments of the present application, a power supply control circuit is proposed, which is deployed between the power supply and the PM module of the electronic device. The power supply control circuit controls the power supply to supply power to the PM module of the electronic device by detecting whether the heartbeat signal sent by the electronic device is periodically received, so that when the electronic device is in an abnormal state (including the flashing state and the dead state), the power supply to the electronic device can be effectively stopped, and when the power supply conditions are met, the power supply to the electronic device will be restored, realizing the anti-flash and anti-dead function of the electronic device, so that the electronic device can operate stably. At the same time, the above circuit can simultaneously solve the problem that the electronic device cannot work stably due to being in the flashing or dead state, without setting up multiple circuits, so that the implementation cost is low, and it is especially suitable for cost-sensitive electronic products and has a wide range of applications.
[0054] The embodiment of the present application provides a power supply control circuit, such as Figure 1 As shown, the circuit includes: a control circuit 101 and a switch circuit 102; wherein,
[0055] The control circuit 101 is used to detect whether a heartbeat signal sent by an electronic device is periodically received to obtain a detection result; and to control the conduction or cutoff of the switch circuit 102 according to the detection result, so that the power supply provides power to the PM module of the electronic device or stops providing power to the PM module.
[0056] Here, the electronic device may include a mobile phone, a set-top box, a router and other smart devices; wherein, the electronic device may send a heartbeat signal to the control circuit 101 through a control module; the control module may include a central processing unit (CPU) of the electronic device, which is used to pre-store the periodic information of the heartbeat signal (which can be understood as the heartbeat rule) and periodically send the heartbeat signal to the control circuit 101 based on the periodic information.
[0057] In actual application, the period information can be set as needed.
[0058] In actual application, the power supply can be understood as the power supply inside the electronic device, such as the power supply of a mobile phone, or as the external power supply, such as the power supply for a set-top box; the PM module is used to effectively distribute power to different components in the electronic device system so that different components can operate, thereby achieving normal operation of the electronic device.
[0059] Here, as Figure 2 As shown, when the power supply control circuit detects a heartbeat signal periodically transmitted by an electronic device, it controls the power supply control circuit to connect the power supply and the PM module of the electronic device, allowing the power supply to power the PM module of the electronic device and achieve stable operation of the electronic device. Correspondingly, when the power supply control circuit does not detect the heartbeat signal periodically transmitted by the electronic device, it controls the power supply control circuit to disconnect the power supply and the electronic device, causing the power supply to stop supplying power to the PM module of the electronic device. Vcc is the power supply input terminal, and VSYS is the power supply output terminal.
[0060] Here, the power supply of the electronic device is connected to Vcc, and the PM module of the electronic device is connected to VSYS.
[0061] In actual application, the power supply control circuit includes a control circuit 101 and a switch circuit 102; the switch circuit 102 may include a P-channel metal oxide semiconductor field effect transistor (PMOS) or an N-channel metal oxide semiconductor field effect transistor (NMOS). For example, when the control circuit 101 detects that a heartbeat signal sent by an electronic device is periodically received, it can control the conduction of the switch circuit 102; when the control circuit 101 detects that a heartbeat signal sent by an electronic device is not periodically received, it can control the cutoff of the switch circuit 102. When the switch circuit 102 is turned on, the power supply can supply power to the PM module of the electronic device; when the switch circuit 102 is turned off, the power supply stops supplying power to the PM module of the electronic device.
[0062] In actual application, the control circuit 101 may be composed of multiple sub-circuits to realize the functions of the control circuit 101 .
[0063] Based on this, in one embodiment, if Figure 3 As shown, the control circuit 101 may include: a charging circuit 1011, a discharging circuit 1012 and a comparison circuit 1013; wherein,
[0064] The charging circuit 1011 is at least used for intermittently charging the first input terminal of the comparison circuit to increase the voltage of the first input terminal;
[0065] The discharge circuit 1012 is configured to discharge the first input terminal during an interval of charging the first input terminal and, when the heartbeat signal is received, to reduce the voltage of the first input terminal so that the voltage of the first input terminal satisfies a first condition; and to discharge the first input terminal when the heartbeat signal is not received and the voltage of the first input terminal satisfies a second condition, to reduce the voltage of the first input terminal so that the voltage of the first input terminal satisfies the first condition; the first condition indicating that a comparison result between the voltage of the first input terminal and the voltage of the second input terminal of the comparison circuit can cause the comparison circuit to control the switch circuit 102 to be turned on; and the second condition indicating that a comparison result between the voltage of the first input terminal and the voltage of the second input terminal of the comparison circuit can cause the comparison circuit to control the switch circuit 102 to be turned off.
[0066] The comparison circuit 1013 is configured to compare the voltage at the first input terminal with the voltage at the second input terminal to obtain a comparison result, and control the switching circuit 102 to be turned on or off according to the comparison result.
[0067] In practical applications, the function of the comparison circuit 1013 can be implemented by a comparator.
[0068] In one embodiment, if Figure 4 As shown, the discharge circuit 1012 may include:
[0069] a first discharging sub-circuit 10121, configured to discharge the first input terminal when receiving the heartbeat signal during an interval of charging of the first input terminal, so as to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets the first condition;
[0070] The second discharge sub-circuit 10122 is used to discharge the first input terminal during an interval of charging of the first input terminal when the heartbeat signal is not received and the voltage of the first input terminal meets the second condition, so as to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets the first condition.
[0071] Here, in actual application, the functions of the first discharge sub-circuit 10121 and the second discharge sub-circuit 10122 can be realized by a transistor.
[0072] Based on this, in one embodiment, the first discharge sub-circuit 10121 includes: a first transistor;
[0073] The second discharge sub-circuit 10122 includes a second transistor.
[0074] The first transistor may include an NPN transistor or a PNP transistor.
[0075] Specifically, during an interval in which the first discharge sub-circuit 10121 is charging at the first input terminal of the comparison circuit 1013, upon receiving a heartbeat signal transmitted by an electronic device, the first transistor is turned on. At this point, the first discharge sub-circuit 10121 can discharge the first input terminal, thereby reducing the voltage at the first input terminal and causing the voltage at the first input terminal to meet a specific condition. In other words, by receiving the heartbeat signal transmitted by the electronic device, the first discharge sub-circuit 10121 can discharge the first input terminal of the comparison circuit 1013, thereby providing a comparison result between the voltage at the first input terminal and the voltage at the second input terminal for the comparison circuit 1013 to control the switching circuit 102.
[0076] The second transistor may include an NPN transistor or a PNP transistor.
[0077] Specifically, during an interval in which the second discharge sub-circuit 10122 is charging at the first input terminal, when no heartbeat signal is received, and the comparison result of the voltage at the first input terminal and the voltage at the second input terminal is used by the comparison circuit 1013 to control the switch circuit 102 to be in the cut-off state, the second transistor will be in the on state and can discharge the first input terminal, so that the comparison result of the voltage at the first input terminal and the voltage at the second input terminal can be used by the comparison circuit 1013 to control the switch circuit 102 to be turned on.
[0078] In practical applications, the charging circuit 1011 can also be used to adjust the voltage of the second input terminal of the comparison circuit 1013, so that the comparison result of the voltage of the first input terminal and the voltage of the second input terminal is used by the comparison circuit 1013 to control the conduction or cutoff of the switch circuit 102.
[0079] Based on this, in one embodiment, the charging circuit 1011 is further used to charge the second input terminal using at least the power supply to increase the voltage of the second input terminal; the charging speed of the second input terminal is greater than the charging speed of the first input terminal.
[0080] Here, in actual application, the function of the charging circuit 1011 can be realized by a charging sub-circuit.
[0081] Based on this, in one embodiment, if Figure 5 As shown, the charging circuit may include:
[0082] a first charging sub-circuit 10111, configured to intermittently charge the first input terminal to increase the voltage of the first input terminal;
[0083] The second charging sub-circuit 10112 is configured to charge the second input terminal at least using the power supply.
[0084] Here, in actual application, the first charging sub-circuit can use the signal output by the switch circuit 102 to intermittently charge the first input terminal of the comparison circuit 1013. At the same time, the second charging sub-circuit 10112 can charge the second input terminal of the comparison circuit 1013 in combination with the signal output by the switch circuit 102.
[0085] Based on this, in one embodiment, the first charging sub-circuit 10111 is configured to charge the first input terminal using the signal output by the switch circuit 102;
[0086] The second charging sub-circuit 10112 is configured to charge the second input terminal using the power supply and the signal output by the switch circuit 102 .
[0087] The signal output by the switch circuit 102 can be understood as a signal corresponding to the power supply output terminal VSYS.
[0088] In one embodiment, the first charging sub-circuit 10111 is further configured to discharge the first input terminal to reduce the voltage of the first input terminal when the switch circuit 102 is turned off.
[0089] The second charging sub-circuit 10112 is further configured to discharge the second input terminal when the switch circuit 102 is turned off, so as to reduce the voltage of the second input terminal.
[0090] Here, in actual application, the functions of the first charging sub-circuit 10111 and the second charging sub-circuit 10112 can be realized by capacitors.
[0091] Based on this, in one embodiment, the first charging sub-circuit 10111 includes a first capacitor, and the second charging sub-circuit 10112 includes a second capacitor.
[0092] In practical applications, the first capacitor can intermittently charge the first input terminal through the signal output by the switch circuit 102 ; the second capacitor can charge the second input terminal through the power supply and the signal output by the switch circuit 102 .
[0093] Here, the capacitance values of the first capacitor and the second capacitor may be set so that the charging speed of the second input terminal is greater than the charging speed of the first input terminal.
[0094] Accordingly, when the switch circuit 102 is turned off, the first input terminal can be discharged through the first capacitor to reduce the voltage of the first input terminal; the second input terminal can be discharged through the second capacitor to reduce the voltage of the second input terminal.
[0095] In the power supply control circuit provided by the embodiment of the present application, the control circuit 101 detects whether a heartbeat signal transmitted by an electronic device is periodically received, obtains a detection result, and controls the switching circuit 102 to be turned on or off based on the detection result, so that the power supply can supply power to the PM module of the electronic device or stop supplying power to the PM module. In the solution provided by the embodiment of the present application, the control circuit 101 generates a detection result by detecting whether a heartbeat signal transmitted by the electronic device is periodically received, and then uses the detection result to control the switching circuit 102, thereby achieving power supply control for the electronic device. When the electronic device is in a flashing or frozen state, the electronic device cannot send a heartbeat signal to the power supply control circuit according to a preset period. In this case, the control circuit 101 can disconnect the power supply to the electronic device and resume power supply to the electronic device until the power supply condition is met. In this way, the control circuit 101 can be implemented with simple components to solve the problem of abnormal state of the electronic device due to malicious flashing or freezing, thereby preventing the electronic device from operating stably, and realizing the function of preventing flashing and freezing of the electronic device, while at the same time, achieving low implementation cost.
[0096] The present application will be described in further detail below in conjunction with application examples.
[0097] This application embodiment proposes a power control module (also known as a power supply control circuit) deployed between the power supply and the PM module of an electronic device. The power control module detects whether it has received a heartbeat signal periodically transmitted by the electronic device to control the power supply control module's conduction and cutoff, thereby achieving power supply control for the electronic device.
[0098] like Figure 6 As shown, the power control module includes: a comparison circuit 1013, a switch circuit 102, a first charging sub-circuit 10111, a second charging sub-circuit 10112, a first discharge sub-circuit 10121 and a second discharge sub-circuit 10122; wherein,
[0099] For the convenience of description, the power input terminal is called Vcc, the power output terminal is called VSYS, and the heartbeat signal input terminal is called P1;
[0100] The comparison circuit 203 includes a comparator U1A, a capacitor C2, and resistors R7 and R2; the comparator U1A includes a first input terminal VT1, a second input terminal VT2, and an output terminal VT3;
[0101] The first charging sub-circuit 10111 includes a capacitor C1, resistors R3 and R6;
[0102] The second charging sub-circuit 10112 includes a capacitor C3, resistors R8, R9 and R10;
[0103] The first discharge sub-circuit 10121 includes a transistor Q1, resistors R11, R13 and R15, and a capacitor C4;
[0104] The second discharge circuit 10122 includes a transistor Q2, resistors R12, R14 and R16;
[0105] The switch circuit 102 includes a PMOS transistor M1 , resistors R1 and R4 .
[0106] Here, for the comparator U1A, when the voltage of the first input terminal VT1 is greater than the voltage of the second input terminal VT2, the voltage output by the output terminal VT3 is the voltage of the power supply; when the voltage of the first input terminal VT1 is less than or equal to the voltage of the second input terminal VT2, the voltage output by the output terminal VT3 is 0V.
[0107] Here, the gate G (i.e., VT4) of the PMOS transistor M1 is connected to the output terminal VT3 of the comparison circuit 203 via the resistor R4. The source S is connected to the power input terminal Vcc. The drain D is connected to the power output terminal VSYS, that is, connected to the PM module of the electronic device. If the voltage at the gate of the PMOS transistor M1 is lower than the voltage at the drain, the PMOS transistor M1 is in the on state. If the voltage at the gate of the PMOS transistor M1 is greater than or equal to the voltage at the drain, the PMOS transistor M1 is in the off state.
[0108] In actual application, Figure 6 The working principle of the power control module shown is:
[0109] When the power supply starts to supply power (ie V Vcc >0), and the electronic device does not send a heartbeat signal to the power control module, the voltages of the first input terminal VT1 and the second input terminal VT2 of the comparator U1A are both 0V, and accordingly, the voltage of the output terminal VT3 of the comparator U1A is 0V. At this time, the voltage of the gate VT4 corresponding to the PMOS tube M1 is the divided voltage value of the resistors R1 and R4, that is, For the PMOS tube M1, V S =V Vcc ,therefore,
[0110] At this time, the PMOS tube M1 is in the on state, and the voltage of the power input terminal Vcc is equal to the voltage of the power output terminal VSYS, that is, V Vcc =V VSYS , the power supply starts to supply power to the PM module of the electronic device.
[0111] In this process, since the electronic device is in the startup state, the heartbeat signal input terminal P1 cannot receive the heartbeat signal. Figure 7As shown, the transistor Q1 in the first discharge sub-circuit 10121 is in a cut-off state; that is, the first discharge sub-circuit 10121 cannot discharge the first input terminal VT1 of the comparator U1A. Figure 8 As shown, the transistor Q2 in the second discharge sub-circuit 10122 is also in the cut-off state; that is, the second discharge sub-circuit 10122 is also unable to discharge the first input terminal VT1 of the comparator U1A.
[0112] At the same time, since the voltage of the power input terminal Vcc is equal to the voltage of the power output terminal VSYS, the capacitor C1 in the first charging sub-circuit 10111 and the capacitor C3 in the second charging sub-circuit 10112 will start to charge the first input terminal VT1 and the second input terminal VT2 of the comparator U1A respectively, so that the voltages corresponding to the first input terminal VT1 and the second input terminal VT2 rise; wherein the capacitance value of the capacitor C1 and the capacitance value of the capacitor C3 can be set as needed.
[0113] In this process, the capacitor C1 can utilize the voltage of the power output terminal VSYS (i.e., the signal output by the switch circuit 102) to charge the first input terminal VT1 through the charging channel corresponding to the resistor R3; and the capacitor C3 can utilize the voltage of the power supply and the power output terminal VSYS (i.e., the signal output by the switch circuit 102) to charge the second input terminal VT2 through the charging channel corresponding to the circuits R8 and R10.
[0114] Here, the resistance value of the resistor R10 may be set to be much greater than the resistance value of the resistor R8 , so that during the process of charging the second input terminal VT2 , the capacitor C3 is mainly charged through the charging channel corresponding to R8 .
[0115] In practical applications, the values of capacitor C1 and resistor R3 in the first charging sub-circuit 10111, and capacitor C3 and resistors R8, R9, and R10 in the second charging sub-circuit 402 can be set so that the charging speed of the second input terminal VT2 is greater than the charging speed of the first input terminal VT1. In this way, the voltage of the second input terminal VT2 can rise quickly to the corresponding maximum voltage, causing the voltage of the second input terminal VT2 to be greater than the voltage of the first input terminal VT1, thereby controlling the comparator circuit 102 to conduct until the voltage of the first input terminal VT1 rises to a voltage greater than the voltage of the second input terminal VT2. The relationship between the voltage of the first input terminal VT1 and the voltage of the second input terminal VT2 and the charging time t can be expressed as:
[0116]
[0117]
[0118] Accordingly, Figure 9 Characterization V VT1 and V VT2 A simulation result of the relationship curve with the linear time domain, Figure 10 Characterization V VT1 and V VT2 A simulation result of the relationship curve with the logarithmic time domain. Figure 9 and Figure 10 From the charging simulation diagram of the first input terminal VT1 and the second input terminal VT2 of the comparator U1A, it can be seen that the charging speed of the second input terminal VT2 is greater than the charging speed of the first input terminal VT1. The voltage of the second input terminal VT2 will quickly reach the corresponding maximum voltage, while the voltage of the first input terminal VT1 will steadily rise until after a period of time, the voltage of the first input terminal VT1 will exceed the voltage of the second input terminal VT2 and reach the corresponding maximum voltage.
[0119] At this time, the voltage of the first input terminal VT1 is greater than or equal to the voltage of the second input terminal VT2, and the voltage output by the output terminal VT3 is the voltage of the power supply, that is, V VT3 =V VT4 =V Vcc , making the V GS =0V, the PMOS tube M1 will be in the cut-off state, causing the power supply to stop supplying power to the PM module of the electronic device.
[0120] Here, the resistance values of resistors R3, R6, R8, and R9 can be set so that the maximum voltage corresponding to the first input terminal VT1 is greater than the maximum voltage corresponding to the second input terminal VT2. In this way, when the heartbeat signal periodically transmitted by the electronic device is not received (for example, when the electronic device is in a dead state), the power control module can control the conduction and cutoff of the switch circuit 102 to achieve power supply control for the PM module of the electronic device.
[0121] As can be seen from the above description, under the control of the power control module, the time t1 for the power supply to supply power to the PM module of the electronic device is mainly associated with the time corresponding to the voltage of the first input terminal VT1 rising to the corresponding maximum voltage, and the voltage of the first input terminal VT1 is associated with the charging speed of the capacitor C1; the charging formula can be:
[0122]
[0123] Among them, V C1 The size of V depends on the voltage divider value of R3 and R6. When R3 and R6 use fixed resistance values, V C1 can be considered as a fixed value. In this case, V VT1 It is only related to the capacitance value of C1 and time t1. In other words, the power-on time t1 can be expressed as:
[0124]
[0125] Here, it can be concluded from formula (4) that the value of C1 can be selected according to actual needs, thereby adjusting the power supply time t1 of the PM module of the electronic device.
[0126] After the power control module controls the power supply to stop supplying power to the PM module of the electronic device, the PMOS tube M1 is in the off state, that is, the switch circuit 102 is in the off state, the voltage of the power output terminal VSYS is 0V, and the capacitor C1 in the first charging sub-circuit 10111 and the capacitor C3 in the second charging sub-circuit 10112 begin to discharge, causing the voltage of the first input terminal VT1 and the second input terminal VT2 to begin to drop. Figure 11 As shown, a simulation result diagram of the voltage and time of the first input terminal VT1 and the second input terminal VT2 is shown.
[0127] Here, the process of capacitor discharge can be regarded as the reverse process of capacitor charging. That is, during the discharge of capacitors C1 and C3, the discharge speed of the second input terminal VT2 will be greater than the discharge speed of the first input terminal VT1, causing the voltage of the second input terminal VT2 to drop rapidly to a value lower than the voltage of the first input terminal VT1. In this case, the output terminal VT3 of the comparator U1A will always output the voltage of the power supply (i.e., V VT3 =V Vcc ), the PMOS tube M1 is continuously in the cut-off state, so that the power supply stops supplying power to the PM module of the electronic device.
[0128] During this process, in actual application, the capacitor C1 can also be discharged through the second discharge sub-circuit 10122. Specifically, when the voltage of the power output terminal VSYS is 0V, the transistor Q2 will be in the on state. At this time, the capacitor C1 can also be discharged through the discharge channel corresponding to the resistor R12 to reduce the voltage of the first input terminal VT1. During this process, the relationship between the voltage value of the first input terminal VT1 and time can be expressed as:
[0129]
[0130] Among them, the V VT1(Max) Characterizes the initial maximum voltage of the capacitor C1, that is, the maximum voltage corresponding to the first input terminal VT1.
[0131] Furthermore, during the discharge of capacitor C3, since the second charging sub-circuit 10112 can continuously use the voltage of the power input terminal Vcc to charge the second input terminal VT2, the minimum voltage of the second input terminal VT2 cannot be reduced to 0V, but has a minimum voltage value. Here, the minimum voltage value of the second input terminal VT2 can be expressed as:
[0132]
[0133] For capacitor C1, when the first input terminal VT1 is discharged so that the voltage of the first input terminal VT1 is less than the minimum voltage of the second input terminal VT2, the output terminal VT3 of comparator U1A will output the voltage of the power supply, so that the PMOS tube M1 can be turned on. At this time, the next cycle will begin in which the power supply supplies power to the PM module of the electronic device under the control of the power control module. The voltage output by the power output terminal VSYS is the voltage of the power supply, such as Figure 12 During this process, the voltage of VT1 will not drop to 0V, but will drop to a level slightly lower than the lowest voltage of the second input terminal VT2, causing the switch circuit 102 to be turned on, and then the next cycle begins.
[0134] In practical application, the above description can be used to obtain Figure 13 Under the control of the power control module, during the time period t1 when the power supply is supplying power to the PM module of the electronic device, the power output terminal VSYS will output a high voltage signal. During the time period t2 corresponding to when the power supply stops supplying power to the PM module of the electronic device, the power output terminal VSYS will output a low voltage signal. In other words, the voltage output by the power output terminal VSYS is in a periodic state.
[0135] In practical applications, the resistance value of resistor R12 in the second discharge sub-circuit 10122 can be set to be significantly smaller than the resistance values of resistors R3 and R6 in the first charging sub-circuit 10111, making the second discharge sub-circuit 10122 the primary discharge channel for capacitor C1. In this way, the power-off time of the PM module of the electronic device can be controlled by adjusting the parameters of the components in the second discharge sub-circuit 10122. In other words, the resistance value of resistor R12 in the second discharge sub-circuit 10122 is correlated with the power-off time t2 of the electronic device.
[0136] Specifically, the discharge formula of capacitor C1 can be:
[0137]
[0138] Among them, V C1The size of is determined by the resistance values of resistors R3 and R6. For example, resistors R3 and R6 can be set to 2000k and 2400k, and the capacitance value of capacitor C1 is set to 10uF. Then, the power-off time t2 is only related to the resistance value of resistor R12. In this case, the relationship between the power-off time t2 and the resistor R12 can be expressed as:
[0139]
[0140] In other words, the resistance value of resistor R12 can be adjusted according to actual needs, thereby flexibly controlling the power-off time t2 of the power supply to the PM module of the electronic device. For example, when the resistance value of resistor R12 is set to 10k, the corresponding t2 is 0.24s; when the resistance value of resistor R12 is set to 100k, the corresponding t2 is 2.4s.
[0141] From the above description, it can be seen that Figure 13 As shown, when the power supply is powered on and the electronic device does not send a heartbeat signal to the power control module, the power control module can control the voltage of the power output terminal VSYS to output a high voltage signal during time period t1, allowing the power supply to supply power to the PM module of the electronic device. Then, during time period t2, the power supply outputs a low voltage signal, causing the power supply to stop supplying power to the PM module of the electronic device. Then, during time period t3, the power supply outputs a high voltage signal, causing the power supply to supply power to the PM module of the electronic device; where t1 = t3. In other words, when no heartbeat signal is detected, the power supply, under the control of the power control module, periodically disconnects power to the PM module of the electronic device, causing the electronic device to repeatedly restart and fail to operate normally.
[0142] In actual application, if the electronic device sends a heartbeat signal to the power control module, that is, when the power control module can receive the heartbeat signal sent by the electronic device at the heartbeat signal input terminal P1, the voltage of VT5 in the first discharge sub-circuit 10121 will increase, causing the transistor Q1 to be in a conductive state, resulting in discharge to the first input terminal VT1. In addition, VT1 can also be discharged through the first charging circuit 10111. However, by setting the resistance value of the resistor R11 in the first discharge sub-circuit 10121 to be much smaller than the resistance value of the resistor R12 in the first charging sub-circuit 10111, the first charging sub-circuit 401 becomes the main discharge circuit for the first input terminal VT1. That is, the discharge rate of the first charging sub-circuit 401 to the first input terminal VT1 is greater than the discharge rate of the first discharge sub-circuit 301 to the first input terminal VT1. When the first discharge sub-circuit 10121 receives a heartbeat signal sent by the electronic device, it can quickly discharge the first input terminal VT1, so that the corresponding voltage can be reduced to close to 0V, thereby controlling the continuous conduction of the switch circuit 102, and further realizing continuous power supply to the electronic device.
[0143] In practical applications, if the electronic device can periodically send a heartbeat signal to the power control module before the voltage at the first input terminal VT1 exceeds the voltage at the second input terminal VT2, ensuring that the voltage at the first input terminal VT1 remains lower than the voltage at the first input terminal VT2, the power supply can continuously supply power to the PM module of the electronic device, thereby enabling the electronic device to operate normally. In other words, only when the period of the heartbeat signal matches the voltage variation period of the power control module can the power supply continuously supply power to the electronic device under the control of the power control module; the voltage variation period of the power control module is associated with the parameter values of the capacitor, resistor, and voltage in the power control module.
[0144] In this application embodiment, when the cycle of the heartbeat signal does not match the voltage change cycle of the power control module, it is impossible to make the voltage of VT1 continuously lower than the voltage of VT2. Figure 14 As shown, there will be a time period in which the power control module controls the power supply to stop supplying power to the PM module of the electronic device.
[0145] If the cycle of the heartbeat signal matches the voltage change cycle of the power control module, such as Figure 15 As shown in FIG. 1 , the voltage of VT1 is continuously lower than the voltage of VT2. In this way, the power control module can control the power supply to continuously supply power to the PM module of the electronic device.
[0146] In summary, if Figure 16 As shown, the working principle of the power control module of this application embodiment is as follows:
[0147] Step 1601: Power on the power supply;
[0148] Here, after the power supply is powered on, it can supply power to the power control module;
[0149] Step 1602: The power control module periodically detects the heartbeat signal;
[0150] Wherein, the heartbeat signal may be sent by a CPU of the electronic device;
[0151] After the power control module is powered on, it can periodically detect at P1 whether it has received the heartbeat signal sent by the electronic device;
[0152] Step 1603: Whether the power control module detects a heartbeat signal of a preset period;
[0153] Here, when the power control module detects a heartbeat signal sent by the electronic device according to a preset period, step 1604 is executed; when the power control module does not detect a heartbeat signal, or the heartbeat rule does not meet the preset conditions of the heartbeat signal, step 1605 is executed.
[0154] Step 1604: The power control module enables the power supply to supply power to the PM module of the electronic device;
[0155] In actual application, within one cycle of the heartbeat signal, the power control module can enable the power supply to supply power to the PM module of the electronic device.
[0156] Step 1605: The power supply is turned off;
[0157] Here, within a cycle of the heartbeat signal, there is a period of time when the power control module stops supplying power to the system, which makes the electronic device unable to operate normally. In this case, the power supply can be cut off to prevent the electronic device from falling into a periodic startup and shutdown state, further preventing damage to the electronic device components.
[0158] The circuit provided in the application embodiment of the present application is such that the power control module can control the conduction or cutoff of the power control module by detecting the heartbeat signal sent by the electronic device according to a preset heartbeat cycle (which can also be understood as a preset heartbeat rule), thereby controlling the power supply state of the power supply to the electronic device. If the electronic device is flashed, the CPU of the electronic device will not be able to know the preset heartbeat cycle, and thus will not be able to send heartbeat signals according to the preset heartbeat cycle. At this time, the power supply will periodically power on and off the PM module of the electronic device, causing the electronic device to periodically restart and be unable to work normally, thereby achieving the purpose of preventing flashing.
[0159] At the same time, the circuit provided in the application embodiment of the present application can also be used as a watchdog circuit to achieve the effect of preventing electronic devices from crashing. Specifically, when the system of an electronic device crashes, it cannot generate a heartbeat signal normally. In this way, when the power control module cannot detect the heartbeat signal sent by the electronic device, it will control the power supply to cut off the power to the PM module of the electronic device until the power supply conditions are met, and then control the power supply to supply power to the PM module of the electronic device to restart the electronic device. In this process, since the above-mentioned circuit can completely cut off the power supply of the power supply, it is more thorough than the reset of the watchdog circuit and is suitable for all special scenarios. In addition, the above-mentioned circuit can simultaneously solve the problem that the electronic device cannot work stably due to being in a flashing or dead state, without setting up multiple circuits, so that the implementation cost is low. At the same time, compared with the long-term watchdog circuit in the related art, the circuit of this application embodiment does not require additional external control to configure the detection cycle. It can achieve power supply control of the electronic device by adjusting the parameters of the components only, and has high flexibility.
[0160] Based on the power supply control circuit of the embodiment of the present application, the embodiment of the present application also provides a power supply control method, which is applied to the power supply control circuit, such as Figure 17 As shown, the method includes:
[0161] Step 1701: Detect whether a heartbeat signal sent by an electronic device is periodically received and obtain a detection result;
[0162] Step 1702: Control the on or off state of the switch circuit of the power supply control circuit according to the detection result, so that the power supply supplies power to the PM module of the electronic device or stops supplying power to the PM module.
[0163] In one embodiment, the control circuit of the power supply control circuit includes: a charging circuit, a discharging circuit, and a comparison circuit; and controlling the on / off of a switch circuit of the power supply control circuit according to the detection result so that the power supply supplies power to the PM module of the electronic device or stops supplying power to the PM module includes:
[0164] The charging circuit at least intermittently charges the first input terminal of the comparison circuit to increase the voltage of the first input terminal;
[0165] During an interval of charging of the first input terminal, the discharge circuit discharges the first input terminal when the heartbeat signal is received to reduce the voltage of the first input terminal so that the voltage of the first input terminal satisfies a first condition; and discharges the first input terminal when the heartbeat signal is not received and the voltage of the first input terminal satisfies a second condition to reduce the voltage of the first input terminal so that the voltage of the first input terminal satisfies the first condition. The first condition indicates that a comparison result between the voltage of the first input terminal and the voltage of the second input terminal of the comparison circuit can cause the comparison circuit to control the switch circuit to be turned on; and the second condition indicates that a comparison result between the voltage of the first input terminal and the voltage of the second input terminal of the comparison circuit can cause the comparison circuit to control the switch circuit to be turned off.
[0166] The comparison circuit compares the voltage of the first input terminal with the voltage of the second input terminal to obtain a comparison result, and controls the switching circuit of the power supply control circuit to be turned on or off according to the comparison result.
[0167] In one embodiment, during an interval of charging of the first input terminal, when the first discharge sub-circuit of the discharge circuit receives the heartbeat signal, the first input terminal is discharged to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets the first condition;
[0168] During an interval of charging of the first input terminal, when the second discharge sub-circuit of the discharge circuit does not receive the heartbeat signal and the voltage of the first input terminal meets a second condition, the first input terminal is discharged to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets the first condition.
[0169] In one embodiment, the method further comprises:
[0170] The charging circuit at least utilizes the power supply to charge the second input terminal to increase the voltage of the second input terminal; the charging speed of the second input terminal is greater than the charging speed of the first input terminal.
[0171] In one embodiment, the first charging subcircuit of the charging circuit intermittently charges the first input terminal to increase the voltage of the first input terminal;
[0172] The second charging sub-circuit of the charging circuit at least uses the power supply to charge the second input terminal.
[0173] In one embodiment, the first charging subcircuit of the charging circuit charges the first input terminal using the signal output by the switch circuit;
[0174] The second charging sub-circuit of the charging circuit charges the second input terminal using the power supply and the signal output by the switch circuit.
[0175] In one embodiment, the first charging subcircuit of the charging circuit discharges the first input terminal to reduce the voltage of the first input terminal when the switch circuit is turned off;
[0176] The second charging sub-circuit of the charging circuit discharges the second input terminal to reduce the voltage of the second input terminal when the switch circuit is turned off.
[0177] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0178] In addition, the technical solutions described in the embodiments of the present application can be arbitrarily combined without conflict.
[0179] The above is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A power supply control circuit, characterized in that: include: control circuit and switch circuit; wherein, The control circuit is configured to detect whether a heartbeat signal sent by the electronic device is periodically received to obtain a detection result; and control the switching circuit to be turned on or off according to the detection result, so that the power supply supplies power to the power management module of the electronic device or stops supplying power to the power management module; The control circuit includes: a charging circuit, a discharging circuit and a comparison circuit; wherein, The charging circuit is configured to charge the second input terminal of the comparator circuit using at least the power supply to increase the voltage of the second input terminal; the charging speed of the second input terminal is greater than the charging speed of the first input terminal of the comparator circuit; wherein, The charging circuit includes: a first charging subcircuit and a second charging subcircuit, the first charging subcircuit includes a first capacitor, the second charging subcircuit includes a second capacitor, the first capacitor can intermittently charge the first input end through the signal output by the switching circuit; the second capacitor can charge the second input end through the power supply and the signal output by the switching circuit.
2. The circuit according to claim 1, wherein: The charging circuit is at least used for intermittently charging the first input terminal of the comparison circuit to increase the voltage of the first input terminal; The discharge circuit is configured to discharge the first input terminal when receiving the heartbeat signal during an interval of charging of the first input terminal, so as to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets a first condition; When the heartbeat signal is not received and the voltage at the first input terminal meets the second condition, discharging the first input terminal to reduce the voltage at the first input terminal so that the voltage at the first input terminal meets the first condition; The first condition indicates that a comparison result between the voltage at the first input terminal and the voltage at the second input terminal of the comparison circuit can cause the comparison circuit to control the switch circuit to be turned on; the second condition indicates that a comparison result between the voltage at the first input terminal and the voltage at the second input terminal of the comparison circuit can cause the comparison circuit to control the switch circuit to be turned off; The comparison circuit is used to compare the voltage of the first input terminal with the voltage of the second input terminal to obtain a comparison result, and control the conduction or cutoff of the switch circuit according to the comparison result.
3. The circuit according to claim 2, characterized in that The discharge circuit comprises: a first discharging sub-circuit, configured to discharge the first input terminal when receiving the heartbeat signal during an interval of charging of the first input terminal, so as to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets the first condition; The second discharge subcircuit is configured to discharge the first input terminal during an interval of charging of the first input terminal when the heartbeat signal is not received and the voltage of the first input terminal meets a second condition, so as to reduce the voltage of the first input terminal so that the voltage of the first input terminal meets the first condition.
4. The circuit according to claim 3, characterized in that The first discharge sub-circuit includes: a first triode; The second discharge subcircuit includes a second transistor.
5. The circuit according to claim 1, wherein: The first charging sub-circuit is configured to intermittently charge the first input terminal to increase the voltage of the first input terminal; The second charging sub-circuit is configured to charge the second input terminal at least using the power supply.
6. The circuit according to claim 5, characterized in that The first charging sub-circuit is configured to charge the first input terminal using the signal output by the switch circuit; The second charging sub-circuit is used to charge the second input terminal using the power supply and the signal output by the switching circuit.
7. The circuit according to claim 6, characterized in that The first charging sub-circuit is further configured to discharge the first input terminal to reduce the voltage of the first input terminal when the switch circuit is turned off; The second charging sub-circuit is further configured to discharge the second input terminal when the switch circuit is turned off, so as to reduce the voltage of the second input terminal.
8. A power supply control method, characterized in that: Applied to power supply control circuits, including: Detecting whether a heartbeat signal sent by an electronic device is periodically received and obtaining a detection result; Controlling the on / off of the switch circuit of the power supply control circuit according to the detection result, so that the power supply supplies power to the power management module of the electronic device or stops supplying power to the power management module; The control circuit includes: a charging circuit, a discharging circuit, and a comparison circuit; the charging circuit uses at least the power supply to charge the second input terminal of the comparison circuit to increase the voltage of the second input terminal; the charging speed of the second input terminal is greater than the charging speed of the first input terminal of the comparison circuit; wherein, The charging circuit includes: a first charging subcircuit and a second charging subcircuit, the first charging subcircuit includes a first capacitor, the second charging subcircuit includes a second capacitor, the first capacitor can intermittently charge the first input end through the signal output by the switching circuit; the second capacitor can charge the second input end through the power supply and the signal output by the switching circuit.
Citation Information
Patent Citations
Hardware power-off circuit and method
CN106569570A
Power-off restart automatic control circuit
CN111641406A