High-precision temperature and humidity measurement instruments based on isolation and networking technologies
2026-04-06 04:35:55··#1
1. Hardware Design of the Temperature and Humidity Display Instrument The hardware circuit of this instrument mainly consists of independent power supply circuits for temperature and humidity channels, temperature and humidity sampling circuits, signal conditioning circuits, analog-to-digital conversion circuits, opto-isolation circuits, and an AT89S52 microcontroller as the processor. It also includes LED display circuits, communication circuits, and a keyboard circuit. Its structure diagram is shown in Figure 1. The following will describe the circuits of each part. 1.1 Temperature and Humidity Transmitter The non-electrical temperature and humidity signals are converted into 4–20 mA electrical signals through the transmitter. This design uses the high-performance EE10-FT6 integrated temperature and humidity transmitter from E+E GmbH of Austria. Features of EE10-FT6: (1) 24 V DC power supply; (2) Temperature range: 0~50℃; Humidity range: 0~100%; (3) Temperature accuracy: ±0.1℃; Humidity accuracy: 1.0%; (4) Input impedance: ≤500 Ω; (5) Wiring method: three wires (positive power supply, temperature output line, humidity output line). 1.2 Isolation Measurement Technology In conventional temperature and humidity measurement, the temperature and humidity signals are often grounded and a single measurement circuit can be used. In this scheme, the transmitter output is first connected to the temperature and humidity display instrument (front end), and then connected in series to the back end of the DDC (Direct Digital Controller) to form a transmitter loop. The transmitter power supply is provided by the DDC. Therefore, the two grounded signals output by the transmitter need to be isolated at the front end to eliminate the influence on the back end measurement. That is, the two ends are connected in series and a pair of grounded signals are measured simultaneously. For analog signal isolation measurement, I considered three schemes: Scheme 1, "virtual" isolation, uses differential measurement technology, grounding one end of the differential signal through a suitable resistor. This scheme has the lowest cost, but it places very stringent requirements on the operational amplifier and has low stability. Scheme 2 uses linear optocoupler isolation, but linear optocouplers are difficult to debug, have large variability, require many peripheral components (operational amplifiers), and still require an isolation power supply at the front end of the optocoupler and an analog-to-digital converter at the back end. Scheme 3 uses two independent measurement circuits, then interfaces with the processor through ordinary optocouplers. This requires two sets of isolation power supplies and two measurement sections, resulting in slightly higher costs, but this scheme is the most reliable and easy to debug, and was therefore ultimately adopted, as shown in Figure 2. 1.3 4~20 mA Current Measurement The sampling resistor uses a 125 Ω/0.1% precision resistor, so only a voltage signal of 0.5~2.5 V needs to be measured. 1.4 Amplifier and Analog-to-Digital Converter Application The analog signal conversion of this temperature and humidity display instrument uses the TI rail-to-rail operational amplifier TLC2252. The biggest features of this amplifier are that the output can reach the full power supply amplitude, the offset voltage is small (0.5 mV), and the price is low, making it suitable for this instrument application. The analog-to-digital converter (ADC) uses the TI ADS1286U. The main performance characteristics of this chip are: (1) Resolution: 12 bits; (2) Maximum sampling frequency: 20 kHz; (3) INL: ±2 LSB/max; (4) DNL: ±1 LSB/max; (5) Interface method: two-wire system; (6) Reference voltage: external. 1.5 Resolution and Accuracy The requirements that this instrument needs to meet are: in terms of resolution, the temperature display should be up to 0.01℃ and the humidity display should be up to 0.1%; in terms of accuracy, the absolute error between the measured value and the DDC value of the automatic control system should not be greater than ±0.03℃. Such stringent requirements mean that this instrument must be very well made in terms of both hardware and software. 1.6 Digital Filtering Technology To meet the resolution and accuracy requirements mentioned above, in addition to selecting cost-effective components and advanced PCB board technology in the hardware, considerable work was done in the software. Because temperature and humidity are inertial quantities with a large time constant, their values do not change abruptly, thus allowing for a long filtering time. This instrument uses a method of multiple measurements, sorting, taking the median value, and then performing a first-order inertial filter. The mathematical expression is as follows: Where Xn-1 is the previous actual temperature and humidity value; Xn-2 is the median value obtained after sorting; Xn is the current temperature and humidity value; and A is the filtering time constant, used as a coefficient. This is done to prevent certain measurement abrupt changes and to satisfy the measurement of inertial physical quantities, ensuring that the measured values do not jump frequently, thus meeting the requirements. 1.7 Network Communication Technology This instrument uses RS 485 communication, with the communication protocol being MODBUS-RTU. It then communicates with Siemens DDC through a MODBUS-PROFIBUS gateway, with a baud rate of 38.4 kb/s. The bus uses a polling method, with the backend unit collecting temperature and humidity data from each room as the basis for centralized monitoring of room temperature and humidity. 1.8 Accuracy Calibration and Parameters This instrument is calibrated before leaving the factory. However, considering that long-term operation may cause component aging and changes in ambient temperature, leading to accuracy deviations, the instrument is equipped with an accuracy calibration function. Calibration requires a standard 4-20 mA signal meter. Following the display prompts, adjust the signal source to each range, and the instrument will automatically calibrate, storing the calibration coefficient values in non-volatile memory. This instrument has a manual on-site adjustment function; adjusting the potentiometer knob allows for more accurate temperature and humidity measurements within a short range. All parameter settings can be operated via network or instrument buttons and are not lost in power failure. 2. Software Design of the Temperature and Humidity Display The main programs include: temperature measurement subroutine, humidity measurement subroutine, keyboard scanning and implementation subroutine, and calibration subroutine. The measurement subroutine embeds analog-to-digital conversion, data processing, and display data generation; the keyboard scanning and implementation subroutine embeds display page switching, parameter setting, and calibration confirmation; the calibration subroutine embeds dual-channel switching calibration and calibration value storage. The interrupt service routine includes: a timer interrupt (for display) subroutine and a communication interrupt subroutine. The main program executes sequentially in a loop, integrating external operations (keyboard) to realize multiple functions of the instrument; the interrupt service routine can interrupt the execution of the main program at any time without affecting each other. Analog-to-digital conversion is crucial in this instrument. Besides ensuring good signal processing in hardware, software processing is also very important. The following is the access program for the ADS1286 analog-to-digital converter. The timing logic on the chip's datasheet is only a basic process; to obtain reliable values, it needs to be explored during debugging. This program is one that I have debugged and it works well. Note: The 12-bit AD value converted by this subroutine is stored in 02H/03H. Note: This interrupt service routine is a MODBUS slave response program. This instrument only uses MODBUS function codes 03 and 06, namely analog telemetry and parameter setting. 3 Conclusion This instrument has been successfully applied in 400 laboratories of the Shanghai Testing Center and is currently operating well, with an absolute error between it and the DDC not exceeding ±0.03℃.