A process voltage detection circuit and method for a battery powered device

By designing a simplified battery-powered device voltage detection circuit and using the ADC module and DMA module to cooperate with the memory for voltage detection, the problem of high energy consumption and accuracy caused by the MCU module's participation in detection is solved, and low power consumption and high accuracy are achieved. Voltage detection extends battery life.

CN113640681BActive Publication Date: 2024-09-13HENAN ZHUOZHENG ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110923361.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-12
Publication Date
2024-09-13
Estimated Expiration
2041-08-12

AI Technical Summary

Technical Problem

The existing battery voltage detection circuit requires the participation of the MCU module, resulting in high energy consumption and inaccurate detection results, which affects the battery life.

Method used

A battery-powered device process voltage detection circuit is designed. It uses components such as field effect transistors, transistors, and resistors to detect voltage through the ADC module and DMA module in conjunction with the memory. The MCU module only needs to participate in the working mode switching and is independent of the detection process. Simplify the circuit structure.

Benefits of technology

It achieves voltage detection with high accuracy and low power consumption, extends the service life of the battery, and maintains detection accuracy during high current operation and wide voltage input.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113640681B
    Figure CN113640681B
Patent Text Reader

Abstract

The present invention belongs to the technical field of battery voltage detection, and specifically relates to a process voltage detection circuit of a battery-powered device, comprising a field effect tube, a triode, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a capacitor and a power supply voltage electrically connected to each other; a process voltage detection method of a battery-powered device, wherein an MCU module continuously outputs a high level, a sampling module samples the voltages at both ends of a battery-powered device to be tested, data collected by the sampling module are sequentially input to an ADC module and a DMA module, and finally stored by a memory, the MCU module reads the detection data in the memory, and determines whether a switching condition of a corresponding voltage detection working mode is met to start the corresponding voltage detection working mode, after the corresponding working mode ends, the MCU module outputs a low level, the voltage detection circuit is turned off, and finally the MCU module outputs a detection result; the present invention has the advantages of accurate detection and low energy consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of battery voltage detection, and in particular relates to a process voltage detection circuit and method for a battery-powered device. Background Art

[0002] The radio frequency system of the smart meter is powered by a lithium-ion battery. When the radio frequency system is in the working state of radio frequency transmission, valve opening, valve closing, etc., it is equivalent to a heavy load, and the current is large, sometimes up to 500mA. At this time, the voltage at both ends of the lithium-ion battery will drop seriously. Since the voltage drop at both ends of the battery will affect the service life of the battery, it is necessary to detect the voltage state at both ends of the battery when the radio frequency system is in the working process of radio frequency transmission, valve opening, valve closing, etc., so as to accurately evaluate the service life of the battery and the meter.

[0003] At present, there are various circuits for detecting the voltage status at both ends of a battery. However, the voltage detection in these voltage detection circuits requires the participation of the MCU module. Since the MCU module carries a huge amount of data processing work, the MCU module participates in voltage detection on the one hand and data processing on the other hand. The MCU module participates in two processes simultaneously, which increases the energy consumption of the MCU module and affects the accuracy of the voltage detection results. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a process voltage detection circuit and method for a battery-powered device with high voltage detection accuracy, low power consumption and effective extension of battery life.

[0005] The technical solution of the present invention is as follows:

[0006] A process voltage detection circuit for a battery-powered device comprises a field effect tube, a triode, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a capacitor and a power supply voltage;

[0007] The gate of the field effect tube is connected to the collector of the triode, the drain of the field effect tube is connected to the anode output terminal of the battery power supply device to be tested, the source of the field effect tube is connected to a voltage division sampling module composed of a first resistor and a second resistor connected in series, and the output end of the voltage division sampling module is connected to an ADC module in a radio frequency system connected to the battery power supply device to be tested and the base of the triode;

[0008] The base of the transistor is connected to the MCU module in the radio frequency system connected to the battery power supply device to be tested through a fifth resistor, the collector of the transistor is connected to the power supply voltage through a third resistor, and the emitter of the transistor is grounded;

