CN113325229A - Extensible multi-path voltage measurement method - Google Patents

Extensible multi-path voltage measurement method Download PDF

Info

Publication number
CN113325229A
CN113325229A CN202110650792.7A CN202110650792A CN113325229A CN 113325229 A CN113325229 A CN 113325229A CN 202110650792 A CN202110650792 A CN 202110650792A CN 113325229 A CN113325229 A CN 113325229A
Authority
CN
China
Prior art keywords
voltage
shift register
path
astable oscillator
voltage measurement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110650792.7A
Other languages
Chinese (zh)
Inventor
于铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202110650792.7A priority Critical patent/CN113325229A/en
Publication of CN113325229A publication Critical patent/CN113325229A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/25Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques
    • G01R19/2506Arrangements for conditioning or analysing measured signals, e.g. for indicating peak values ; Details concerning sampling, digitizing or waveform capturing
    • G01R19/2509Details concerning sampling, digitizing or waveform capturing

Abstract

The invention name is as follows: an extensible multi-path voltage measurement method belongs to the field of electronic circuits. The method can measure the voltage signals, the number of the voltages to be measured is more or less and can be greatly different due to different actual working conditions, and the method can automatically identify the number of the voltages to be measured so as to finish measurement together. The method comprises the steps of taking one path of reference voltage as power supply voltage of an astable oscillator, forming a single-path voltage measuring module by the aid of the astable oscillator, calculating duty ratio of the astable oscillator to obtain a voltage value measured by the single-path voltage measuring module, connecting an output end of the astable oscillator with a parallel input end of a shift register to form multi-path voltage measurement, and cascading the shift register to form the extensible multi-path voltage measurement method. The method is suitable for voltage measurement of systems such as batteries, battery packs and the like.

Description

