1. Design and application of thermocouple sensor temperature measurement system
The following introduces a typical temperature measurement system controlled by a single-chip microcomputer, which consists of three major parts: (1) measurement amplifier circuit; (2) A/D conversion circuit; (3) display circuit. It is widely used in temperature measurement and temperature control systems in power plants and chemical plants.
1. Hardware design
(1) Thermocouple temperature sensor
This system uses a nickel-chromium-nickel silicon thermocouple. The measured temperature range is 0~655℃. The cold-end compensation adopts the compensation bridge method. The potential generated by the unbalanced bridge is used to compensate the thermocouple caused by the change of the cold-end temperature. Thermoelectric potential change value. The unbalanced bridge consists of four bridge arms of resistors R1, R2, R3 (made of manganese copper wire), Rcu (made of copper wire) and a bridge voltage regulator source, which are connected in series in the thermocouple circuit. Rcu and the cold end of the thermocouple are both at ±0°C, and R1=R2=R3=1Ω. The bridge power supply voltage is 4V, powered by a regulated power supply. Rs is the current limiting resistor, and its resistance value varies depending on the thermocouple. The bridge is usually balanced at 20°C. At this time, the four bridge arm resistances of the bridge are R1=R2=R3=Rcu, and there is no output at terminals a and b. When the cold-junction temperature deviates from 20°C, for example, when it rises, Rcu increases, while the thermoelectric potential of the thermocouple decreases as the cold-junction temperature rises.
(2) Measurement amplifier circuit
In actual circuits, the signal output from a thermocouple is no more than a few tens of millivolts (<30mV) at most, and it contains common-mode interference such as power frequency, electrostatic and magnetic coupling. To amplify this kind of circuit, the amplifier circuit needs to have a high common-mode interference. Mode rejection ratio as well as high gain, low noise and high input impedance, it is appropriate to use a measurement amplifier circuit. Measuring amplifier is also called data amplifier, instrumentation amplifier and bridge amplifier. Its input impedance is high and it is easy to match with various signal sources. Its input offset voltage, input offset current and input bias current are small, and its temperature drift is small. . Due to the small time and temperature drift, the measurement amplifier has good stability. The measurement amplifier is composed of three operational amplifiers, and the differential input terminals R1 and R2 are connected to the non-inverting terminals of A1 and A2 respectively. The input impedance is very high, the circuit structure is symmetrical, and the measured signal is directly added to the input terminal, thus ensuring a strong ability to suppress common-mode signals. A3 is actually a differential follower with a gain of approximately 1. The amplification factor of the measuring amplifier is: AV=V0/(V2-V1), AV=Rf/R(1+(Rf1+Rf2)/RW). In this circuit, as long as the performance of op amps A1 and A2 is symmetrical (mainly referring to input impedance and voltage gain), its drift will be greatly reduced. It has high input impedance and common mode rejection ratio, is very sensitive to tiny differential mode voltage, and is suitable for It is suitable for measuring signals transmitted over long distances, so it is very easy to use with sensors with small outputs. RW is an external resistor used to adjust the amplification factor. A multi-turn potentiometer is used here.
In the actual circuit, A1 and A2 use low-drift high-precision operational amplifier OP-07 chips. Its input offset voltage temperature drift αVIOS and input offset current temperature drift αIIOS are both very small. OP-07 uses ultra-high technology and "Zener trimming" technology , making VIOS, IIOS, αVIOS and αIIOS very small, and are widely used in stable integration, precision addition, comparison detection and precision amplification of weak signals. OP-07 requires dual power supply and the operating temperature range is 0~70℃. Generally, zero adjustment is not required. If zero adjustment is required, RW can be used to adjust it. A3 uses the 741 chip, which requires dual power supply. The power supply range is ±(3~18)V. The typical power supply is ±15V, which should generally be greater than or equal to ±5V. It contains a compensation capacitor internally and does not require an external compensation capacitor.
(3) A/D (analog-to-digital) conversion circuit
The voltage signal amplified by the measuring amplifier has a voltage range of 0 to 5V. This signal is an analog signal and cannot be accepted by the computer, so A/D conversion must be performed. In the actual circuit, the ICL7109 chip is selected. ICL7109 is a high-precision, low-noise, low-drift, low-priced dual-integration 12-bit A/D converter. Since the current price of the 12-bit successive approximation A/D converter is relatively high, it can be used in situations where the speed is not too high, such as when used in high-precision measurement systems for weighing, measuring pressure, measuring temperature and other sensor signals. An inexpensive dual-integrating 12-bit A/D converter ICL7109 is used. ICL7109 mainly has the following characteristics: (1) High accuracy (accurate to 1/212=1/4096); (2) Low noise (typical value is 15μVP-P); (3) Low drift (<1μV/℃); ( 4) High input impedance (typical value 1012Ω); (5) Low power consumption (<20mW); (6) The fastest conversion speed is 30 times/second. When using a 3.58MHz crystal oscillator source, the speed is 7.5 times/second. Seconds; (7) There is an oscillator on the chip, and an external crystal oscillator or RC circuit can be connected to form a clock circuit with different frequencies; (8) 12-bit binary output, as well as a polarity bit and an overflow bit output; ( 9) The output is compatible with TTL, with three-state output in byte mode (divided into high and low bytes), and has a VART hooking method, which can be connected to the microprocessing system using a simple parallel or serial port; (10) Available RVNHOLD (run/ Hold) and STATUS (status) signals monitor and control conversion timing; (11) All inputs have anti-static protection circuits.
ICL7109 has a 14-bit (12-bit data and one bit for polarity and one bit for overflow) latch and a 14-bit three-state output register. It can be easily connected directly to various microprocessors without Add additional latches externally. ICL7109 has two interface modes, one is direct interface and the other is hook interface. In the direct interface mode, when the ICL7109 conversion is completed, STATUS sends a conversion end command to the microcontroller, and the microcontroller reads the converted data into high-order bytes and low-order bytes. In the hook interface mode, ICL7109 provides an industry standard data exchange mode, which is suitable for long-distance data acquisition systems. ICL7109 is a 40-wire dual in-line package. Please refer to relevant literature for each pin function.
(4) Interface between ICL7109 and 89C51
This system adopts direct interface mode, and the MODE terminal of 7109 is grounded, so that 7109 works in direct output mode. If the oscillator selection end (i.e. OS end, pin 24) is grounded, then the clock oscillator of 7109 works with a crystal oscillator. The internal clock is equal to the oscillator frequency divided by 58. If the external crystal is 6MHz, the clock frequency = 6MHz/58
When the analog input signal is small, such as 0 to 0.5 volts, the auto-zero capacitor can be twice as large as the integrating capacitor CINT to reduce noise. The larger the value of CAZ, the smaller the noise. If CINT is selected as 0.15μF, Then CAZ=2CINT=0.33μF.
The weak signal from the sensor is 0~5V after amplification by the amplifier. At this time, the influence of noise is not important. You can choose a larger integrating capacitor CINT, so that CINT=2CAZ, choose CINT=0.33μF, CAZ=0.15μF. Usually CINT and CAZ can be selected between 0.1μF and 1μF. The integrating resistor RINT is equal to the corresponding resistance value when the full-scale voltage (when the current is 20μA and the input voltage = 4.096V, RINT = 200kΩ). At this time, the reference voltage between V+RI and V-RI is 2V, which is composed of resistors R1, R3 and potentiometer R2 divide the voltage to obtain.
In this circuit, the CE/LOAD pin is connected to ground so that the chip is always in an active state. The RUN/HOLD (run/hold) pin is connected to +5V to enable continuous A/D conversion.
When the A/D conversion is in progress, the STATUS pin outputs high level. When the STATUS pin drops to low level, P2.6 outputs a low level signal to HBEN of ICL7109, and reads the high 4-bit data, polarity and overflow bits. ; Output a low level signal from P2.7 to LBEN and read the lower 8-bit data. In this system, although CE/LOAD is connected to ground and RUN/HOLD is connected to +5V, A/D conversion continues. However, if 89C51 does not query the P1.0 pin, it will not give out HBEN and LBEN signals, and the A/D conversion The result will not appear on the data bus D0~D7. When there is no need to collect data, it will not affect the work of the 89C51, so this method can simplify the design and save hardware and software.
(5)Display circuit
A 3-digit LED digital tube display is used. The segment control of the digital tube is output through the P1 port, and the position control is controlled by P3.0, P3.1, and P3.2. 7407 is a 6-bit drive gate. It is an open collector gate. When the input is "0", the output is "0"; when the input is "1", the output is disconnected and must be connected to the upper circuit. Two 7407s are shared, which are used as segment control and position control drivers respectively. The digital tube selects the common anode connection method. When the bit control is "1", the digital tube is strobed, and the dynamic display is completed by software, saving hardware overhead. The hardware principle is shown in Figure 1.
2. Software design
ICL module: A module that reads results from the A/D converter. It reads three times in a row and stores the three results in the internal 30H~35H units (double-byte storage).
WAVE digital filter module: It sorts the three results output by the ICL module and takes the middle number as the selected measurement value. This module can avoid the interference of pulse volume caused by accidental fluctuations in the circuit and make the display data stable.
MODIFY module: It compensates the value of the cold end of the thermocouple at 25°C, which is equivalent to adjusting the zero point in the instrument to 25°C. This module is called a zero point correction module (this temperature is room temperature).
YA table lookup module: It is the core module. The table data is data that grows according to a certain rule (0~655°C). The voltage values in the table correspond to the temperature values one-to-one. The voltage value in the table is the result of multiplying the thermocouple output signal by the amplification factor (150), which becomes The hexadecimal number is stored with the low bit first and the high bit last, so its data address can represent the temperature value. Subtract the first address of the table 0270H from the address of the searched content and then divide it by 2 (double-byte storage), that is is the temperature value. This data is a hexadecimal number and needs to be converted to hexadecimal (CLEAN) before being sent to the monitor for display.
Lookup table method: Using the binary search method, DP first finds the half value (MIDDLE) and compares the converted data (COMPARE) to see which half it belongs to, modify the upper and lower limit values of the table, and then perform the half and half comparison. After several times, until it is found If the data cannot be found, that is to say, the converted data is between two adjacent values in the table, then call the nearest value module (NEAR) to select the data that is close to the converted data as the found data. , and then call the temperature value module (FIND), and the entire table lookup module completes the change from input to output.
DIR: Dynamic 3-digit display is used. The display time is measured experimentally. After the design of each module is completed, it must be tested to make it as strong as possible in cohesion and coupling between modules, and use digital
2. Thermostatic furnace controller
This constant temperature furnace mainly uses liquefied gas to provide heat source, with high thermal efficiency and low heating cost. After manually presetting the heating temperature value, the controller can accurately control the temperature within ±1°C of the set value, making it easy to use on site. Its main performance indicators are: the temperature adjustable range is between 10 and 50°C; the temperature accuracy can be accurate to 0.25°C; when the oxygen content in the environment is lower than a certain value, the control circuit automatically shuts down the heating furnace and waits for manual processing.
1. Hardware design
The controller is composed of 89C51 as the control core, solenoid valve as the driving component, and temperature sampling, thermocouple signal sampling, display and other circuits. The system block diagram is shown in Figure 2.
The instruction system of the 89C51 microcontroller is fully compatible with the MCS-51, and it has a 4KB E2PROM on the chip, which can easily form a minimum system. The 10-digit digital temperature sensor is sampled, and after processing by the CPU, it is displayed on the LCD screen in real time. The thermocouple circuit monitors whether there are any abnormalities at all times.
(1) Digital temperature sampling circuit
AD company's product AD7416 is used in this system, which consists of a bandgap temperature sensor, a 10x A/D converter, a temperature register, a settable comparator, a fault queue counter, etc. The sensor converts the temperature into voltage, which is converted into a 10-bit digital quantity by the A/D converter and sent to the temperature value register. One conversion time of the A/D converter is about 400μs, and the accuracy can reach 0.25.
The interface mode of AD7416 is I2C/SMBUS, the temperature measurement range is between -55~125℃, it has a power-saving working mode and can be used for battery power supply. The address of AD7416 is determined by A0, A1, and A2. The address format is: 1001A2A1A0R/W. A maximum of 8 pieces can be connected in parallel. Only one piece of AD7416 is used in this system. The connection method is shown in Figure 5.3.3. Because the inertia coefficient of temperature is large, simple and effective moving average method, median method, low-pass filtering method, etc. can be used for software filtering. Sampling and calculating the average value in real time, using the average value as the actual temperature sampling value. The number of sampling is 8 to 16 times. Due to the use of digital temperature sensors, the traditional design model is completely broken, the design scheme is simplified, the reliability of the system is improved, and scale transformation is easily realized.
(2) Thermocouple feedback circuit
Because the heater uses liquefied gas as fuel, the heating process consumes oxygen, which may cause insufficient oxygen content in the environment. Therefore, during the heating process of the heater, it is necessary to constantly monitor whether the liquefied gas combustion is sufficient. Experiments have shown that when the oxygen content is normal, the gas burns until the thermocouple output voltage is above 20mV, and when the oxygen content is lower than a certain value, the thermocouple output voltage is below 12mV. Through the circuit shown in Figure 5.3.4, the thermocouple voltage is connected to the circuit to detect that when the voltage exceeds 18mV, the output terminal of the circuit outputs a high level, and when the voltage is lower than 13mV, the output terminal of the circuit outputs a low level.
(3) Other peripheral drive circuits
Its main function is to connect the signal output from the P1 port to the 7407, and the 7407 drives the input end of the solid-state relay. The output end of the relay drives two solenoid valves and an electronic pulse lighter.
In order to control the temperature of the thermostatic furnace and input data into the system, the system should be equipped with a keyboard that can increase or decrease the temperature, start and stop the thermostatic furnace, and also have a setting key for resetting the temperature during the heating process. After the thermostatic furnace is started, the LCD screen displays the measured temperature value in real time, and displays the fault status in case of abnormality.
2. Software design
The software adopts a modular structure. The software mainly completes the following tasks: scan the keyboard and call up the set value or enter a new set value as required, and determine whether to start. When starting, first open the heating valve for air supply, turn on the electronic lighter, and after successful ignition, open the main The outlet valve then monitors the temperature change. When the temperature exceeds the set temperature value by 1°C, the main outlet valve is closed. When the temperature is lower than the set temperature by 1°C, the main outlet valve is opened. If ignition fails, repeat the above startup process every 15 seconds. If ignition fails three times, close the heating couple valve and display the fault status on the LCD screen. After normal startup, the program always monitors the status of the thermocouple. If the thermocouple voltage is insufficient, close the main outlet valve and heating valve and wait for manual intervention.
Previous article:Design and implementation of digital instrument system based on RlTOS and ISP functions
Next article:Design of equivalent sampling oscilloscope based on microcontroller
- 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!
- 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
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Diode selection
- The computer will automatically restart when the LabVIEW program is running
- Master these techniques to easily operate DC-DC circuits!
- TYPEC to HDMI 4K@60HZ docking station CS5265 design reference circuit diagram
- DFT design/digital backend PR/digital backend integration/system software/and other positions, Beijing/Shanghai/Nanjing
- How to write the s-domain transfer function of this circuit? Please give me some advice.
- PIC microcontroller reads battery information and outputs it via serial port
- MSP430G2553 SPI UART
- Qorvo's 2020 review and expectations for 2021
- TIOBE June Programming Language Ranking: Python is expected to surpass C to become the first