MCU chip power supply voltage detection circuit
Technical Field
The invention relates to the technical field of MCU chip power supply control, in particular to an MCU chip power supply voltage detection circuit.
Background
A Micro Control Unit (MCU), also called a Single Chip Microcomputer (Single Chip Microcomputer) or a Single Chip Microcomputer (MCU), is a Chip-level computer formed by appropriately reducing the frequency and specification of a Central Processing Unit (CPU) and integrating peripheral interfaces such as a memory, a counter (Timer), a USB, an a/D converter, a UART, a PLC, a DMA, etc., and even an LCD driving circuit on a Single Chip, and performing different combination control for different applications. Such as mobile phones, PC peripherals, remote controls, automotive electronics, industrial stepper motors, robotic arm controls, etc., can see the silhouette of the MCU.
However, the power supply control circuit of the MCU chip is still weak in design, and data loss and the like caused by unstable voltage can occur, so that the inventor provides the power supply voltage detection circuit of the MCU chip by integrating various factors.
Disclosure of Invention
The present invention provides a power supply voltage detection circuit of an MCU chip to solve the above problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme:
a power supply voltage detection circuit of an MCU chip comprises a mainboard, wherein an MCU chip set, a power supply module, a standby power supply module and a power supply detection switching management module are mounted on the mainboard, the power supply module is connected with the MCU chip set and the power supply detection switching management module, and the standby power supply module is connected with the MCU chip set through the power supply detection switching management module; the power supply detection switching management module comprises a power supply management module, a power supply optimization module and a power supply detection module, wherein the power supply management module comprises a main power supply control module and a standby power supply control module; the MCU chipset consists of a plurality of chips with different functions, and the MCU chipset comprises a main control chip U1;
the MCU chip set comprises a local data backup unit and a local data backup unit, wherein the local data backup unit is used for localizing data backup of the MCU chip set;
the cloud data backup unit is used for backing up cloud data of the MCU chip set in a cloud manner;
the system also comprises a data backup management unit, wherein the data backup management unit comprises an MCU chip set power supply voltage risk prediction module; the power supply voltage risk assessment and prediction module is used for assessing and predicting the power supply voltage risk of the MCU chipset according to the detection result of the power supply detection module; the data backup management module is used for selecting a local data backup unit and/or a cloud data backup unit according to the power supply voltage risk assessment and prediction results of the MCU chipset;
the cloud data backup unit comprises a cloud data backup module and a communication module, and the cloud data backup module is connected with the cloud server through the communication module in a network mode.
The during operation, power module provides the power for the MCU chipset, utilize power detection module to detect power module, when power module output is unusual, carry out filtering steady voltage and to the MCU chipset power supply to it through power optimization module, if unable optimization in the short time, then start stand-by power supply through power management module and supply power to the MCU chipset, then continue to carry out filtering steady voltage to power module through optimizing the module, when power module satisfies the output requirement, switch over again to the power module power supply, and charge reserve to stand-by power.
As a further scheme of the invention: the power supply module comprises a main power supply P1, wherein a pin 2 of the main power supply P1 is a positive electrode, a pin 2 of the main power supply P1 is connected with a pin VDDA of the main control chip U1, and a pin 1 of the main power supply P1 is grounded; main power P1 passes through power detection module, power optimization module and main power control module respectively and connects main control chip U1, and wherein, main control chip U1's model is STM32F103ZET 6.
As a further scheme of the invention: the power supply detection module comprises a power supply detection circuit, the power supply detection circuit comprises sequentially numbered resistors R13-R15 and an operational amplifier P3, and one end of the resistor R13 is connected with a pin 2 of a P1 of a main power supply; the other end of the resistor R13 is connected with one end of the resistor R14 and the same-direction end of the P3; the other end of the resistor R14 is grounded; one end of the resistor R15 is connected with the reverse end of the P3, and the other end is connected with the output end of the P3; the output end of the P3 is connected with a PA7 pin of the main control chip U1; v + of P3 is connected with +12V power supply; the V-terminal of the P1 is grounded, wherein the model of the operational amplifier P3 is LM 358.
As a further scheme of the invention: the power supply optimization module comprises a voltage stabilizing chip VR1 and a power supply optimization circuit, wherein the power supply optimization circuit comprises capacitors C1-C4 which are sequentially numbered, one end of the capacitor C1 is connected with one end of the capacitor C2 and a Vin pin of VR1, and the pin 2 of a main power supply P1 is connected in parallel; one end of the capacitor C3 is connected with one end of the capacitor C4 and is connected with the Vout pin of the VR1 in parallel; the pin Vout of VR1 outputs power VCC, the other end of capacitor C1 is connected with the other end of capacitor C2, the other end of capacitor C3, the other end of capacitor C4 and the pin GND of VR1, and is grounded, wherein VR1 is LM 1117-3.3.
As a further scheme of the invention: the main power control module comprises a main power control circuit, the main power control circuit comprises a resistor R1-a resistor R5, a triode Q1, a triode Q2 and a MOS transistor Q3 which are sequentially numbered, and one end of the resistor R1 is connected with a PA5 pin of a main control chip U1; the other end of the resistor R1 is connected with the base electrode of the triode Q1, and the emitter electrode of the triode Q1 is grounded; the collector of the triode Q1 is connected with one end of a resistor R2 and one end of a resistor R3; the other end of the resistor R2 is connected with VCC; the other end of the resistor R3 is connected with one end of a resistor R4 and the base electrode of a triode Q2; the other end of the resistor R4 is connected with the emitter of the triode Q2 and is grounded; the collector of the triode Q2 is connected with one end of a resistor R5 and the grid of a MOS transistor Q3; the other end of the resistor R5 is connected with the source of the MOS transistor Q3 and VCC in parallel; the drain of the MOS transistor Q3 is connected to VDDA pin of the main control chip U1.
As a further scheme of the invention: the standby power supply module comprises a standby power supply P2 and a charging circuit, wherein a pin 1 of the standby power supply P2 is a positive electrode, a pin 3 of the standby power supply P2 is grounded, the standby power supply P2 is connected with a main control chip U1 through a standby power supply control circuit, the standby power supply control circuit comprises a resistor R6 to a resistor R10, a triode Q4, a triode Q5 and a MOS transistor Q6 which are sequentially numbered, and one end of the resistor R6 is connected with a pin PA6 of the main control chip U1; the other end of the resistor R6 is connected with the base electrode of the triode Q4, and the emitter electrode of the triode Q4 is grounded; the collector of the triode Q4 is connected with one end of a resistor R7 and one end of a resistor R8; the other end of the resistor R7 is connected with pin 1 of the standby power supply P2; the other end of the resistor R8 is connected with one end of a resistor R9 and the base electrode of a triode Q5; the other end of the resistor R9 is connected with the emitter of the triode Q5 and is grounded; the collector of the triode Q5 is connected with one end of a resistor R10 and the grid of a MOS transistor Q6; the other end of the resistor R10 is connected with the source of the MOS tube Q6 and is connected with pin 1 of the standby power supply P2; the drain of the MOS transistor Q6 is connected to VDDA pin of the main control chip U1.
As a further scheme of the invention: the standby power supply P2 is connected with a main power supply P1 and a main control chip U1 through a charging circuit, the charging circuit comprises a resistor R11, a resistor R12, a resistor R16, a resistor R17, a MOS tube Q7, a capacitor C5, a triode Q8, a diode D1, a diode D2, an inductor L1 and an inductor L2, and one end of the resistor R11 is connected with one end of the resistor R12 and a PA4 pin of the main control chip U1; the other end of the resistor R11 is connected with the source electrode of the MOS tube Q7 and is grounded; one end of the resistor R16 is connected with the cathode of the diode D1 and the pin 2 of the standby power supply P2; the other end of the resistor R16 is connected with the cathode of the diode D2 and one end of the capacitor C5; the anode of the diode D2 is connected with one end of the resistor R17 and the pin 1 of the inductor L2; the other end of the resistor R17 is connected with a pin 3 of the inductor L2; the 2 pin of the inductor L2 is connected with the base of a triode Q8; the collector of the triode Q8 is connected with one end of the inductor L1; the anode of the diode D1 is connected with the other end of the capacitor C5, the emitter of the triode Q8 and the 4-pin of the standby power supply P2 and is connected with the drain of the MOS transistor Q7 in parallel; the other end of the inductor L1 is connected with pin 2 of the power main power supply P1.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention provides a power supply voltage detection circuit of an MCU chip, the structure is ingenious in arrangement and reasonable in arrangement, in the invention, when the power supply voltage detection circuit works, a power supply module provides power for the MCU chip, the power supply detection module is used for detecting the power supply module, when the output of the power supply module is abnormal, the power supply module carries out filtering voltage stabilization on the power supply module and supplies power to an MCU chipset through a power supply optimization module, if the power supply module cannot be optimized in a short time, a standby power supply is started through a power supply management module to supply power to the MCU chipset, then the power supply module is continuously subjected to filtering voltage stabilization through the optimization module, when the power supply module meets the output requirement, the power supply module;
2. the invention further specifically designs a power supply detection module, and the real-time power supply detection module is formed by utilizing the operational amplifier and the main control chip, so that the voltage of the power supply module can be accurately monitored in real time, and technical support is provided for subsequently ensuring the stable output of the power supply voltage according to requirements;
3. the invention further specifically designs a power supply optimization module, the power supply optimization module comprises a voltage stabilizing chip VR1 and a power supply optimization circuit, when the power supply voltage can not meet the requirement, the voltage stabilizing chip and a capacitor are used for filtering and stabilizing voltage, the power supply voltage is optimized and adjusted, the requirement can be met conveniently and rapidly, if the power supply voltage can not be optimized in a short time, the invention further designs a standby power supply, the standby power supply is started through a power supply management module to supply power to the MCU chip set, then the power supply module is continuously filtered and stabilized through the optimization module, and when the power supply module meets the output requirement, the power supply module is switched to the power supply module again to supply power;
4. the invention further designs a charging circuit corresponding to the temporary power supply, and charges the standby power supply by using the main power supply module, thereby ensuring sufficient electric quantity of the standby power supply, avoiding additional electric energy supplement and being convenient for management and use.
Drawings
FIG. 1 is a block diagram of a power supply voltage detection circuit of an MCU chip;
FIG. 2 is a block diagram of a data backup management unit in the power supply voltage detection circuit of the MCU chip;
FIG. 3 is a block diagram of a cloud data backup unit in an MCU chip power supply voltage detection circuit;
FIG. 4 is a main circuit diagram of a power supply voltage detection circuit of an MCU chip;
fig. 5 is a circuit diagram of a power supply optimization module in the MCU chip power supply voltage detection circuit.
In the figure: 100. an MCU chip set; 200. a power supply module; 300. a standby power supply module; 400. a power supply detection module; 500. a power supply optimization module; 600. a power management module; 700. a charging circuit; 800. a main board.
Detailed Description
The technical solution of the present patent will be described in further detail with reference to the following embodiments.
Referring to fig. 1-3, a power supply voltage detection circuit of an MCU chip includes a main board 800, the main board 800 is provided with an MCU chipset 100, a power supply module 200, a standby power supply module 300 and a power supply detection switching management module, the power supply module 200 is connected to the MCU chipset 100 and the power supply detection switching management module, and the standby power supply module 300 is connected to the MCU chipset 100 through the power supply detection switching management module; the power supply detection switching management module comprises a power supply management module 600, a power supply optimization module 500 and a power supply detection module 400, wherein the power supply management module 600 comprises a main power supply control module and a standby power supply control module; the MCU chipset 100 consists of a plurality of chips with different functions, and the chipset comprises a main control chip U1; when the power supply module 200 works, the power supply module 200 supplies power to the MCU chipset 100, the power supply detection module 400 is used for detecting the power supply module 200, when the output of the power supply module 200 is abnormal, the power supply optimization module 500 is used for carrying out filtering voltage stabilization on the power supply module and supplying power to the MCU chipset, if the power supply module cannot be optimized in a short time, the power supply management module 600 is used for starting a standby power supply to supply power to the MCU chipset, then the power supply module 200 is continuously subjected to filtering voltage stabilization through the optimization module, and when the power supply module 200 meets the output requirement, the power supply module 200 is switched to supply power again, and the standby; the system also comprises a local data backup unit 901 for localizing the data backup of the MCU chip set;
a cloud data backup unit 902, configured to backup cloud data of the MCU chipset;
the system further comprises a data backup management unit 900, wherein the data backup management unit 900 comprises an MCU chipset power supply voltage risk prediction module 9001; the power supply voltage risk assessment and prediction module is used for assessing and predicting the power supply voltage risk of the MCU chipset according to the detection result of the power supply detection module; the data backup management module 9002 is configured to select the local data backup unit 901 or the cloud data backup unit 902 according to the power supply voltage risk assessment and prediction result of the MCU chipset;
the cloud data backup unit 902 includes a cloud data backup module 9021 and a communication module 9022, and the cloud data backup module 9021 is connected to the cloud server through the communication module 9022 in a network.
The power module 200 comprises a main power supply P1, wherein a pin 2 of the main power supply P1 is a positive electrode, a pin 2 of the main power supply P1 is connected with a pin VDDA of a main control chip U1, and a pin 1 of the main power supply P1 is grounded; the main power supply P1 is connected with a main control chip U1 through a power supply detection module, the power supply detection module comprises a power supply detection circuit, the power supply detection circuit comprises a resistor R13 to a resistor R15 which are sequentially numbered and an operational amplifier P3, and one end of the resistor R13 is connected with a pin 2 of a P1 of the main power supply; the other end of the resistor R13 is connected with one end of the resistor R14 and the same-direction end of the P3; the other end of the resistor R14 is grounded; one end of the resistor R15 is connected with the reverse end of the P3, and the other end is connected with the output end of the P3; the output end of the P3 is connected with a PA7 pin of the main control chip U1; v + of P3 is connected with +12V power supply; the V-end of the P1 is grounded, wherein the model of the main control chip U1 is STM32F103ZET6, and the model of the operational amplifier P3 is LM 358; the main power supply P1 is connected with a main control chip U1 through a power supply optimization module and a main power supply control module, the power supply optimization module comprises a voltage stabilizing chip VR1 and a power supply optimization circuit, the power supply optimization circuit comprises capacitors C1 to C4 which are numbered sequentially, one end of each capacitor C1 is connected with one end of a capacitor C2 and a Vin pin of the VR1 and is connected with a pin 2 of the main power supply P1 in parallel; one end of the capacitor C3 is connected with one end of the capacitor C4 and is connected with the Vout pin of the VR1 in parallel; a Vout pin of the VR1 outputs a power supply VCC, the other end of the capacitor C1 is connected with the other end of the capacitor C2, the other end of the capacitor C3, the other end of the capacitor C4 and a GND pin of the VR1, and the power supply is grounded, wherein the model of the VR1 is LM 1117-3.3; the main power control module comprises a main power control circuit, the main power control circuit comprises a resistor R1-a resistor R5, a triode Q1, a triode Q2 and a MOS transistor Q3 which are sequentially numbered, and one end of the resistor R1 is connected with a PA5 pin of a main control chip U1; the other end of the resistor R1 is connected with the base electrode of the triode Q1, and the emitter electrode of the triode Q1 is grounded; the collector of the triode Q1 is connected with one end of a resistor R2 and one end of a resistor R3; the other end of the resistor R2 is connected with VCC; the other end of the resistor R3 is connected with one end of a resistor R4 and the base electrode of a triode Q2; the other end of the resistor R4 is connected with the emitter of the triode Q2 and is grounded; the collector of the triode Q2 is connected with one end of a resistor R5 and the grid of a MOS transistor Q3; the other end of the resistor R5 is connected with the source of the MOS transistor Q3 and VCC in parallel; the drain electrode of the MOS tube Q3 is connected with a VDDA pin of the main control chip U1;
the standby power supply module 300 comprises a standby power supply P2 and a charging circuit 700, wherein a pin 1 of the standby power supply P2 is a positive electrode, a pin 3 of the standby power supply P2 is grounded, the standby power supply P2 is connected with a main control chip U1 through a standby power supply control module, the standby power supply control module comprises a standby power supply control circuit, the standby power supply control circuit comprises a resistor R6 to a resistor R10, a triode Q4, a triode Q5 and a MOS transistor Q6 which are sequentially numbered, and one end of the resistor R6 is connected with a pin PA6 of the main control chip U1; the other end of the resistor R6 is connected with the base electrode of the triode Q4, and the emitter electrode of the triode Q4 is grounded; the collector of the triode Q4 is connected with one end of a resistor R7 and one end of a resistor R8; the other end of the resistor R7 is connected with pin 1 of the standby power supply P2; the other end of the resistor R8 is connected with one end of a resistor R9 and the base electrode of a triode Q5; the other end of the resistor R9 is connected with the emitter of the triode Q5 and is grounded; the collector of the triode Q5 is connected with one end of a resistor R10 and the grid of a MOS transistor Q6; the other end of the resistor R10 is connected with the source of the MOS tube Q6 and is connected with pin 1 of the standby power supply P2; the drain electrode of the MOS tube Q6 is connected with a VDDA pin of the main control chip U1; the standby power supply P2 is connected with a main power supply P1 and a main control chip U1 through a charging circuit 700, the charging circuit 700 comprises a resistor R11, a resistor R12, a resistor R16, a resistor R17, a MOS tube Q7, a capacitor C5, a triode Q8, a diode D1, a diode D2, an inductor L1 and an inductor L2, and one end of the resistor R11 is connected with one end of the resistor R12 and a PA4 pin of the main control chip U1; the other end of the resistor R11 is connected with the source electrode of the MOS tube Q7 and is grounded; one end of the resistor R16 is connected with the cathode of the diode D1 and the pin 2 of the standby power supply P2; the other end of the resistor R16 is connected with the cathode of the diode D2 and one end of the capacitor C5; the anode of the diode D2 is connected with one end of the resistor R17 and the pin 1 of the inductor L2; the other end of the resistor R17 is connected with a pin 3 of the inductor L2; the 2 pin of the inductor L2 is connected with the base of a triode Q8; the collector of the triode Q8 is connected with one end of the inductor L1; the anode of the diode D1 is connected with the other end of the capacitor C5, the emitter of the triode Q8 and the 4-pin of the standby power supply P2 and is connected with the drain of the MOS transistor Q7 in parallel; the other end of the inductor L1 is connected with the 2 pin of the main power supply P1.
The working principle of the invention is as follows: the during operation, power module provides the power for the MCU chip, utilize power detection module to detect power module, when power module output is unusual, carry out filtering steady voltage and supply power to the MCU chipset through power optimization module to it, if unable optimization in the short time, then start stand-by power supply and supply power to the MCU chipset through power management module, then continue to carry out filtering steady voltage to power module through optimizing the module, when power module satisfies the output requirement, switch over again to the power module power supply, utilize power module to charge for stand-by power supply, guarantee that stand-by power supply electric quantity is sufficient, need not extra electric energy and supply, be convenient for management and use.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art through specific situations.
Although the preferred embodiments of the present patent have been described in detail, the present patent is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present patent within the knowledge of those skilled in the art.