[0009] The fourth resistor is connected between the base and the emitter of the transistor;

[0010] The capacitor is connected in parallel to both ends of the second resistor, and the end of the second resistor not connected to the first resistor is connected to the emitter of the transistor.

[0011] Preferably, the radio frequency system includes a single-chip microcomputer, a prompt module and a radio frequency transmission module. The single-chip microcomputer includes an MCU module, an ADC module, a DMA module and a memory. The ADC module is connected to the DMA module, the DMA module is unidirectionally connected to the memory, the DMA module is bidirectionally connected to the MCU module, the memory is unidirectionally connected to the MCU module, and the MCU module is also connected to the prompt module and the radio frequency transmission module.

[0012] A method for detecting process voltage of a battery-powered device is provided, wherein the process voltage detection circuit of the battery-powered device is used to detect voltage. The specific method is as follows:

[0013] S1, initialize the DMA module and ADC module in the RF system;

[0014] S2, the MCU module continuously outputs a high level for t1 and then switches to a high impedance mode. The process voltage detection circuit of the battery-powered device is turned on, the voltage at both ends of the battery-powered device to be detected is sampled, and input to the ADC module. The sampled data is stored in the memory with the participation of DMA;

[0015] S3, after time t2, the MCU module reads the sampled data in the memory, and determines whether the switching condition of the corresponding voltage detection working mode is met according to the sampled data;

[0016] S4. According to the judgment result of step S3, if the switching condition is met, the MCU module controls to start the corresponding voltage detection working mode; otherwise, return to step S3 to re-read the newly stored sampling data in the memory to determine whether the switching condition is met. If it is still not met, the MCU module controls the prompt module to prompt that the voltage detection circuit is abnormal and stops the subsequent voltage detection process;

[0017] S5, after the corresponding voltage detection working mode ends and the time t3 delay has passed, the MCU module outputs a low level, and the process voltage detection circuit of the battery-powered device is turned off;

[0018] S6. The MCU module reads all the sampled data from the memory, processes the sampled data, and obtains the maximum voltage, the minimum voltage, and the voltage detection diagram corresponding to the voltage detection working mode.

[0019] Furthermore, in the step S1, the initialization content includes: setting the memory storage address to an incrementing mode, setting the ADC module and DMA module clocks and enabling the DMA module, setting the 16-bit mode, and setting the number of data transmissions.

[0020] Furthermore, in step S3, the minimum number of sampled data, sampling frequency, and sampling delay time for determining whether the switching condition is met are defined as N, f0, and t0, respectively, and the time t2 is: t2>t0+N / f0.

[0021] Furthermore, in step S3, the specific process of determining whether the switching condition of the corresponding voltage detection working mode is met according to the sampled data is as follows:

[0022] S31, judging whether the actual number n of the current sampling data is not less than the minimum number N, if it is less than, it means that the sampling is abnormal, the detection circuit does not work, the sampling process is set incorrectly, or the sampling accuracy does not meet the requirements, and it is directly judged that the switching condition is not met; if it is not less than, the last N are selected from the n sampling data as pre-processing sampling samples;

[0023] S32, according to the judgment result of step S31, calculating the difference between two adjacent samples in the last N pre-processed sampling samples, and comparing the absolute value of each difference with the difference threshold;

[0024] S33. If the absolute values ​​of all the differences in step S32 are smaller than the difference threshold, it is determined that the switching condition is met; otherwise, it is determined that the switching condition is not met.

[0025] Furthermore, in step S4, the voltage detection working modes are divided into three types: radio frequency transmission, valve opening, and valve closing.

[0026] Furthermore, in step S6, the specific process of the MCU module processing the sampled data is as follows:

[0027] S61, deleting the n sampling data first read by the MCU module from the memory from the finally acquired sampling data, and obtaining the voltage sampling value in the whole process of the voltage detection working mode;

