1 System Working Principle
Due to the working environment restrictions of solar water heaters, the lower computer (PIC16F877) is placed at the heat collection site, mainly to realize the temperature acquisition function and the temperature difference circulation control function, that is, to control the start and stop of the circulation pump, water supply valve, auxiliary electric heater, and heating belt, and to communicate with the upper computer (PIC16F877) via 485, and send the collected temperature and water level information to the upper computer for display. The
overall block diagram of the system is shown in Figure 1.
2 Hardware circuit design
The main function of the temperature acquisition processing circuit is to convert the temperature signal collected by the platinum resistance sensor into a voltage signal through a bridge signal detection circuit, and then perform two-stage amplification and nonlinear A/D conversion through the weak signal instrument amplifier MCP602, and convert it into a recognizable digital quantity, which is temporarily stored in the memory of the single-chip computer.
2.1 Temperature acquisition circuit design
The temperature acquisition circuit connects RA2, RA3, and RA4 of the single-chip computer to the address bits A, B, and C ports of the multi-channel selection chip CD4051. The single-chip computer sets which channel of temperature information to collect, and sets RA0 as the analog channel.
2.2 Calculation of amplification factor
The amplifier circuit of this design uses MCP602 as the amplifier, and the amplifier circuit diagram composed of it is shown in Figure 2. Among them: VREF=0 V, R1=300 kΩ, R2=10 kΩ, this is a simple two-stage amplifier circuit, and its amplification factor can be changed by adjusting the variable resistor RG, which is convenient for future debugging. The output voltage VOUT after two-stage amplification:
The signal collected by the bridge circuit is relatively weak and needs to be properly amplified to be converted into a 0 V to 5 V signal that can be recognized by the microcontroller. To this end, the value of the variable resistor RG should be reasonably set to select the appropriate magnification. The selection process is as follows:
When RG = 20 kΩ, the magnification is about 61 times. At temperature T = 99 ° C, the resistance value of PT1000 is R = 1381.26Ω, and VOUT = 2.806 V is obtained. Although VOUT is within the limit of 0 ~ 5 V, the sensitivity is small, so RG is adjusted to 10 kΩ. [page]
1 System Working Principle
Due to the working environment restrictions of solar water heaters, the lower computer (PIC16F877) is placed at the heat collection site, mainly to realize the temperature acquisition function and the temperature difference circulation control function, that is, to control the start and stop of the circulation pump, water supply valve, auxiliary electric heater, and heating belt, and to communicate with the upper computer (PIC16F877) via 485, and send the collected temperature and water level information to the upper computer for display. The
overall block diagram of the system is shown in Figure 1.
2 Hardware circuit design
The main function of the temperature acquisition processing circuit is to convert the temperature signal collected by the platinum resistance sensor into a voltage signal through a bridge signal detection circuit, and then perform two-stage amplification and nonlinear A/D conversion through the weak signal instrument amplifier MCP602, and convert it into a recognizable digital quantity, which is temporarily stored in the memory of the single-chip computer.
2.1 Temperature acquisition circuit design
The temperature acquisition circuit connects RA2, RA3, and RA4 of the single-chip computer to the address bits A, B, and C ports of the multi-channel selection chip CD4051. The single-chip computer sets which channel of temperature information to collect, and sets RA0 as the analog channel.
2.2 Calculation of amplification factor
The amplifier circuit of this design uses MCP602 as the amplifier, and the amplifier circuit diagram composed of it is shown in Figure 2. Among them: VREF=0 V, R1=300 kΩ, R2=10 kΩ, this is a simple two-stage amplifier circuit, and its amplification factor can be changed by adjusting the variable resistor RG, which is convenient for future debugging. The output voltage VOUT after two-stage amplification:
The signal collected by the bridge circuit is relatively weak and needs to be properly amplified to be converted into a 0 V to 5 V signal that can be recognized by the microcontroller. To this end, the value of the variable resistor RG should be reasonably set to select the appropriate magnification. The selection process is as follows:
When RG = 20 kΩ, the magnification is about 61 times. At temperature T = 99 ° C, the resistance value of PT1000 is R = 1381.26Ω, and VOUT = 2.806 V is obtained. Although VOUT is within the limit of 0 ~ 5 V, the sensitivity is small, so RG is adjusted to 10 kΩ.
[page]
Then the output voltage △U is equal to:
3) Lead resistance of platinum resistor
Because the temperature measurement circuit is an unbalanced bridge. The platinum resistor is a bridge arm resistor of the bridge, and its connecting wire (from the platinum resistor to the control unit) is also a part of the bridge arm resistor. This part of the resistance is unknown and changes with the ambient temperature, causing measurement errors. However, since the resistance of the platinum resistor PT1000 is large, this factor can be ignored.
4) The influence of the temperature measurement circuit itself
Due to the jitter of the power supply voltage, external interference, mutual interference of the AD channel, etc., the uncertainty of temperature measurement will be caused. Therefore, reasonable circuit design must be used to eliminate the influence of these factors.
Considering the nonlinearity of the platinum resistor resistance and temperature and the nonlinearity of the bridge circuit itself, this paper proposes two solutions, which are introduced below.
Solution 1: Table lookup method
The resistance value Ri corresponding to each degree is found from the resistance-temperature graduation table of the platinum resistor. Substituting it into formula (3) can obtain the output voltage △U(i) corresponding to the bridge, and then according to formula (4) can obtain the corresponding A/D conversion value AD(i).
In the formula, K is the amplification factor of MCP602. This article chooses 91. UREF is the reference voltage of the A/D conversion inside the microcontroller, which is equal to 5 V.
The calculated A/D conversion value is stored in the memory of the microcontroller in a table according to the temperature. When measuring the temperature, first read the A/D conversion value, and then use the binary search algorithm to compare the A/D conversion result AD(t) of the microcontroller with the table value AD(i) stored in the EEPROM. Each time, the middle value AD(m) of the table is taken. If AD(t)>AD(m), the middle value of the second half of the table is taken for comparison in the next comparison. If AD(t)
Due to the nonlinearity of the platinum resistance and temperature and the nonlinearity of the bridge circuit itself, the relationship between temperature and bridge output voltage becomes very complicated, and there is no corresponding function to describe the relationship between them. The least squares method is introduced below, and the mathematical model of the temperature sensor is established using the least squares parameter estimation theory.
The temperature of the water tank of the solar water heater is measured at the calibration point (a standard resistance box or potentiometer can be used to simulate the actual measurement of the platinum resistance at each calibration point), and several sets of data are obtained, namely (V1, T1), ... (Vi, Ti), ... (Vn, Tn). The input is the bridge output voltage Vi, and the output is the temperature Ti.
Suppose
there is an m-order polynomial:
According to the principle of least squares method, at all given calibration points, the sum of squares of the deviations between the value of the polynomial T(Vi) and the measured output value Ti reaches the minimum, that is,
Thus, m+1 equations can be established to solve the unknown quantities a0, a1, …, am, and determine the expression of the polynomial T(Vi).
[page]
Solve the equations using matrix analysis method, and get the parameter vector asThe solution is solved by computer recursion method. First, set m=1, and bring the measured value into the matrix formula to calculate A. Calculate the error △i=Ti-T(Vi) point by point to see if it is out of tolerance. If it is out of tolerance, increase the order and set m=2, and recalculate A until it is not out of tolerance. At this time, the polynomial model is the sensor mathematical model.
The advantage of this method is that it can achieve the overall optimization of the established mathematical model and is suitable for the establishment of sensor models with large nonlinearity. However, when applied to this article, it is necessary to fit a high-order mathematical model, and the amount of calculation is large. In addition, the calculation speed is slow (multiple addition and multiplication operations) on a single-chip microcomputer with a main frequency of 4MHz, so this article adopts solution 1.
3 System software implementation
The software flow of temperature acquisition processing is shown in Figure 5, which includes starting the temperature circuit, register configuration, conversion data reading, and temperature search. First, perform A/D initialization settings, use the power supply voltage VCC as the comparison voltage, set RA0 as the analog input channel, open the water inlet temperature sampling channel, and start A/D conversion. When the A/D conversion enable bit GO/DONE = 1, the obtained sample value is sent to the binary search program to obtain the integer part M(t) of the temperature, thereby calculating the value of the temperature t. Return after the calculation is completed.
4 Experimental results and discussion
A standard resistance box is used to simulate a platinum resistance temperature sensor. Each resistance value corresponds to a temperature, forming the bridge arm of the temperature measurement bridge, and the differential voltage is obtained and measured by a multimeter. After being amplified by MCP602, it is sent to the microcontroller for A/D conversion. Since the A/D conversion inside the microcontroller is ten-bit, it is stored in registers ADRSEH and ADRSEL respectively, and then the corresponding temperature value is displayed on the touch screen in advance through the binary lookup table method. The comparison between the collected temperature and the actual temperature is shown in Table 1.
It can be seen from the table that within the temperature range of 10-80℃, the maximum error of temperature measurement is ±1℃. It can meet the heating and bathing requirements of solar water heaters.
5 Conclusion
This design uses platinum resistance as the temperature sensor of solar water heaters. The actual research results show that compared with previous similar sensors, this sensor has the advantages of high temperature control accuracy, easy use and stable performance, which improves the control level of solar energy application in China.
Previous article:Design and implementation of intelligent transmitter based on FPGA
Next article:Design of indoor temperature detection and control system
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- Can a constant current circuit be built using LDO?
- RF board PCB process design specifications
- [Evaluation of EC-01F-Kit, the NB-IoT development board of Anxinke] Unboxing
- Some people say that C language programming of MSP430 is a pseudo-C language programming?
- RF and Microwave Switch Test System Fundamentals
- CCS7.2 Setting Hardware Breakpoints
- Design and Application of QDLIntegrate Power Monitoring System for Shenzhen Metro Line 4
- CC2640R2F BLE development service characteristic attribute explanation
- Wi-Fi 7, ready in Asia, driving global market
- Can you provide me with a manual for S1700-24GR?