Battery detection control device for electronic products

By designing a battery detection and control device, and utilizing a microcontroller and related circuits to detect and control the power level of the built-in battery, the problem of automated detection in the production stage of electronic products is solved, improving efficiency and accuracy.

CN225032178UActive Publication Date: 2026-11-27QINGDAO WINTEC SYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522503769.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-11-27
Estimated Expiration
2035-11-26

AI Technical Summary

Technical Problem

In the production stage of electronic products, the process of detecting and controlling the power of built-in batteries is complex, difficult to automate, time-consuming, labor-intensive, and prone to errors.

Method used

Design a battery detection and control device, including a microcontroller circuit, a real-time clock circuit, an operational amplifier circuit, a charging management circuit, and button and serial port circuits. Through these circuits, the power level of the built-in battery can be detected and controlled, and the charging process of the battery can be automatically managed.

Benefits of technology

It has automated the power control during the electronic product manufacturing process, improving efficiency and accuracy, reducing manpower and material consumption, and avoiding detection omissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN225032178U_ABST
    Figure CN225032178U_ABST
Patent Text Reader

Abstract

The utility model discloses a battery detection control device for electronic product contains: microcontroller circuit, real time clock circuit, operational amplifier circuit and charge management circuit, real time clock circuit electric connection in microcontroller circuit, and the real time clock signal is exported to microcontroller circuit after power on, operational amplifier circuit electric connection in microcontroller circuit and built -in battery, real -time acquisition the current voltage value of built -in battery and export, and microcontroller circuit exports control signal after judging current voltage value according to first threshold value, charge management circuit electric connection in microcontroller circuit and built -in battery, opens or closes according to control signal, and charge management circuit charges when opening to built -in battery, and charge management circuit stops charging built -in battery when closing, and microcontroller circuit can selectively export or not export control signal after judging the clock value of real time clock signal according to second threshold value, microcontroller circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to a battery detection and control device, and more particularly to a battery detection and control device that is built into electronic products and used during the electronic product manufacturing process. Background Technology

[0002] With the continuous development of electronic products, more and more electronic products have integrated built-in batteries to provide independent power supply. In order to ensure transportation safety, electronic products with built-in batteries should avoid being fully charged. For example, in air transport, in accordance with the regulations of the International Civil Aviation Organization (ICAO) and the International Air Transport Association (IATA), the power should be kept at around 30%. The same applies to rail transport, which requires the power to be around 30%. The power limit for sea transport is usually between 30% and 80%.

[0003] Electronic products with built-in batteries require manual control of power during the manufacturing process, and the testing process is complex and requires specialized equipment. It is difficult to automate the process, which is very time-consuming and labor-intensive, and prone to errors.

[0004] Therefore, developing a battery detection and control device for use in the manufacturing stage to automatically control the battery power has become an urgent problem to be solved. Utility Model Content

[0005] This utility model provides a battery detection and control device for electronic products. The battery detection and control device is built into the electronic product to detect and control the charge level of the built-in battery. The battery detection and control device includes: Microcontroller circuit; A real-time clock circuit is electrically connected to the microcontroller circuit. After being powered on, the real-time clock circuit outputs a real-time clock signal to the microcontroller circuit. An operational amplifier circuit is electrically connected to the microcontroller circuit and the built-in battery. The operational amplifier circuit acquires the current voltage value of the built-in battery in real time and outputs it to the microcontroller circuit. The microcontroller circuit judges the current voltage value according to a first threshold and outputs a control signal. A charging management circuit is electrically connected to the microcontroller circuit and the built-in battery. The charging management circuit is turned on or off according to the control signal. When the charging management circuit is turned on, the built-in battery is charged through the charging management circuit. When the charging management circuit is turned off, the charging management circuit stops charging the built-in battery. Wherein, after the microcontroller circuit judges the clock value of the real-time clock signal according to the second threshold, the microcontroller circuit may selectively output or not output the control signal.