Extensible multi-path voltage measurement method
Technical Field
The invention relates to a voltage measuring method, in particular to a measuring method of multi-path voltage, which can be expanded.
Background
An analog/digital converter (A/D) is used in a general voltage measurement system, no matter a special A/D conversion chip or an A/D conversion module on a single chip is adopted, the number of circuits of the measured voltage which can be accessed by the system is limited by the number of chip pins, once the system is designed, the number of the measured voltage is determined, and the measured voltage is difficult to change, even if the application scenes are similar, but the number of the voltage circuits to be measured is more, the existing system is often insufficient, and the system needs to be redesigned or the number of the whole system needs to be increased to deal with, so that the time cost, the material cost and the maintenance cost are increased.
Disclosure of Invention
The invention aims to provide a solution, which enables the number of the lines of the voltage to be measured to be flexibly changed according to the actual situation without being limited by the number of pins of a chip, and the system can automatically identify the number of the lines of the voltage to be measured, thereby being an extensible multi-path voltage measuring method.
The invention is realized by the following technical scheme:
a scalable multi-path voltage measurement method, comprising: reference voltage source, M astable oscillators, N shift registers, N selector switches and singlechip (MCU). Each astable oscillator in the M astable oscillators comprises a first resistor, a second resistor, a third resistor, a capacitor C and a clock chip TLC555, and a voltage Vin to be measured is accessed through the first resistor to jointly form a voltage measuring module; 8 parallel input ends of each shift register in the N shift registers are connected with output ends of 8 astable oscillators; the serial input end of the first shift register is connected with the port of the single chip microcomputer GPIO0, and the serial input end of the non-first shift register is connected with the selector switch; the output end of each shift register is connected with a selection switch; the clock control ends of all the shift registers are connected and are connected with the port of the single chip microcomputer GPIO 1; the shift/load control ends of all the shift registers are connected and are connected with the port of the single chip microcomputer GPIO 2; the 3 rd end of each selector switch is connected with the port of the single chip microcomputer GPIO 3; the clock enable control ends of all the shift registers are connected and are connected with a power ground; constitute the system that can measure M way voltage. The reference voltage is used as the supply voltage of the astable oscillator and is connected to the ADC port of the MCU. The shift register chip is 74HC165, and the reference voltage is generated by a precision voltage source chip TL 431. Wherein M, N are positive integers and M =8 × N.
Drawings
FIG. 1 is a schematic diagram of the overall structure of the scalable multi-path voltage measurement method
FIG. 2 is a one-way voltage measurement module formed by an astable oscillator
FIG. 3 reference voltage circuit
FIG. 4 duty cycle formula
FIG. 5 theoretical duty cycle formula
FIG. 6 theoretical duty cycle and voltage to be measured analysis
FIG. 7 parameter notation
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The description of all the parameter symbols is shown in fig. 7.
A scalable multipath voltage measurement method is characterized in that a voltage Vin to be measured is connected into a circuit through a first resistor R1, an astable oscillator is formed by the first resistor R1, a second resistor R2, a third resistor R3, a capacitor C and a clock chip TLC555 to form a single-path voltage measurement module, a first end of the first resistor is connected with an anode of the voltage Vin to be measured, a first end of the second resistor, a first end of the capacitor, a (2) th pin of the TLC555 and a (6) th pin of the TLC555 are connected, a second end of the first resistor, a second end of the second resistor and a (7) th pin of the TLC555 are connected, a second end of the third resistor, a (4) th pin of the TLC555, a (8) th pin of the TLC555 and a reference voltage V2 are connected, a second end of the capacitor, a (1) th pin of the TLC555, a cathode of the voltage to be measured and a power supply ground are connected, and the first end of the third resistor is connected with the (3) th pin of the TLC555 to form the output end of the temperature measuring module. As shown in fig. 2.
The parallel input ends of each shift register, namely a pin (6), a pin (5), a pin (4), a pin (3), a pin (14), a pin (13), a pin (12) and a pin (11), are respectively connected with the output end of the 1 temperature measurement module; the (10) th pin of the 1 st shift register is connected with a GPIO0 port of the singlechip and is used as a serial input end of the shift register; the serial input ends of the non-1 st shift register, namely the (10) th pins of the non-1 st shift register are respectively connected with the second end of one selection switch; the serial output ends of all the shift registers, namely the (9) th pins of the shift registers are respectively connected with the first end of a selection switch; the first end of the non-Nth selection switch is connected with the second end of the non-Nth selection switch to form a cascade structure between the shift registers; the first end of the Nth selection switch is connected with the third end of the Nth selection switch, and then is connected with the GPIO3 port of the single chip microcomputer to be used as the output end of the shift register, and all temperature measurement signals are transmitted to the single chip microcomputer; the (1) th pins of each shift register are connected with each other and with a GPIO2 port of the singlechip to be used as a shift/load control end of the shift register; the (2) th pins of each shift register are connected with each other and with a GPIO1 port of the singlechip to be used as a clock control end of the shift register; the (15) th pins of each shift register are connected with each other and with a power supply ground; the reference voltage V2 is connected with the port of the singlechip ADC 0. As in fig. 1.
The positive electrode of a first voltage source V1 is connected with the first end of a first power supply resistor Rp 1; the second end of the first power resistor Rp1, the second end of the second power resistor Rp2, the (3) th pin of the precision voltage-stabilizing chip TL431 and the anode of the second voltage source V2 are connected; the first end of the second power resistor Rp2 and the first end of the third power resistor Rp3 are connected with the (1) th pin of the precision voltage-stabilizing source chip TL 431; the second terminal of the third power resistor Rp3, the (2) th pin of the precision voltage regulator chip TL431, the negative electrode of the first voltage source, the negative electrode of the second voltage source, and the power ground are connected to make the voltage of the second voltage source become the reference voltage. As shown in fig. 3.
The duty cycle λ of the astable oscillator is as in fig. 4, where η = Vin/V2, referred to as: the voltage ratio, and must satisfy: eta > 2/3. The duty ratio lambda is a function with eta as a unique variable, and in a practical application range, the duty ratio lambda is a monotonous decreasing function related to eta, namely, any duty ratio value has a unique eta value corresponding to the value. The corresponding eta value can be known by obtaining the lambda value of the duty ratio, the V2 value can be known by the ADC0 of the MCU, and the Vin value can be obtained by eta V2. Thus, the duty ratio lambda and the voltage Vin to be measured establish a one-to-one correspondence relationship. The duty ratio lambda is a positive number smaller than 1, and when the singlechip processes a decimal value, the singlechip has inconvenience, so the original duty ratio is multiplied by a proportionality coefficient, the form is as follows: α = K λ, as shown in fig. 5, where K is a positive integer, and α is: the theoretical duty ratio can also obtain the corresponding voltage value to be measured only by analyzing the integer part of alpha. And storing the corresponding relation between the theoretical duty ratio value and the voltage value to be measured into the MCU in an array form, and comparing the duty ratio value obtained by actual field measurement with the theoretical duty ratio in the array stored in the MCU to obtain the corresponding voltage value.
And automatically judging the number of the paths of the voltage to be detected.
In the system, the last (Nth) selection switch is arranged at the positions 1 and 3, the serial output end of the Nth shift register is connected with the port of the MCU GPIO3, and the non-Nth selection switches are arranged at the positions 1 and 2, so that the shift registers are cascaded with one another; after the system starts to work in power transmission, the processing steps are as follows: setting the MCU GPIO2 to be high level, setting the shift/load control ends of all the shift registers to be high level, prohibiting the shift registers from inputting data from the parallel input end, and only inputting data from the serial input end; setting the MCU GPIO0 to a high level, setting the serial input terminal of the first shift register to a high level, and then sending a plurality of pulse signals, for example, 65535 pulses or more pulses, to the clock control terminal of the shift register by the MCU GPIO1, so that the serial output terminal of the shift register is all high level, that is, the MCU GPIO3 is always high level; then, the MCU GPIO0 is pulled down to a low level for only 1 pulse, and then set to a high level again, that is, the MCU sends a low level with only 1 pulse width to the serial input terminal of the first shift register, and then both are high levels, the MCU GPIO1 sends a pulse signal to the clock control terminal of the shift register and counts, when the MCU GPIO3 receives 1 low level signal, the number of pulses sent by the GPIO1 is counted, and the number of parallel input terminals of the shift register is obtained, i.e., the number of corresponding voltage measurement modules is known. Assume that there are M voltage measurement modules, with M =8 × N, where N is the number of shift registers. Wherein M and N are positive integers. For different application scenes, the shift registers with different N values and the voltage measuring modules with corresponding numbers can be selected, the system can be automatically adapted to the different application scenes, and the software structure and the hardware of the core part do not need to be changed.
Duty ratio of voltage measuring module and voltage value thereof
The duty ratio is a relative value, multiple sampling analysis is needed to ensure that the duty ratio value is close to a true value, the output value of Q voltage measurement modules is assumed to be sampled and read in total, the output value of each voltage measurement module forms an array TMP [ M ], the array has M elements in total, each element corresponds to one voltage measurement module respectively, the sum of the output values of the voltage measurement modules is accumulated by sampling Q times, the value of any element in the array TMP [ M ] is smaller than Q, namely TMP [ i ] < Q, wherein i is a positive integer and is not less than 0 and not more than i < M. The specific operation of acquiring the duty ratio is as follows: the MCU GPIO2 is pulled down for one pulse, then the MCU GPIO2 is set to be high, the output values of all the voltage measurement modules are loaded to the parallel input end of the shift register, then the MCU GPIO1 sends M pulses, the output value (0 or 1) of each voltage measurement module is read into the MCU through the GPIO3 and accumulated into a array TMP [ M ], the reading of the data of the temperature measurement module is completed once, and the reading is repeated for Q times. The duty ratio α (i) = K × TMP [ i ]/Q of the ith temperature measurement module, and the voltage value of the corresponding voltage measurement module can be obtained by looking up the table.
Due to the monotonic decreasing duty cycle, in the actual operating range the following inequality holds: α (η 1) > α (i) ≧ α (η 2), in which: α (i) is a duty ratio of the ith voltage measurement module calculated by the MCU, η 2 = η 1 +. DELTA.s, α (η 1) is a theoretical duty ratio when the voltage ratio is η 1, α (η 2) is a theoretical duty ratio when the voltage ratio is η 2, DELTA.s: if the voltage ratio increases, the value of the ith path voltage is considered as the voltage value corresponding to the voltage ratio η 2.
As shown in fig. 6, the scaling factor K is set to 15000, if any: 11717 > alpha (i) > 11706, the voltage value of the ith path is 2.653V, and so on.
The sampling frequency Q has a value range: 5000 < Q < 20000, and with such a large number of samples, the duty cycle value obtained by the analysis is reliable, and the corresponding voltage value is also reliable.
It can be seen that no matter how many voltage measurement modules are, the whole measurement circuit only occupies 4 GPIO ports and 1 ADC port of the MCU, and can also automatically identify the number of the measured voltages without changing the software and hardware structure of the system, and samples each voltage measurement module thousands of times or even thousands of times by utilizing the high-speed operation characteristic of the single chip microcomputer, so that the reliability and the real-time performance of the obtained data are considered; the numerical relationship of duty ratio-voltage is stored in the MCU memory, which is irrelevant to the performance of the MCU, and the MCU can complete the work no matter whether the MCU is an 8-bit, 16-bit or 32-bit singlechip. Because the requirement for the voltage to be measured is more than a certain minimum value, the method is particularly suitable for voltage measurement of systems such as batteries, battery packs and the like.

