introduction
In order to effectively carry out basic research on the durability of modern concrete structures, reveal the damage evolution rules of concrete structures throughout their life, fundamentally improve the durability of concrete projects, and ensure their due service life, the temperature and humidity of the concrete usage environment are measured. seems particularly important
Thermistors and humidity-sensitive capacitors are usually used to measure temperature and humidity respectively, and then sent to the computer after A/D conversion. However, this measurement method generally requires the design of corresponding signal conditioning circuits and a complex calibration process. Accuracy is difficult to guarantee. This system for measuring temperature and humidity can still be used when the number of measurement points is small and the accuracy requirements are not high. However, when multiple points of measurement are required and the accuracy requirements are high, its shortcomings will become apparent. Moreover, when it comes to monitoring two parameters, each measurement point must use two independent sensors and independent signal conditioning circuits. This not only greatly increases the cost and volume of the measurement system, but also increases the cost to a certain extent. the complexity of system design. This article will use the SHT11 chip to achieve a more optimized design.
SHT11 internal structure and working principle
SHT11 digital temperature and humidity sensor is manufactured using CMOSens (Ce-mo-Sens) patented technology (the fusion of CMOS and sensor technology). Its features are: full-scale calibration, second-line digital output; humidity measurement range is 0~100%RH, The temperature measurement range is -40℃~+123.8℃, the humidity measurement accuracy is ±3.0% RH, the temperature measurement accuracy is ±0.4℃, the response time is <4s; low power consumption (30mW), and can be fully immersed. Its overall dimensions are only 7.5mm×5mm×2.5mm, and its volume is similar to that of a large match head. The chip can output fully calibrated relative humidity and temperature digital signals to facilitate system integration.
SHT11 internal structure
Its internal structure is shown in Figure 1. It mainly includes: relative humidity sensor, temperature sensor, amplifier, 14-bit ADC, calibration memory E2PROM, RAM, CRC (cyclic redundancy check code) register, two-wire serial interface and low-voltage monitoring circuit, etc.
Figure 1 Internal structure of SHT11
The DATA pin of this chip changes state after the falling edge of the SCK clock and is valid only after the rising edge of the SCK clock, so the microcontroller can read the data when SCK is high, and when it sends data to SHT11, It must be ensured that the level state on DATA is stable in the SCK high level segment. When it is necessary to output a high level, the microcontroller will be set to a high-impedance state, and the external pull-up resistor will pull the signal to a high level, thereby achieving a high-level output.
working principle
First, two sensors generate relative humidity and temperature signals respectively. After amplification, they are sent to a 14-bit ADC for A/D conversion, standardization and error correction. Finally, the relative humidity and temperature data are transmitted through a two-wire serial interface. It is sent to the microcontroller, and then the microcontroller is used to complete nonlinear compensation and temperature compensation.
Temperature and humidity measurement system
Hardware circuit design
This system uses PIC16F73 microcontroller as the microcontroller. PIC16F73 is an 8-bit 28-pin microprocessor with 4KB of FLASH program memory; 22 bidirectional programmable I/O lines; 192-byte data memory; 3 timers; 5 8-bit A/D channels.
The system consists of three parts: measurement, display and communication. Since PIC16F73 has an I2C bus interface, virtualization is not required. Connect a 4.7KW pull-up resistor to the DATA terminal and a 0.1mF decoupling capacitor to the VDD and GND terminals. The hardware connection diagram is shown in Figure 2.
Figure 2 System hardware circuit diagram
SHT11 adopts a two-wire data transmission method. In order to save limited I/O port resources, the following connection method is adopted: connect the SCK line of each SHT11 to the same I/O port line of the microcontroller, and the DATA line Then they are respectively connected to different I/O ports. At the same time, this wiring method has another advantage: since multiple SHT11s share one SCK line, measurement instructions can be issued at the same time in each measurement. In this way, each sensor measures at the same time, and only one waiting time is needed to complete the entire process. Collection of data. The data collection time is shortened, thereby providing conditions for rapid response of the control system.
The display circuit is implemented using a 4-bit LED control driver ZLG7219 with a high-speed serial interface. The interface uses the synchronous serial peripheral interface SPI, which is easy to program and saves I/O ports. The temperature and humidity displays each use 4 digits. By changing the resistance value connecting the power supply and the ISET port, the display brightness of the digital tube can be adjusted.
The data communication part with the host computer adopts the RS-232 communication method implemented by the interface chip MAX232.
In order to improve the reliability of the system, a watchdog circuit is composed of MAX813LEUA to prevent the program from running away and causing the system to lose control. If PIC16F73 does not send a trigger signal to the WDI input within 1.6s, it means that the program has run away, and MAX813LEUA will send a reset signal to reset the system again.
Design of temperature and humidity measurement system software
There are programs for data collection and display written inside the microcontroller, which can display the current temperature and humidity values on site in real time. In addition, the temperature and humidity values are sent to the PC through the RS-232 bus interface, and the VB program is run to monitor the temperature and humidity values. displayed on the interface. The flow of the microcontroller software is shown in Figure 3.
Figure 3 Software flow chart
In order to realize temperature and humidity measurement, the host computer display screen was written using VB, which can display the temperature and humidity value of each point on the current site in real time. The following is part of the program for converting temperature and humidity:
Select Case
MSComm1.CommEvent
Case comEvReceive
Label11.Visible = True
Label12.Visible = True
buffer = MSComm1.Input
arr = buffer
For i = 1 To 11
w_1(i) = arr(i - 1)
Text1.Text = Text1.Text +
" " + w_1(i)
Next i
Humidity = Str$((Val(w_1(4))*256 + Val(w_1(5)))/100)
Temperature = Str$(((Val(w_1(6))) * 256 + Val(w_1(7))) - 27315) / 100)
Label2.Caption = Humidity
Label10.Caption = Temperature
End Select
Figure 4 is a picture of collecting one of the points. In the picture, there are settings such as serial port number, baud rate, check bit, data bit and stop bit. The current temperature and humidity of the measured point can be seen at a glance.
Figure 4 Temperature and humidity display interface
What is displayed here is only one point. Of course, multiple points to be displayed can also be displayed together, or you can switch to the historical temperature and humidity value curve of each point, as long as you make some modifications in the program.
Conclusion
This article uses PIC16F73 microcontroller and SHT11 temperature and humidity sensor and related peripheral chips to form a high-performance temperature and humidity acquisition system, and uses VB to realize real-time communication between the data site and the host computer, so as to easily know the temperature and humidity status of each point on site. , which provides a strong basis for the use of concrete structures.
Previous article:Connect DHT11 to PIC16F877A to measure temperature and humidity
Next article:Design of miniature pressure measurement device based on AT45DB161B memory and PIC16LC73B microcontroller
Recommended ReadingLatest update time:2024-11-24 18:06
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Humidity control and proteus simulation based on SHT11 humidity sensor
- SHT11 driver files
- Design of greenhouse temperature and humidity monitoring system based on single chip microcomputer control
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- The troubles of capacitor testers in traditional mode - Part 2
- 【GD32E231_DIY】-05: HMI program architecture
- Does anyone want OMNINET For Windows?
- [Rawpixel RVB2601 development board trial experience] 4. General hardware timer test
- Ask a question about Verilog
- Analog Reflection Topology Building Blocks for
- Share MODBUS examples based on MSP430
- EEWORLD University Hall--Overview of Hall Position Sensor Applications
- Qorvo has produced the ACTIVECiPS series of modular power PMICs. Will you use them?
- Using FPGA to collect images and store them in SD card