[0028] S62: construct a voltage sampling point (t i ,u i ), where u i represents the i-th voltage sampling value, t i =i / f0, which represents the time value corresponding to the i-th voltage sampling value, and f0 is the sampling frequency of the process voltage detection circuit of the battery-powered device;

[0029] S63, obtaining all voltage extreme value points among the constructed voltage sampling points, including maximum value points and minimum value points;

[0030] S64, using the value taking window to take values ​​of the voltage sampling values ​​before and after each voltage extreme value point, when taking values, ensure that the extreme value point is located at the center of the value taking window. In this way, through the value taking process, each value taking window includes a corresponding extreme value point and multiple voltage sampling points near the extreme value point;

[0031] S65, performing a round of expansion processing on all voltage sampling values ​​in each value taking window;

[0032] S66. Perform curve fitting based on all voltage sampling points obtained after expansion, determine the maximum voltage and the minimum voltage from the fitting curve, and thus obtain a voltage detection graph, which includes a voltage detection working mode, a voltage detection curve that is a fitting curve, and a maximum value and a minimum value of the voltage detection curve.

[0033] Furthermore, in step S65, the specific process of the expansion process is as follows:

[0034] S651, for any voltage sampling point (t i ,u i )、(t i+1 ,u i+1 )、(t i+2 ,u i+2 ),calculate:

[0035]

[0036]

[0037] t i,i+1 =0.5t i +0.5t i+1 , t i+1,i+2 =0.5t i+1 +0.5t i+2 ;

[0038] S652, sorting all the voltage sampling points in each value window after the expansion process of step S651 according to the size of the time value, and repeating the above steps until the first round of expansion is completed.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] 1. The process voltage detection circuit of the battery-powered device provided by the present invention has an ADC module, a DMA module and a memory that cooperate with each other to realize voltage detection, and does not require the participation of the MCU module. The MCU module only needs to participate in the switching of the voltage detection working mode, so that the two processes of voltage detection and mode switching are independent of each other and do not interfere with each other; and the process voltage detection circuit of the battery-powered device has a simple structure and has almost no effect on the voltage at both ends of the battery-powered device to be detected, thereby effectively ensuring the accuracy of voltage detection;

[0041] 2. The method for voltage detection using the process voltage detection circuit of the battery-powered device provided by the present invention realizes power supply voltage detection while realizing large current operation, thereby enabling accurate voltage detection throughout the entire working process of the radio frequency system, and enabling voltage detection during a wide voltage input. It also has the characteristics of low power consumption, does not cause excessive additional current due to voltage detection, and effectively extends the life of the battery. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is the principle diagram of the voltage detection circuit of the present invention.

[0043] Figure 2 Flow chart of the voltage detection method of the present invention.

[0044] Among them, Q1 is a field effect transistor, Q2 is a transistor, R1 is a first resistor, R2 is a second resistor, R3 is a third resistor, R4 is a fourth resistor, C1 is a capacitor, and VCC is a power supply voltage. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] according to Figure 1 As shown, a process voltage detection circuit of a battery-powered device includes a field effect transistor Q1, a transistor Q2, a first resistor R1, a second resistor R2, a third resistor 0R3, a fourth resistor R4, a fifth resistor R5, a capacitor C1 and a power supply voltage VCC;

[0047] The gate of the field effect tube Q1 is connected to the collector of the transistor Q2, the drain of the field effect tube Q1 is connected to the anode output terminal of the battery power supply device to be tested, the source of the field effect tube Q1 is connected to a voltage division sampling module composed of a first resistor R1 and a second resistor R2 connected in series, and the output end of the voltage division sampling module is connected to the ADC module in the radio frequency system connected to the battery power supply device to be tested and the base of the transistor Q2;

[0048] The base of the transistor Q2 is connected to the MCU module in the radio frequency system connected to the battery power supply device to be tested through the fifth resistor R5, the collector of the transistor Q2 is connected to the power supply voltage VCC through the third resistor R3, and the emitter of the transistor Q2 is grounded;