Claims (2)

1. A method of measuring voltage, comprising: determining a path of reference voltage, taking the reference voltage as a power supply voltage of an astable oscillator, forming a single-path voltage measuring module by the astable oscillator, respectively connecting 8 parallel input ends of 1 shift register to form multi (8) paths of voltage measurement, connecting a serial output end of a previous shift register with a serial input end of a next shift register in a cascade mode through a selection switch or connecting the serial output end of the previous shift register with a GPIO port of a single chip microcomputer, and when the serial output end of an Nth shift register is connected with the GPIO port of the single chip microcomputer through the selection switch, enabling the number of actually measured voltage paths to reach 8 x N, so that the extensible multi-path voltage measuring method is formed, wherein N is a positive integer.
2. A method for multiple voltage measurements according to claim 1 wherein the astable oscillator is connected to the shift register, i.e. the output of the astable oscillator is connected to the parallel input of the shift register.
CN202110650792.7A 2021-06-11 2021-06-11 Extensible multi-path voltage measurement method Pending CN113325229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110650792.7A CN113325229A (en) 2021-06-11 2021-06-11 Extensible multi-path voltage measurement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110650792.7A CN113325229A (en) 2021-06-11 2021-06-11 Extensible multi-path voltage measurement method

Publications (1)

Publication Number Publication Date
CN113325229A true CN113325229A (en) 2021-08-31