[0006] The aforementioned battery detection and control device further includes a button circuit electrically connected to the microcontroller circuit. The button circuit outputs a manual control signal to the microcontroller circuit, and the manual control signal controls the microcontroller circuit to turn on or off.

[0007] The aforementioned battery detection and control device further includes a serial port circuit electrically connected to the motherboard of the electronic product and the microcontroller circuit. The microcontroller circuit receives the motherboard control signal output by the motherboard through the serial port circuit and controls the microcontroller circuit to turn on or off through the motherboard control signal.

[0008] In the aforementioned battery detection and control device, the microcontroller circuit includes a microcontroller, and the real-time clock circuit includes a real-time clock battery socket, wherein pin 1 of the real-time clock battery socket is electrically connected to pin 1 of the microcontroller. The operational amplifier circuit includes an operational amplifier, pin 17 of the microcontroller is electrically connected to pins 6 and 7 of the operational amplifier, and pin 5 of the operational amplifier is electrically connected to the built-in battery; The charging management circuit includes a battery management chip. Pin 20 of the microcontroller is electrically connected to pin 3 of the battery management chip, pin 21 of the microcontroller is electrically connected to pin 4 of the battery management chip, pin 22 of the microcontroller is electrically connected to pin 6 of the battery management chip, and pins 10, 11, 14, and 15 of the battery management chip are electrically connected to the built-in battery.

[0009] In the aforementioned battery detection and control device, the button circuit includes a button electrically connected to pin 7 of the microcontroller, through which the manual control signal is output to the microcontroller.

[0010] In the aforementioned battery detection and control device, the serial port circuit includes a serial port socket, pin 2 of which is electrically connected to pin 42 of the microcontroller, and pin 3 of which is electrically connected to pin 43 of the microcontroller.

[0011] In the aforementioned battery detection and control device, the microcontroller is an STM32F405RGT6, the operational amplifier is an LM358 SO8, and the battery management chip is an MP26123DR QFN16.

[0012] The aforementioned battery detection and control device further includes a clock source circuit, which includes a first passive crystal oscillator. The two ends of the first passive crystal oscillator are electrically connected to pin 3 and pin 4 of the microcontroller, respectively. The clock source circuit provides a clock source for the real-time clock circuit.

[0013] The aforementioned battery detection and control device further includes a program burning circuit, a microcontroller circuit startup mode configuration circuit, an indicator light circuit, and a crystal oscillator circuit. The program programming circuit includes a program programming interface, with pin 3 of the program programming interface electrically connected to pin 46 of the microcontroller, and pin 4 of the program programming interface electrically connected to pin 49 of the microcontroller. The microcontroller circuit startup mode configuration circuit includes a microcontroller startup mode configuration interface, and pin 2 of the microcontroller startup mode configuration interface is electrically connected to pin 60 of the microcontroller. The crystal oscillator circuit includes a second passive crystal oscillator, which is electrically connected to pins 5 and 6 of the microcontroller.

[0014] The indicator circuit includes an LED, which is electrically connected to pin 24 of the microcontroller.

[0015] In the aforementioned battery detection and control device, the first threshold is 30% of the rated voltage of the built-in battery, and the second threshold is 24 hours.

[0016] The battery detection and control device of this invention can automatically control the power level during the manufacturing stage of electronic products, saving time, increasing efficiency, and significantly improving accuracy.

[0017] The above description of the present invention and the following description of the embodiments are intended to demonstrate and explain the principles of the present invention, and to provide a further explanation of the scope of the patent application of the present invention. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the battery detection and control device of this utility model.

[0019] Figure 2 This is a schematic diagram of the microcontroller circuit of this utility model.

[0020] Figure 3 This is a schematic diagram of the real-time clock circuit of this utility model.

[0021] Figure 4 This is a schematic diagram of the operational amplifier circuit of this utility model.

[0022] Figure 5This is a schematic diagram of the charging management circuit of this utility model.

[0023] Figure 6 This is a schematic diagram of the key circuit of this utility model.

[0024] Figure 7 This is a schematic diagram of the serial port circuit of this utility model.