[0049] The fourth resistor R4 is connected between the base and the emitter of the transistor Q2;

[0050] The capacitor C1 is connected in parallel to both ends of the second resistor R2, and the end of the second resistor R2 not connected to the first resistor R1 is connected to the emitter of the transistor Q2.

[0051] The radio frequency system includes a single-chip microcomputer, a prompt module and a radio frequency transmission module. The single-chip microcomputer includes an MCU module, an ADC module, a DMA module and a memory. The ADC module is connected to the DMA module, the DMA module is unidirectionally connected to the memory, the DMA module is bidirectionally connected to the MCU module, the memory is unidirectionally connected to the MCU module, and the MCU module is also connected to the prompt module and the radio frequency transmission module.

[0052] The working principle of the process voltage detection circuit of the battery power supply device provided by the present invention is as follows:

[0053] The MCU module outputs a high level, the transistor Q2 is turned on, and then the field effect transistor Q1 is turned on; after the field effect transistor Q1 is turned on, the voltage across the second resistor R2 maintains the base voltage of the transistor Q2, so that the field effect transistor Q1 is continuously turned on; at the same time, the voltage-dividing sampling module composed of the first resistor R1 and the second resistor R2 samples the voltage across the battery-powered device to be detected, and inputs it into the ADC module, the ADC module performs analog-to-digital conversion on the sampled data, and sends the converted data to the DMA module, and the DMA module transfers the received data to the memory;

[0054] During each voltage detection process, the time when the MCU module outputs a high level is t1, and t1 is determined according to the maximum time required for the transistor Q2 and the field effect transistor Q1 to be turned on and maintained; after time t1, the MCU module will switch to a high impedance state accordingly; subsequently, the MCU module participates in RF transmission, valve opening, valve closing and other working modes, while the process voltage detection circuit of the battery-powered device only needs to cooperate with the ADC module, DMA module and memory to realize the voltage detection process. Voltage detection and working mode switching are two independent processes and do not interfere with each other; and since the process voltage detection circuit of the battery-powered device has a simple structure, it has almost no effect on the voltage at both ends of the battery-powered device to be detected, thereby ensuring the accuracy of voltage detection.

[0055] like Figure 2 As shown, a method for detecting process voltage of a battery-powered device is provided, which uses the aforementioned process voltage detection circuit of the battery-powered device to perform voltage detection. The specific method is as follows:

[0056] S1, initialize the DMA module and ADC module in the RF system;

[0057] S2, the MCU module continuously outputs a high level for t1 and then switches to a high impedance mode. The process voltage detection circuit of the battery-powered device is turned on, the voltage at both ends of the battery-powered device to be detected is sampled, and input to the ADC module. The sampled data is stored in the memory with the participation of DMA;

[0058] S3, after time t2, the MCU module reads the sampled data in the memory, and determines whether the switching condition of the corresponding voltage detection working mode is met according to the sampled data;

[0059] S4. According to the judgment result of step S3, if the switching condition is met, the MCU module controls to start the corresponding voltage detection working mode; otherwise, return to step S3 to re-read the newly stored sampling data in the memory to determine whether the switching condition is met. If it is still not met, the MCU module controls the prompt module to prompt that the voltage detection circuit is abnormal and stops the subsequent voltage detection process;

[0060] S5, after the corresponding voltage detection working mode ends and the time t3 delay has passed, the MCU module outputs a low level, and the process voltage detection circuit of the battery-powered device is turned off;

[0061] S6. The MCU module reads all the sampled data from the memory, processes the sampled data, and obtains the maximum voltage, the minimum voltage, and the voltage detection diagram corresponding to the voltage detection working mode.

[0062] Furthermore, in the step S1, the initialization content includes: setting the memory storage address to an incrementing mode, setting the ADC module and DMA module clocks and enabling the DMA module, setting the 16-bit mode, and setting the number of data transmissions.

