Platinum resistor temperature coefficient measuring instrument based on STM32 single-chip microcomputer master control
Through the platinum resistance temperature coefficient measuring instrument based on STM32 microcontroller, data is collected and processed in real time, which solves the problems of low efficiency and low accuracy of traditional methods, achieves efficient and intuitive measurement results and data analysis, and meets the needs of scientific research and teaching experiments. need.
Patent Information
- Application Number
- CN202410482576.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-08-30
AI Technical Summary
The traditional platinum resistance temperature coefficient measurement method is inefficient and has low measurement accuracy. It requires multiple manual measurements and calculations, and it is difficult to observe the data change trend in real time.
Design a platinum resistance temperature coefficient measuring instrument based on STM32 microcontroller main control, including a Wheatstone bridge measurement system, data acquisition module and data processing module. The STM32 microcontroller is used to collect and process voltage and temperature data in real time, and the data changes are displayed on the touch screen. , and perform curve fitting calculations to improve measurement accuracy and efficiency.
It realizes real-time collection and visual display of voltage and temperature data, improves measurement accuracy and efficiency, and can better meet the needs of scientific research testing and teaching experiments.
Smart Images

Figure CN118565646A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of industrial production and scientific research, and in particular to a platinum resistance temperature coefficient measuring instrument based on an STM32 single-chip microcomputer main control. Background Art
[0002] Measuring the temperature coefficient of platinum resistance with a Wheatstone bridge is a relatively common thermal experiment in university physics experiments. In the traditional experimental process, manual reading is required, temperature and voltage data are manually recorded, and third-party tools are used on another platform for drawing and calculation. This method is cumbersome and inefficient, and the amount of data collected is small. Only the data itself can be seen, and the trend of data changes cannot be observed synchronously, and it is even more difficult to capture the details of the rapid change of physical quantities. With the widespread application of computers and the rapid development of information technology, the digitization and informatization of experimental teaching and the sharing and utilization of related resources have become hot topics in the current development of experimental teaching in my country. At present, the experimental development based on STM32 microcontroller is widely used as an experimental teaching auxiliary system in colleges and universities, especially in disciplines such as engineering and physics.
[0003] The existing experimental instruments have the following shortcomings: (1) the measurement accuracy of the voltmeter and ammeter is not high enough; (2) when measuring the temperature coefficient of platinum resistors at different temperatures, it is necessary to measure the platinum resistor coefficients corresponding to different temperatures for many times and obtain the temperature coefficients by manual calculation, which is a heavy workload and prone to errors. The measurement results are not intuitive enough and the experimental efficiency is low; (3) the experimental circuit needs to be changed many times during measurement. In view of this, we propose a platinum resistor temperature coefficient measuring instrument based on the STM32 microcontroller. Summary of the invention
[0004] The object of the present invention is to provide a platinum resistance temperature coefficient measuring instrument based on STM32 single-chip microcomputer control to solve the problems raised in the above background technology and improve experimental efficiency.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A platinum resistance temperature coefficient measuring instrument based on an STM32 single-chip microcomputer main control, comprising a Wheatstone bridge measurement system, a data acquisition module, and a data processing module, wherein the Wheatstone bridge measurement system comprises a DC voltage stabilization module, a constant current source module, a Wheatstone bridge module, a platinum resistance module, and an electric furnace module, wherein the data acquisition module comprises a pressure measurement module and a temperature sensor module, and the data processing module comprises an STM32 single-chip microcomputer main control module;
[0007] The DC voltage stabilization module is electrically connected to the constant current source module, and the DC voltage stabilization module provides a stable voltage for the constant current source module;
[0008] The constant current source module is electrically connected to the Wheatstone bridge module, and the constant current source module provides a stable current for the Wheatstone bridge module;
[0009] The Wheatstone bridge module is used to respond to the constant current source output load current and adjust the resistance value;
[0010] The platinum resistance module is arranged inside the electric furnace module, and the platinum resistance module is electrically connected to the Wheatstone bridge module;
[0011] The pressure measuring module is electrically connected to the Wheatstone bridge module and the STM32 single-chip microcomputer main control module respectively, and the pressure measuring module is used to measure the output voltage of the Wheatstone bridge module, and send the collected voltage to the STM32 single-chip microcomputer main control module through serial port communication;
[0012] The temperature sensor module is electrically connected to the STM32 single-chip microcomputer main control module, and the temperature sensor module is used to measure the real-time temperature in the electric furnace, and the collected temperature is sent to the STM32 single-chip microcomputer main control module through serial port communication;
[0013] The electric furnace module is used to provide a heat source for the platinum resistance module;
[0014] The STM32 single-chip microcomputer main control module is used to collect data from the pressure measurement module and the temperature sensor module through serial communication, and calculate the temperature coefficient of the platinum resistor.
[0015] Preferably, the STM32 single-chip microcomputer main control module also includes a touch screen module, which is arranged above the STM32 single-chip microcomputer main control module, and the touch screen module is electrically connected to the STM32 single-chip microcomputer main control module. The touch screen module is used to display the output voltage, temperature data, and the output voltage with respect to the temperature curve, the temperature with respect to the time curve, and the voltage with respect to the time curve in real time.
[0016] Preferably, the heating furnace module has a temperature rise range of 20°C-100°C, and the pressure measuring module and the temperature sensor module are set to collect data once per second.
[0017] Preferably, the STM32 single-chip microcomputer main control module uses the least squares method to fit the voltage and temperature data collected by the serial communication, and executes the TFT-LCD dotting function to draw the voltage and temperature curves.
[0018] Preferably, the slope of the fitted voltage and temperature curve is K, which is calculated by the formula get
[0019] Among them, U is voltage, I is current, T is temperature, R0 is the resistance value of the platinum resistor at 0°C, and A is the temperature coefficient of the platinum resistor.
[0020] Preferably, the DC voltage stabilization module provides a stable voltage of 22V to the constant current source module, and the constant current source module provides a stable current of 3mA to the Wheatstone bridge module.
[0021] Preferably, the platinum resistance module adopts a PT100 platinum resistance, the pressure measurement module adopts an INA226 pressure measurement module, the temperature sensor module adopts a DS18B20 module, and the touch screen module adopts a TFT-LCD touch screen module.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] 1. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer includes a wheatstone bridge measurement system, a data acquisition module, and a data processing module. The wheatstone bridge measurement system includes a DC voltage stabilization module, a constant current source module, a wheatstone bridge module, a platinum resistance module, and an electric furnace module. The data acquisition module includes a pressure measurement module and a temperature sensor module. The data processing module includes an STM32 single-chip microcomputer main control module, and the STM32 single-chip microcomputer main control module also includes a touch screen module. The measuring instrument can collect in real time and intuitively display the change process of the output voltage and temperature data on the touch screen, and the experimental curves of different parameters are switched and displayed in the same coordinate interface, and data processing functions such as curve fitting calculations are realized. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer main control is easy to operate and has high measurement accuracy, and can better meet the requirements of scientific research testing and teaching experiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 The schematic diagram of the platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer master control in the present invention;
[0025] Figure 2 Schematic diagram of the structure of different modules in the present invention: (a) is a Wheatstone bridge module; (b) is a TFT-LCD touch screen module; (c) is an INA226 pressure measurement module; (d) is a constant current source module; (e) is a DC voltage regulator module; (f) is an STM32 single-chip microcomputer main control module; (g) is an electric furnace module;
[0026] Figure 3 It is the circuit diagram of the constant current source module in the present invention;
[0027] Figure 4 It is the circuit diagram of INA226 pressure measurement module in the present invention;
[0028] Figure 5 Draw a flow chart for the voltage and temperature curves in the present invention;
[0029] Figure 6The voltage-temperature curve fitting results of the STM32 single-chip microcomputer main control module (a) and MATLAB software (b) in the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below. 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.
[0031] See also Figure 1-Figure 6 As shown, a technical solution provided by the present invention is:
[0032] A platinum resistance temperature coefficient measuring instrument based on an STM32 single-chip microcomputer main control, comprising a Wheatstone bridge measurement system, a data acquisition module, and a data processing module, wherein the Wheatstone bridge measurement system comprises a DC voltage stabilization module, a constant current source module, a Wheatstone bridge module, a platinum resistance module, and an electric furnace module, wherein the data acquisition module comprises a pressure measurement module and a temperature sensor module, and the data processing module comprises an STM32 single-chip microcomputer main control module;
[0033] The DC voltage stabilization module is electrically connected to the constant current source module, and the DC voltage stabilization module provides a stable voltage for the constant current source module;
[0034] The constant current source module is electrically connected to the Wheatstone bridge module, and the constant current source module provides a stable current for the Wheatstone bridge module;
[0035] The Wheatstone bridge module is used to respond to the constant current source output load current and adjust the resistance value;
[0036] The platinum resistance module is arranged inside the electric furnace module, and the platinum resistance module is electrically connected to the Wheatstone bridge module;
[0037] The pressure measuring module is electrically connected to the Wheatstone bridge module and the STM32 single-chip microcomputer main control module respectively, and the pressure measuring module is used to measure the output voltage of the Wheatstone bridge module, and send the collected voltage to the STM32 single-chip microcomputer main control module through serial port communication;
[0038] The temperature sensor module is electrically connected to the STM32 single-chip microcomputer main control module, and the temperature sensor module is used to measure the real-time temperature in the electric furnace, and the collected temperature is sent to the STM32 single-chip microcomputer main control module through serial port communication;
[0039] The electric furnace module is used to provide a heat source for the platinum resistance module;
[0040] The STM32 single-chip microcomputer main control module is used to collect data from the pressure measurement module and the temperature sensor module through serial communication, and calculate the temperature coefficient of the platinum resistor.
[0041] In this embodiment, the STM32 single-chip microcomputer main control module also includes a touch screen module, which is arranged above the STM32 single-chip microcomputer main control module, and the touch screen module is electrically connected to the STM32 single-chip microcomputer main control module. The touch screen module is used to display the output voltage, temperature data, and the output voltage with respect to the temperature curve, the temperature with respect to the time curve, and the voltage with respect to the time curve in real time.
[0042] Figure 1 Schematic diagram of the platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer in this embodiment. In this embodiment, the platinum resistance module adopts PT100 platinum resistance, the pressure measurement module adopts INA226 pressure measurement module, the temperature sensor module adopts DS18B20 module, and the touch screen module adopts TFT-LCD touch screen module. Figure 2 Schematic diagram of the structure of different modules of this embodiment.
[0043] In this embodiment, a DC voltage regulator module is used to provide a stable 22V voltage to the constant current source module, and the constant current source module provides a stable 3mA current to the Wheatstone bridge module. Figure 3 As shown, the constant current source module inputs 6V voltage Ui at the positive input end of LM58, connects a 2kΩ resistor Rx between the inverting input end and the ground, and connects a load R between the other side of Rx and the output end of LM358 L Since the voltage at the forward input terminal of LM358 is the same as the voltage at the reverse input terminal and the input bias current is 45nA, which is approximately equal to 0, Rx is subjected to a voltage of 6V. According to Ohm's law, I = 3mA, and the current I flowing through the load L =I. If Ui and Rx remain unchanged, I will remain unchanged, and I L unchanged, achieving current I L Constant. Figure 1 As shown, the Wheatstone bridge module consists of R1, R2, R T And PT100 platinum resistor R P After the circuit is connected, adjust R1 and R2 in the Wheatstone bridge to respond to whether the constant current source output load can stabilize the 3mA current. P To make its resistance value equal to the resistance value R0 of the PT100 platinum resistor at 0 degrees Celsius, and then use the INA226 pressure measurement module to measure the voltage between the BD output terminals, and perform average value filtering to obtain a stable voltage.
[0044] like Figure 4As shown, the INA226 pressure measurement module has an accuracy of 0.01mv, and it is averaged and filtered to obtain a stable output voltage. In order to achieve power bypassing, a 0.1uF ceramic capacitor is placed as close to the power and ground pins as possible. The INA226 pressure measurement module performs two measurements on the power bus used. A shunt voltage is generated from the voltage gradually formed on the load current flowing through a shunt resistor, which is measured on the VIN+ and VIN- pins. By connecting this voltage to the VBUS pin, this device can also measure the power bus voltage. The differential shunt voltage is measured with the VIN- pin as the reference point, while the reference point for the bus voltage measurement is ground. The least significant bit LSB step amplitude of the shunt voltage is 2.5uV, the gain error is 0.02%, and the maximum storage of the register FSR is 0X7FFF; the LSB step amplitude of the bus voltage is 1.25mv, the gain error is 0.02%, and the maximum storage of the FSR is 0X7FFF. The calculated shunt voltage range is 81.9175mV, and the bus voltage range is 40.95875V; the output voltage of the unbalanced bridge in this experiment is 15mV-60mV, and the accuracy requirement is high, so it is chosen to measure the shunt voltage and measure it on the VIN+ and VIN- pins.
[0045] In this embodiment, since the heating furnace heats up slowly, the sampling rate is set to 1Hz; the DS18B20 module and the INA226 pressure measurement module can measure the heating furnace temperature and the output voltage of the Wheatstone bridge in real time. The experiment is set to collect data once every 1 second. The heating furnace is heated from 20°C to 100°C, and a total of 1500 sets of data are collected. The TFT-LCD touch screen module displays the temperature and voltage data in real time, which is convenient for the measurer to view and preliminarily analyze intuitively. The STM32 single-chip microcomputer main control module can read the temperature and voltage data in the data buffer in real time, and use the least squares method to fit the voltage and temperature data collected by the serial communication. The TFT-LCD dotting function is executed to draw the voltage and temperature curves. The curve drawing process is as follows: Figure 5 As shown, the temperature coefficient of the PT100 platinum resistor can be calculated based on the slope of the fitted voltage-temperature curve. The specific calculation process is as follows:
[0046] The relationship between the resistance RT and temperature T of the platinum resistor is approximately the following linear relationship:
[0047] R T =R0×(1+AT) (1)
[0048] When the output voltage E of the power supply is constant, the output voltage U of the unbalanced bridge circuit is:
[0049]
[0050] make
[0051]
[0052] Then U=I1R T -I2R P (5)
[0053] Let R1=R2,I1=I2 (6)
[0054] but
[0055] Substituting the above formula (7) into formula (1), we have
[0056]
[0057] The slope of the fitted voltage and temperature curve is K. According to formula (8), we can get
[0058] Among them, R T is the resistance value of the platinum resistor, U is the voltage, I is the current, T is the temperature, R0 is the resistance value of the platinum resistor at 0℃, I1 and I2 are the branch currents, and A is the temperature coefficient of the platinum resistor.
[0059] like Figure 6 As shown in the figure, when the heating furnace changes from 20℃ to 100℃, the output voltage of the Wheatstone bridge changes between 15mV and 60mV. From the voltage and temperature change curve, it can be clearly observed that the changes of the two are linear, which is approximately a straight line. The least squares method is used in the single-chip computer program to fit the curve to obtain the slope K = 0.567. According to the above formula (9), the platinum resistance temperature coefficient is calculated to be A = 3.78×10 -3 ℃ -1 , the analysis error Er = 1.9% is within the allowable range, and the result is consistent with the theory. The theoretical voltage-temperature expression is found to be U = 0.578T, the slope K is 0.578, and the temperature coefficient A = 3.85 × 10 -3 ℃ -1 , and the measured data in this embodiment are fitted by the STM32 single-chip microcomputer main control module and MATLAB software, and the results are U=0.567T. The relative error calculation between the actual temperature coefficient and the theoretical temperature coefficient can obtain a relative error of 1.9%. Since the relative error of the traditional experiment is about 4.2%, this experimental measurement is effective. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer main control is easy to operate and has high measurement accuracy, which can better meet the requirements of scientific research testing and teaching experiments.
[0060] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A platinum resistance temperature coefficient measuring instrument based on STM32 single-chip microcomputer, characterized in that: It includes a Wheatstone bridge measurement system, a data acquisition module, and a data processing module. The Wheatstone bridge measurement system includes a DC voltage stabilization module, a constant current source module, a Wheatstone bridge module, a platinum resistance module, and an electric furnace module. The data acquisition module includes a pressure measurement module and a temperature sensor module. The data processing module includes an STM32 single-chip microcomputer main control module. The DC voltage stabilization module is electrically connected to the constant current source module, and the DC voltage stabilization module provides a stable voltage for the constant current source module; The constant current source module is electrically connected to the Wheatstone bridge module, and the constant current source module provides a stable current for the Wheatstone bridge module; The Wheatstone bridge module is used to respond to the constant current source output load current and adjust the resistance value; The platinum resistance module is arranged inside the electric furnace module, and the platinum resistance module is electrically connected to the Wheatstone bridge module; The pressure measuring module is electrically connected to the Wheatstone bridge module and the STM32 single-chip microcomputer main control module respectively, and the pressure measuring module is used to measure the output voltage of the Wheatstone bridge module, and send the collected voltage to the STM32 single-chip microcomputer main control module through serial port communication; The temperature sensor module is electrically connected to the STM32 single-chip microcomputer main control module, and the temperature sensor module is used to measure the real-time temperature in the electric furnace, and the collected temperature is sent to the STM32 single-chip microcomputer main control module through serial port communication; The electric furnace module is used to provide a heat source for the platinum resistance module; The STM32 single-chip microcomputer main control module is used to collect data from the pressure measurement module and the temperature sensor module through serial communication, and calculate the temperature coefficient of the platinum resistor.
2. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer master control according to claim 1, characterized in that, The STM32 single-chip microcomputer main control module also includes a touch screen module, which is arranged above the STM32 single-chip microcomputer main control module. The touch screen module is electrically connected to the STM32 single-chip microcomputer main control module, and the touch screen module is used to display the output voltage, temperature data, and the output voltage with respect to the temperature curve, the temperature with respect to the time curve, and the voltage with respect to the time curve in real time.
3. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer master control according to claim 2, characterized in that, The heating furnace module has a temperature rise range of 20°C-100°C, and the pressure measurement module and the temperature sensor module are set to collect data once per second.
4. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer master control according to claim 1, characterized in that, The STM32 single-chip microcomputer main control module uses the least squares method to fit the voltage and temperature data collected by the serial communication, and executes the TFT-LCD dotting function to draw the voltage and temperature curves.
5. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer master control according to claim 4, characterized in that, The slope of the fitted voltage and temperature curve is K, and the formula get Among them, U is voltage, I is current, T is temperature, R0 is the resistance value of the platinum resistor at 0°C, and A is the temperature coefficient of the platinum resistor.
6. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer master control according to claim 1, characterized in that, The DC voltage stabilization module provides a stable voltage of 22V to the constant current source module, and the constant current source module provides a stable current of 3mA to the Wheatstone bridge module.
7. The platinum resistance temperature coefficient measuring instrument based on the STM32 single-chip microcomputer master control according to claim 1, characterized in that: The platinum resistance module adopts a PT100 platinum resistance, the pressure measurement module adopts an INA226 pressure measurement module, the temperature sensor module adopts a DS18B20 module, and the touch screen module adopts a TFT-LCD touch screen module.