[0025] Figure 8 This is a schematic diagram of the clock source circuit of this utility model.

[0026] Figure 9 This is a schematic diagram of the programming circuit of this utility model.

[0027] Figure 10 This is a schematic diagram of the microcontroller circuit startup mode configuration circuit of this utility model.

[0028] Figure 11 This is a schematic diagram of the indicator light circuit of this utility model.

[0029] Figure 12 This is a schematic diagram of the crystal oscillator circuit of this utility model. Detailed Implementation

[0030] Please see Figures 1 to 5 ,in, Figure 1 This is a schematic diagram of the battery detection and control device of this utility model; Figure 2 This is a schematic diagram of the microcontroller circuit of this utility model; Figure 3 This is a schematic diagram of the real-time clock circuit of this utility model; Figure 4 This is a schematic diagram of the operational amplifier circuit of this utility model; Figure 5 This is a schematic diagram of the charging management circuit of this utility model. Figures 1 to 5As shown, this utility model discloses a battery detection and control device for electronic products. The battery detection and control device is built into the electronic product to detect and control the charge level of the built-in battery B. The battery detection and control device BDC includes: a microcontroller circuit 1, a real-time clock circuit 2, an operational amplifier circuit 3, and a charging management circuit 4. The real-time clock circuit 2 is electrically connected to the microcontroller circuit 1, and outputs a real-time clock signal to the microcontroller circuit 1 after power-on. The operational amplifier circuit 3 is electrically connected to the microcontroller circuit 1 and the built-in battery B. The operational amplifier circuit 4 collects the current voltage value of the built-in battery B in real time and outputs it to the microcontroller circuit 1. The microcontroller circuit 1 judges the current voltage value according to a first threshold and outputs a control signal. The charging management circuit 4 is electrically connected to the microcontroller circuit 1 and the built-in battery B. The charging management circuit 4 is turned on or off according to the control signal. When the charging management circuit 4 is on, it starts charging the built-in battery B; when the charging management circuit 4 is off, it stops charging the built-in battery B. Specifically, the microcontroller circuit 1 compares the current voltage value with the first threshold. If the current voltage value is less than the first threshold, the microcontroller circuit 1 outputs a control signal to control the charging management circuit 4 to turn on. If the current voltage value is greater than or equal to the first threshold, the microcontroller circuit 1 outputs a control signal to control the charging management circuit 4 to turn off.

[0031] It should be noted that, in this embodiment, a preferred implementation is to use 30% of the rated voltage of the built-in battery as the first threshold.

[0032] In this embodiment, after the microcontroller circuit 1 determines the clock value of the real-time clock signal based on the second threshold, the microcontroller circuit 1 can selectively output or not output the control signal. Specifically, when the electronic product is powered on for the first time, the real-time clock circuit 2 outputs a real-time clock signal to the microcontroller circuit 1 after power-on. The microcontroller circuit 1 obtains the clock value based on the real-time clock signal. When the clock value is less than 24 hours, the microcontroller circuit 1 will automatically activate the battery detection and power control functions during the production stage. If the clock value is greater than or equal to 24 hours, the microcontroller circuit 1 will not automatically activate the battery detection and power control functions during the production stage. It should be noted that in this embodiment, a second threshold of 24 hours is a preferred implementation.

[0033] This ensures that the battery detection and power control function is effective for 24 hours after it is enabled, so that the function can be implemented during the production, manufacturing, testing and aging stages of the equipment. If the function is needed at other times, it can be manually enabled or disabled by sending a command through the motherboard.