[0063] Furthermore, in step S3, the minimum number of sampled data, sampling frequency, and sampling delay time for determining whether the switching condition is met are defined as N, f0, and t0, respectively, and the time t2 is: t2>t0+N / f0.

[0064] Furthermore, in step S3, the specific process of determining whether the switching condition of the corresponding voltage detection working mode is met according to the sampled data is as follows:

[0065] S31, judging whether the actual number n of the current sampling data is not less than the minimum number N, if it is less than, it means that the sampling is abnormal, the detection circuit does not work, the sampling process is set incorrectly, or the sampling accuracy does not meet the requirements, and it is directly judged that the switching condition is not met; if it is not less than, the last N are selected from the n sampling data as pre-processing sampling samples;

[0066] S32, according to the judgment result of step S31, calculating the difference between two adjacent samples in the last N pre-processed sampling samples, and comparing the absolute value of each difference with the difference threshold;

[0067] S33. If the absolute values ​​of all the differences in step S32 are smaller than the difference threshold, it is determined that the switching condition is met; otherwise, it is determined that the switching condition is not met.

[0068] Furthermore, in step S4, the voltage detection working modes are divided into three types: radio frequency transmission, valve opening, and valve closing.

[0069] Furthermore, in step S6, the specific process of the MCU module processing the sampled data is as follows:

[0070] S61, deleting the n sampling data first read by the MCU module from the memory from the finally acquired sampling data, and obtaining the voltage sampling value in the whole process of the voltage detection working mode;

[0071] S62: construct a voltage sampling point (t i ,u i ), where u i represents the i-th voltage sampling value, t i =i / f0, which represents the time value corresponding to the i-th voltage sampling value, and f0 is the sampling frequency of the process voltage detection circuit of the battery-powered device;

[0072] S63, obtaining all voltage extreme value points among the constructed voltage sampling points, including maximum value points and minimum value points;

[0073] S64, using the value taking window to take values ​​of the voltage sampling values ​​before and after each voltage extreme value point, when taking values, ensure that the extreme value point is located at the center of the value taking window. In this way, through the value taking process, each value taking window includes a corresponding extreme value point and multiple voltage sampling points near the extreme value point;

[0074] S65, performing a round of expansion processing on all voltage sampling values ​​in each value taking window;

[0075] S66. Perform curve fitting based on all voltage sampling points obtained after expansion, determine the maximum voltage and the minimum voltage from the fitting curve, and thus obtain a voltage detection graph, which includes a voltage detection working mode, a voltage detection curve that is a fitting curve, and a maximum value and a minimum value of the voltage detection curve.

[0076] Furthermore, in step S65, the specific process of the expansion process is as follows:

[0077] S651, for any voltage sampling point (t i ,u i )、(t i+1 ,u i+1 )、(t i+2 ,u i+2 ),calculate:

[0078]

[0079]

[0080] t i,i+1 =0.5t i +0.5t i+1 , t i+1,i+2 =0.5t i+1 +0.5t i+2 ;

[0081] S652, sorting all the voltage sampling points in each value window after the expansion process of step S651 according to the size of the time value, and repeating the above steps until the first round of expansion is completed.

[0082] In the process voltage detection method of the battery-powered device provided by the present invention:

[0083] In step S3, the purpose of setting time t2 is to ensure that a sufficient number of sampled data can be stored in the memory, so as to determine whether the switching condition is met according to the number and size of the sampled data; through step S3, before starting the corresponding voltage detection working mode, the working state of the process voltage detection circuit of the battery-powered device is first diagnosed, and if the working state is normal, that is, the switching condition is met, the corresponding voltage detection working mode is started, otherwise the corresponding voltage detection working mode is not started, so as to avoid the situation that after the corresponding voltage detection working mode is started, no voltage detection value is obtained or the obtained voltage detection value is inaccurate;