Family

ID=77420729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110650792.7A Pending CN113325229A (en) 2021-06-11 2021-06-11 Extensible multi-path voltage measurement method

Country Status (1)

Country Link
CN (1) CN113325229A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000198231A (en) * 1998-06-09 2000-07-18 Seiko Instruments Inc Thermal head driving integrated circuit
CN201133916Y (en) * 2007-01-30 2008-10-15 王悦 Multimeter provided with alarming function data collection card
CN102841246A (en) * 2012-08-31 2012-12-26 长城汽车股份有限公司 High-precision voltage measuring circuit
CN110071633A (en) * 2019-04-12 2019-07-30 华中科技大学 A kind of multichannel voltage output circuit and method based on digital linear voltage-stablizer
CN111602125A (en) * 2018-01-08 2020-08-28 Wago管理有限责任公司 Voltage diagnosis circuit
CN211453895U (en) * 2019-11-29 2020-09-08 北京益弘泰科技发展有限责任公司 Power supply voltage monitoring device and system
CN111983270A (en) * 2020-07-30 2020-11-24 华润赛美科微电子(深圳)有限公司 Expansion circuit, tester and test method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000198231A (en) * 1998-06-09 2000-07-18 Seiko Instruments Inc Thermal head driving integrated circuit
CN201133916Y (en) * 2007-01-30 2008-10-15 王悦 Multimeter provided with alarming function data collection card
CN102841246A (en) * 2012-08-31 2012-12-26 长城汽车股份有限公司 High-precision voltage measuring circuit
CN111602125A (en) * 2018-01-08 2020-08-28 Wago管理有限责任公司 Voltage diagnosis circuit
CN110071633A (en) * 2019-04-12 2019-07-30 华中科技大学 A kind of multichannel voltage output circuit and method based on digital linear voltage-stablizer
CN211453895U (en) * 2019-11-29 2020-09-08 北京益弘泰科技发展有限责任公司 Power supply voltage monitoring device and system
CN111983270A (en) * 2020-07-30 2020-11-24 华润赛美科微电子(深圳)有限公司 Expansion circuit, tester and test method

Similar Documents

Publication Publication Date Title
CA1320583C (en) Error limiting analog to digital converter
US7053810B2 (en) Successive approximation analog/digital converter with reduced chip area
CN110995265B (en) Automatic calibration method and system for offset error of analog-to-digital converter
CN110764396B (en) Time-to-digital converter and time measuring method
CN113253597A (en) Time-to-digital conversion device and optical distance measuring sensor
CN113325229A (en) Extensible multi-path voltage measurement method
KR100525534B1 (en) Logarithmic a/d converter, method of logarithmic a/d conversion, logarithmic d/a converter, method of logarithmic d/a conversion, and system for measuring physical quantity
CN100459434C (en) Digital-to-analog converter with integrated test circuit
CN113324670A (en) Extensible multipoint temperature measurement method
US8280655B2 (en) Digital power monitoring circuit and system
EP0607711A1 (en) Electricity meter with variable gain sigma-delta converter
CN215769392U (en) Time-to-digital conversion device and optical ranging sensor
US7961837B2 (en) Counter circuit and method of operating the same
CN115459754A (en) Current-mode and voltage-mode analog quantity signal acquisition switching circuit and control method
US7034724B2 (en) Training circuit and method of digital-analog converter and analog-digital converter
CN111525927A (en) System and method capable of enhancing ADC multichannel sampling precision
CN210807222U (en) Signal processing device with small edge slope and signal counting equipment
CN116886092B (en) Configurable counter, ramp generator, analog-to-digital converter and image sensor
CN114112077B (en) SAR logic circuit applied to temperature sensor
CN113328748B (en) Analog-to-digital conversion circuit
CN111965431B (en) Semiconductor device with a plurality of semiconductor chips
CN115981128A (en) Time measuring device and time measuring method
CN114499526A (en) Analog-to-digital conversion circuit
CN116436464A (en) ADC circuit and conversion method thereof
RU2205500C1 (en) Analog-to-digital converter

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210831