[0034] The microcontroller circuit 1 includes a microcontroller 11. Pin 1 (VBAT) of the microcontroller 11 is grounded through capacitor C10. Pin 1 (VBAT) is also connected to VCC_RTC. Pins 12 (VSSA), 18 (VSS1), and 19 (VDD1) of the microcontroller 11 are grounded. Pin 13 (VDDA) of the microcontroller 11 is connected to one end of capacitors C111 and C112, and the other end of capacitors C111 and C112 is grounded. Pin 19 (VDDA) of the microcontroller 11 is connected to capacitor C118. One end of C119 is connected to the ground, and the other ends of capacitors C118 and C119 are grounded. Pin 64 (VDD4) of microcontroller 11 is connected to one end of capacitors C109 and C110. Pin 63 (VSS4) of microcontroller 11 is connected to the other end of capacitors C109 and C110 and then grounded. Pin 48 (VDD3) of microcontroller 11 is connected to one end of capacitors C116 and C117. The other ends of capacitors C116 and C117 are grounded. Pin 47 (Vcap_2) of microcontroller 11 is grounded through capacitor C114. The real-time clock circuit 2 has a timing function and includes a real-time clock battery socket BAT_RTC1. The first pin of the real-time clock battery socket BAT_RTC1 is electrically connected to the first pin of the microcontroller 11. In this embodiment, the first pin of the real-time clock battery socket BAT_RTC1 is connected to the first pin of the microcontroller 11 through diode D18, diode D17, and VCC_RTC. The second pin, M1 pin, and M2 pin of the real-time clock battery socket BAT_RTC1 are connected to ground. The operational amplifier circuit 3 is used for power data acquisition and uploading to the microcontroller 11. The operational amplifier circuit 3 includes an operational amplifier U11. The 17th pin PA3 / U2_RX / ADC123_IN3 of the microcontroller is electrically connected to the 6th pin IN2- and the 7th pin OUT2 of the operational amplifier. The 5th pin IN2+ of the operational amplifier is electrically connected to the built-in battery VDD_BAT through resistor R151. The 5th pin IN2+ of the operational amplifier is grounded through resistor R155. The 8th pin VCC of the operational amplifier is connected to the two ends of parallel capacitors C130 and C131. The charging management circuit 4 includes a battery management chip 41, and pin 20 PA4 / SPI1_NSS of the microcontroller 11 is electrically connected to pin 3 of the battery management chip 41. The 21st pin PA5 / SPI1_SCK of the microcontroller 11 is electrically connected to the 4th pin of the battery management chip. Pin 22 PA6 / SPI1_MISO of the microcontroller 11 is electrically connected to pin 6 of the battery management chip. The battery management chip's pins 10 (BATT), 11 (CSP), 14 (BST), and 15 (SW) are electrically connected to the built-in battery VDD_BAT. Pin 3 of the battery management chip 41... Connect pins 1, 2, and 3 of MOSFET Q22 via resistor R146. These pins are then connected to one end of diode D19. The other end of diode D19 is connected to pin 16 (VIN) of battery management chip 41. The other end of diode D19 is also grounded via capacitor C129. Pin 3 of the battery management chip... It is also connected to pin 4 of MOSFET Q22. Pins 5, 6, 7, and 8 of MOSFET Q22 are connected to ground via capacitor C128 and then connected to VDD_12VA. Pin 3 Connect VREF33 via resistor R148, pin 4. VREF33 is connected via resistor R147. Pin 1 (VCC) of battery management chip 41 is connected to VDD_12VA. Pin 1 (VCC) is also connected to one end of parallel capacitors C137 and C138. The other end of parallel capacitors C137 and C138 is grounded. Pin 5 (VREF33) of battery management chip 41 is grounded through capacitor C136. Pin 5 (VREF33) is also connected to pin 2 (NTC) of battery management chip 41 via resistor R152. Pin 7 (CELLS) of battery management chip 41 is connected via resistor R152. One end of resistor 7 is connected to ground, and the other end of resistor 157 is also connected to one end of resistor 156. The other end of resistor 156 is connected to the connection path between pin 2 (NTC) and resistor R152. Pins 12 (GND0) and 17 (GND) of battery management chip 41 are connected to ground. Pin 15 (SW) of battery management chip 41 is connected to one end of Schottky diode D20 and one end of power inductor L6. The other end of Schottky diode D20 is grounded, and the other end of power inductor L6 is connected to parallel resistor R149. One end of R150 is connected to the parallel resistor R149. The other end of R150 is connected to one end of the parallel capacitors C132, C133, and C134 and the built-in battery VDD_BAT. The other ends of the parallel capacitors C132, C134, and C135 are grounded. Pin 14 (BST) of the battery management chip 41 is connected to pin 15 (SW), one end of the Schottky diode D20, and one end of the power inductor L6 through capacitor C135. Pin 11 (CSP) of the battery management chip 41 is connected to the other end of the power inductor L6 and the parallel resistor R149. 49. In this embodiment, it is preferable to use a power inductor L6 of 4.7μH at one end of R150. The BATT pin of the battery management chip 41 is connected to the other end of the parallel resistors R149 and R150. The COMPI pin of the battery management chip 41 is grounded through the resistor R153 and the capacitor C142. The COMPV pin of the battery management chip 41 is grounded through the resistor R154 and the capacitor C141. The 13th pin of the battery management chip 41 is grounded through the parallel capacitors C139 and C140.