[0084] In step S4, in the three working modes of RF transmission, valve opening and valve closing, the process voltage detection circuit, ADC module, DMA module and memory of the battery-powered device work together to store the voltage sampling values ​​at both ends of the battery-powered device to be detected during the entire operation of the working mode without the participation of the MCU, thereby effectively ensuring the accuracy of the voltage measurement;

[0085] In step S5, after the voltage detection working mode is finished, it is necessary to set the ADC module and DMA module clocks and disable the DMA module to prepare for the next measurement; and the disable setting process needs to be completed within the time delay of time t3, so as to ensure that the voltage detection data can be collected for a period of time after the voltage detection working mode is turned on; wherein the time t3 can be set according to the usage;

[0086] In step S61, the n sampling data first read from the memory by the MCU module belong to the voltage values ​​collected before the voltage detection working mode is turned on, and the sampling process is still in progress while the MCU module diagnoses the working state of the process voltage detection circuit of the battery-powered device according to the n sampling data; therefore, while deleting the n sampling data to reduce the complexity of data processing, it can still be ensured that the voltage sampling values ​​in the entire process of the voltage detection working mode finally obtained include: the voltage sampling data for a period of time before the voltage detection working mode is actually turned on, the voltage sampling data during the actual working process, and the voltage sampling data for a period of time after the voltage detection working mode is actually turned off;

[0087] In step S65, by performing a round of expansion processing on the voltage sampling points in each window, it is possible to avoid the problem that the actual maximum voltage (maximum voltage, minimum voltage) of the battery-powered device to be detected appears between two voltage sampling values ​​due to discontinuous sampling, resulting in the maximum voltage finally detected being not accurate enough. Since the maximum voltage can only appear near each extreme point, it is only necessary to perform expansion processing on the voltage sampling values ​​near each extreme point to improve the accuracy while reducing the amount of calculation.