[0035] In this embodiment, the microcontroller is STM32F405RGT6, the operational amplifier is LM358SO8, and the battery management chip is MP26123DR QFN16, which is a preferred implementation method.

[0036] Please refer to Figures 6-7 , Figure 6 This is a schematic diagram of the key circuit of this utility model. Figure 7 This is a schematic diagram of the serial port circuit of this utility model. (As shown...) Figures 6-7As shown, the battery detection and control device BDC also includes a button circuit 5 and a serial port circuit 6. The button circuit 5 is electrically connected to the microcontroller circuit 1 and outputs a manual control signal to the microcontroller circuit 1. The manual control signal controls the microcontroller circuit 1 to turn on or off. The serial port circuit 6 is electrically connected to the motherboard M of the electronic product and the microcontroller circuit 1. The microcontroller circuit 1 receives the motherboard control signal output by the motherboard M through the serial port circuit 6 and controls the microcontroller circuit 1 to turn on or off.

[0037] The button circuit 5 is used to manually turn the power detection and control function on and off. The button circuit 5 includes a button RST1, which is electrically connected to pin 7 NRST of the microcontroller 11. The manual control signal is output to the microcontroller through button RST1. The serial port circuit 6 is used for serial communication between the microcontroller and the host motherboard. The motherboard sends commands to turn the power detection and control function on and off through the serial port. The serial port circuit 6 includes a serial port socket KB. Pin 2 of the serial port socket is electrically connected to pin 42 PA9 / U1_TX / T1_CH2 of the microcontroller through resistor R34. Pin 3 of the serial port socket is electrically connected to pin 43 PA10 / U1_RX / T1_CH3 of the microcontroller through resistor R37. Pin 4 of the serial port socket is grounded. Pin 1 of the serial port socket is grounded through parallel capacitors C62 and C61. Pin 1 of the serial port socket is also connected to VDD_5VA.

[0038] Please refer to Figure 8 , Figure 8 This is a schematic diagram of the clock source circuit of this utility model. Figure 8 As shown, the battery detection and control device (BDC) also includes a clock source circuit 7. The clock source circuit 7 includes a first passive crystal oscillator X1. The two ends of the first passive crystal oscillator X1 are electrically connected to pin 3 (PC14 / OSC32_IN) and pin 4 (PC15 / OSC32_OUT) of the microcontroller, respectively. The clock source circuit 7 provides a clock source for the real-time clock circuit 2. In this embodiment, one end of pin 3 (PC14 / OSC32_IN) of the first passive crystal oscillator X1 is also grounded through capacitor C113, and one end of pin 4 (PC15 / OSC32_OUT) of the first passive crystal oscillator X1 is also grounded through capacitor C115. Resistor 138 is connected in parallel across the two ends of the first passive crystal oscillator X1. In this embodiment, the first passive crystal oscillator X1 is a 32.768 kHz passive crystal oscillator.

[0039] Please refer to Figures 9-12 , Figure 9 This is a schematic diagram of the programming circuit of this utility model. Figure 10This is a schematic diagram of the microcontroller circuit startup mode configuration circuit of this utility model. Figure 11 This is a schematic diagram of the indicator light circuit of this utility model. Figure 12 This is a schematic diagram of the crystal oscillator circuit of this utility model. Figures 9-12 As shown, the battery detection and control device BDC also includes a program burning circuit 8, a microcontroller circuit start-up mode configuration circuit 9, an indicator light circuit 10, and a crystal oscillator circuit CX. The programming circuit 8 has a programming function, including a programming interface SWD1. Pin 3 of the programming interface SWD1 is electrically connected to pin 46 PA13 / JTMS-SWDIO of the microcontroller, and pin 4 of the programming interface SWD1 is electrically connected to pin 49 PA14 / JTCK-SWCLK of the microcontroller. Pin 1 of the programming interface SWD1 is connected to VDD_3V3A, and pin 2 of the programming interface is grounded. When the microcontroller circuit startup mode configuration circuit 9 is configured to a low level, it starts from the main Flash memory and loads the user program. When configured to a high level, it enters the Bootloader mode. The microcontroller circuit startup mode configuration circuit 9 includes a microcontroller startup mode configuration interface BOOT1. The second pin of the microcontroller startup mode configuration interface BOOT1 is electrically connected to the 60th pin BOOT0 of the microcontroller 11. The first pin of BOOT1 is connected to VDD_3V3A through a resistor R137, and the third pin of BOOT1 is grounded through a resistor R139. The indicator circuit 10 is used to indicate the circuit operating status. The indicator circuit 10 includes an LED. One end of the LED is electrically connected to pin 24 of the microcontroller, PC4 / ETH_RMII_RXD0, and the other end of the LED is connected to VDD_3V3A through a resistor R143. In this embodiment, it is preferred to use a green LED.

[0040] The crystal oscillator circuit CX provides a precise clock source for the main system. The crystal oscillator circuit CX includes a second passive crystal oscillator X2. Pin 1 of the second passive crystal oscillator X2 is electrically connected to pin 5 PH0 / OSC_IN of the microcontroller 11. Pin 1 of the second passive crystal oscillator X2 is electrically connected to pin 2 of the second passive crystal oscillator X2 through capacitor C120. Pin 1 of the second passive crystal oscillator X2 is electrically connected to pin 3 of the second passive crystal oscillator X2 through resistor C141. Pin 3 of the second passive crystal oscillator X2 is electrically connected to pin 4 of the second passive crystal oscillator X2 through capacitor C124. Pin 3 of the second passive crystal oscillator X2 is electrically connected to pin 6 PH1 / OSC_OUT of the microcontroller 11. Pins 4 and 2 of the second passive crystal oscillator X2 are grounded. In this embodiment, a 25MHz passive crystal oscillator is preferred.

[0041] This invention employs a 32-bit ARM microcontroller to detect and control battery power. The microcontroller detects battery power via pin 17 (PA3 / U2_RX / ADC123_IN3) and controls the charging management chip via pin 22 (PA6 / SPI1_MISO). The microcontroller controls the charging management chip to turn on and off. It communicates with the motherboard via a serial port and can manually turn on and off battery detection and power control during the production stage. This solves the problem of consuming a lot of manpower and resources in large-scale production in the prior art. At the same time, it can avoid equipment omissions due to fatigue or carelessness. The automatic power control achieved by this utility model can save time, increase efficiency, and greatly improve accuracy.

[0042] Although the present invention has been disclosed above with reference to the foregoing embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of patent protection of the present invention shall be determined by the scope of protection of the appended claims.

Claims