[0088] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting process voltage of a battery-powered device, comprising a field effect tube (Q1), a triode (Q2), a first resistor (R1), a second resistor (R2), a third resistor (R3), a fourth resistor (R4), a fifth resistor (R5), a capacitor (C1) and a power supply voltage (VCC), characterized in that: The gate of the field effect tube (Q1) is connected to the collector of the triode (Q2), the drain of the field effect tube (Q1) is connected to the anode output end of the battery power supply device to be tested, the source of the field effect tube (Q1) is connected to a voltage division sampling module composed of a first resistor (R1) and a second resistor (R2) connected in series, and the output end of the voltage division sampling module is connected to an ADC module in a radio frequency system connected to the battery power supply device to be tested and the base of the triode (Q2); The base of the transistor (Q2) is connected to the MCU module in the radio frequency system connected to the battery power supply device to be tested through a fifth resistor (R5); the collector of the transistor (Q2) is connected to the power supply voltage (VCC) through a third resistor (R3); the emitter of the transistor (Q2) is grounded; the radio frequency system comprises a single chip microcomputer, a prompt module and a radio frequency transmission module; the single chip microcomputer comprises an MCU module, an ADC module, a DMA module and a memory; the ADC module is connected to the DMA module; the DMA module is unidirectionally connected to the memory; the DMA module is bidirectionally connected to the MCU module; the memory is unidirectionally connected to the MCU module; and the MCU module is also connected to the prompt module and the radio frequency transmission module; The fourth resistor (R4) is connected between the base and the emitter of the transistor (Q2); The capacitor (C1) is connected in parallel to both ends of the second resistor (R2), and the end of the second resistor (R2) not connected to the first resistor (R1) is connected to the emitter of the transistor (Q2); The specific detection methods are as follows: S1, initialize the DMA module and ADC module in the RF system; S2, the MCU module continuously outputs a high level for t1 and then switches to a high impedance mode. The process voltage detection circuit of the battery-powered device is turned on, the voltage at both ends of the battery-powered device to be detected is sampled, and input to the ADC module. The sampled data is stored in the memory with the participation of DMA; S3, after time t2, the MCU module reads the sampled data in the memory, and determines whether the switching condition of the corresponding voltage detection working mode is met according to the sampled data; S4. According to the judgment result of step S3, if the switching condition is met, the MCU module controls to start the corresponding voltage detection working mode; otherwise, return to step S3 to re-read the newly stored sampling data in the memory to determine whether the switching condition is met. If it is still not met, the MCU module controls the prompt module to prompt that the voltage detection circuit is abnormal and stops the subsequent voltage detection process; S5, after the corresponding voltage detection working mode ends and the time t3 delay has passed, the MCU module outputs a low level, and the process voltage detection circuit of the battery-powered device is turned off; S6, the MCU module reads all the sampled data from the memory, processes the sampled data, and obtains the maximum voltage, minimum voltage and voltage detection diagram corresponding to the voltage detection working mode. The specific process is as follows: S61, deleting the n sampling data first read by the MCU module from the memory from the finally acquired sampling data, and obtaining the voltage sampling value in the whole process of the voltage detection working mode; S62: construct a voltage sampling point (t i ,u i ), where u i represents the i-th voltage sampling value, t i =i / f0, which represents the time value corresponding to the i-th voltage sampling value, and f0 is the sampling frequency of the process voltage detection circuit of the battery-powered device; S63, obtaining all voltage extreme value points among the constructed voltage sampling points, including maximum value points and minimum value points; S64, using the value taking window to take values ​​of the voltage sampling values ​​before and after each voltage extreme value point, when taking values, ensure that the extreme value point is located at the center of the value taking window, so that through the value taking process, each value taking window includes a corresponding extreme value point and multiple voltage sampling points near the extreme value point; S65, perform a round of expansion processing on all voltage sampling values ​​in each value window, the specific process is as follows: S651, for any voltage sampling point (t i ,u i )、(t i+1 ,u i+1 )、(t i+2 ,u i+2 ),calculate: t i,i+1 =0.5t i +0.5t i+1 ,t i+1,i+2 =0.5t i+1 +0.5t i+2 ; S652, sorting all the voltage sampling points in each value window after the expansion process of step S651 according to the size of the time value, and repeating the above steps until the first round of expansion is completed; S66. Perform curve fitting based on all voltage sampling points obtained after expansion, determine the maximum voltage and the minimum voltage from the fitting curve, and thus obtain a voltage detection graph, which includes a voltage detection working mode, a voltage detection curve that is a fitting curve, and a maximum value and a minimum value of the voltage detection curve.

2. The process voltage detection method of a battery-powered device according to claim 1, characterized in that: In the step S1, the initialization content includes: setting the memory storage address to the increment mode, setting the ADC module and DMA module clock and DMA module enable, setting the 16-bit mode, and setting the data transmission number.

3. The process voltage detection method of a battery-powered device according to claim 1, characterized in that: In step S3, the minimum number of sampled data, sampling frequency, and sampling delay time for determining whether the switching condition is met are defined as N, f0, and t0, respectively, and the time t2 is: t2>t0+N / f0.

4. The process voltage detection method of a battery-powered device according to claim 3, characterized in that: In step S3, the specific process of judging whether the switching condition of the corresponding voltage detection working mode is met according to the sampled data is as follows: S31, judging whether the actual number n of the current sampling data is not less than the minimum number N, if it is less than, it means that the sampling is abnormal, the detection circuit does not work, the sampling process is set incorrectly, or the sampling accuracy does not meet the requirements, and it is directly judged that the switching condition is not met; if it is not less than, the last N are selected from the n sampling data as pre-processing sampling samples; S32, according to the judgment result of step S31, calculating the difference between two adjacent samples in the last N pre-processed sampling samples, and comparing the absolute value of each difference with the difference threshold; S33. If the absolute values ​​of all the differences in step S32 are smaller than the difference threshold, it is determined that the switching condition is met; otherwise, it is determined that the switching condition is not met.

5. The process voltage detection method of a battery-powered device according to claim 1, characterized in that: In step S4, the voltage detection working modes are divided into three types: radio frequency transmission, valve opening, and valve closing.