1. A battery detection and control device for electronic products, characterized in that, The battery detection and control device is built into the electronic product to detect and control the power level of the built-in battery of the electronic product. The battery detection and control device includes: Microcontroller circuit; A real-time clock circuit is electrically connected to the microcontroller circuit. After being powered on, the real-time clock circuit outputs a real-time clock signal to the microcontroller circuit. An operational amplifier circuit is electrically connected to the microcontroller circuit and the built-in battery. The operational amplifier circuit acquires the current voltage value of the built-in battery in real time and outputs it to the microcontroller circuit. The microcontroller circuit judges the current voltage value according to a first threshold and outputs a control signal. A charging management circuit is electrically connected to the microcontroller circuit and the built-in battery. The charging management circuit is turned on or off according to the control signal. When the charging management circuit is turned on, the built-in battery is charged through the charging management circuit. When the charging management circuit is turned off, the charging management circuit stops charging the built-in battery. Wherein, after the microcontroller circuit judges the clock value of the real-time clock signal according to the second threshold, the microcontroller circuit may selectively output or not output the control signal.

2. The battery detection and control device as described in claim 1, characterized in that, It also includes a button circuit, which is electrically connected to the microcontroller circuit. The button circuit outputs a manual control signal to the microcontroller circuit, and the manual control signal controls the microcontroller circuit to turn on or off.

3. The battery detection and control device as described in claim 2, characterized in that, It also includes a serial port circuit, which is electrically connected to the motherboard of the electronic product and the microcontroller circuit. The microcontroller circuit receives the motherboard control signal output by the motherboard through the serial port circuit and controls the microcontroller circuit to turn on or off through the motherboard control signal.

4. The battery detection and control device as described in claim 3, characterized in that, The microcontroller circuit includes a microcontroller, and the real-time clock circuit includes a real-time clock battery socket, with pin 1 of the real-time clock battery socket electrically connected to pin 1 of the microcontroller. The operational amplifier circuit includes an operational amplifier, pin 17 of the microcontroller is electrically connected to pins 6 and 7 of the operational amplifier, and pin 5 of the operational amplifier is electrically connected to the built-in battery; The charging management circuit includes a battery management chip. Pin 20 of the microcontroller is electrically connected to pin 3 of the battery management chip, pin 21 of the microcontroller is electrically connected to pin 4 of the battery management chip, pin 22 of the microcontroller is electrically connected to pin 6 of the battery management chip, and pins 10, 11, 14, and 15 of the battery management chip are electrically connected to the built-in battery.

5. The battery detection and control device as described in claim 2, characterized in that, The button circuit includes a button, which is electrically connected to pin 7 of the microcontroller. The manual control signal is output to the microcontroller through the button.

6. The battery detection and control device as described in claim 4, characterized in that, The serial port circuit includes a serial port socket, pin 2 of which is electrically connected to pin 42 of the microcontroller, and pin 3 of which is electrically connected to pin 43 of the microcontroller.

7. The battery detection and control device as described in claim 4, characterized in that, The microcontroller is an STM32F405RGT6, the operational amplifier is an LM358 SO8, and the battery management chip is an MP26123DR QFN16.

8. The battery detection and control device as described in claim 4, characterized in that, It also includes a clock source circuit, which includes a first passive crystal oscillator. The two ends of the first passive crystal oscillator are electrically connected to pin 3 and pin 4 of the microcontroller, respectively. The clock source circuit provides a clock source for the real-time clock circuit.

9. The battery detection and control device as described in claim 4, characterized in that, It also includes a program burning circuit, a microcontroller circuit startup mode configuration circuit, an indicator light circuit, and a crystal oscillator circuit; The program programming circuit includes a program programming interface, with pin 3 of the program programming interface electrically connected to pin 46 of the microcontroller, and pin 4 of the program programming interface electrically connected to pin 49 of the microcontroller. The microcontroller circuit startup mode configuration circuit includes a microcontroller startup mode configuration interface, and pin 2 of the microcontroller startup mode configuration interface is electrically connected to pin 60 of the microcontroller. The indicator circuit includes an LED, which is electrically connected to pin 24 of the microcontroller; The crystal oscillator circuit includes a second passive crystal oscillator, which is electrically connected to pins 5 and 6 of the microcontroller.

10. The battery detection and control device as described in claim 1, characterized in that, The first threshold is 30% of the rated voltage of the built-in battery, and the second threshold is 24 hours.