1 Overall structure and functional description of the system
This design is based on AVR microcontrollers and high-precision A/D conversion chip ADS1232, which can calibrate temperature and humidity sensors. The temperature and humidity sensor is a temperature and humidity integrated sensor. The principle of temperature detection is to use PT100 to measure the temperature. In this way, it is necessary to convert the platinum resistance signal into a voltage signal to realize temperature acquisition. This design uses REF200 to stimulate a constant current of 200μA. The humidity outputs a voltage of 0~1V, corresponding to 0%~100% humidity. In order to achieve high-precision acquisition of temperature and humidity values. A high-precision 24-bit A/D converter ADS1232 is used here to achieve this. This design detects the signal output by the temperature and humidity sensor to achieve the calibration of this temperature and humidity sensor. The sensor output information read by the microcontroller is sent to the computer through the serial port for display. The system structure block diagram is shown in Figure 1.
2 Hardware Design
2.1 System Hardware Overview
The system hardware circuit consists of a single-chip microcomputer circuit, a constant current source excitation circuit, an 8-way selection circuit, a high-precision A/D conversion circuit ADS1232 circuit, a serial communication circuit, etc.
2.2 System Control Core
The system uses an ATmeGA16 single-chip microcomputer. This single-chip microcomputer is a low-power 8-bit RISC instruction set single-chip microcomputer with rich on-chip peripherals, built-in 512 B E2PROM, and strong I/O driving capability. It is particularly suitable for the control of low-power instruments and meters.
The single-chip microcomputer collects information about the temperature and humidity of the sensor through the high-precision A/D conversion chip ADS1232, and compares it with the standard value, and realizes the calibration of the sensor to be calibrated through comparison.
The core circuit of the single-chip microcomputer is shown in Figure 2. In order to achieve the synchronization of communication between the single-chip microcomputer and the PC, an external 7.372 8 MHz crystal oscillator is used as the main clock.
2.3 Constant current source excitation circuit
In this design, REF200 is used to generate a 200μA constant current source excitation to excite PT100 to generate a voltage signal. The constant current source chip REF200 has a high precision of single-channel output (100±0.5)μA and an extremely low temperature drift of ±25 ppm/℃. This feature makes REF200 very suitable for the detection of PT100 in this temperature and humidity sensor. The constant current source excitation circuit is shown in Figure 3.
2.4 Temperature and humidity 8-channel channel selection circuit The
temperature and humidity 8-channel channel selection circuit uses a channel digital control analog electronic switch CD4051 to achieve 1~8 selection. The output current signal of REF200 is connected to pin 3 of CD4051, and the I/O port of the single-chip microcomputer outputs a control signal to control the A, B, and C pins of 4051 to realize the selection of X and X0~X7 channels respectively, as shown in Figure 4. [page]
2.5 High-precision A/D conversion circuit
This design uses the 24-bit A/D conversion chip ADS1232 to convert the voltage signals output by temperature and humidity. ADS1232 has two acquisition channels, so an ADS1232 can achieve simultaneous conversion of temperature and humidity. Its peripheral circuit is shown in Figure 5. The voltage signals of temperature and humidity are connected to AINP1, AINN and AINP2, AINN2 respectively to realize voltage acquisition. In order to obtain a higher voltage reference, the design uses REF3133 as the A/D conversion voltage reference of ADS1232.
3 System Program Design
3.1 MCU Program Main Flowchart
The main flow chart of the system is shown in Figure 6. After power-on, the main program initializes the registers (sets the input/output mode of the I/O port used, external interrupt registers, serial communication protocol, etc.), and finally turns on the serial port receive interrupt enable. When entering the serial port interrupt, it determines the number of sensors currently being calibrated, and then collects the temperature and humidity values of each channel in turn, and sends the collected values to the PC through the serial port for display by the host computer software.
3.2 Main functions and implementation of the software system
The system mainly collects data from temperature and humidity sensors to calibrate them. The system structure is shown in Figure 7. The entire system was developed under the Visual C++ 6.0 environment. It uses serial communication technology to collect data in batches, uses database technology to store and query data in the SQL Server database, uses DataGrid controls, DataCombo controls, and ADO controls in VC to display data, query data, print calibration certificates, and verify certificates. VC calls Excel to output calibration data records. The verification flow chart is shown in Figure 8. [page]
3.3 Human-machine interface
3.3.1 Temperature and humidity sensor calibration interface
For ease of use and operation, Visual C++ designed the human-machine interface. Run the system and enter the main interface. The menu consists of file, test, query, and help. Click the test system to enter the temperature and humidity sensor test system. You can select different numbers of sensors (1 to 8) as needed. Fill in the test environment and temperature and humidity sensor information according to the test requirements, select and open the COM
port, and perform forward/reverse tests on 30%, 40%, 55%, 75%, and 95% from low to high and then from high to low, as shown in Figures 9 and 10.
3.3.2 Data Query
The query interface in this system consists of two parts: data query and test conclusion query. All data queries can be queried according to the sensor number or test date. Use two "Adodc" controls to provide data for the "DataCombo" control and the "DataGrid" control respectively. Use the SELECT statement to implement the query function. For example:
In the data query interface, you can export the data table to Excel and print the data.
4 Conclusion
This system is suitable for batch calibration of temperature and humidity sensors. It integrates data collection, data storage, and certificate printing. Compared with the calibration of temperature and humidity sensors in the laboratory through the automatic weather station collector, it has the advantages of convenient data storage, dynamic real-time data refresh, and automatic certificate printing, which greatly reduces the workload of calibration personnel and saves human resources.
Previous article:Design of high-precision electronic scale based on AVR microcontroller
Next article:Electric Scooter Controller Based on AVR Microcontroller
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- New breakthrough! Ultra-fast memory accelerates Intel Xeon 6-core processors
- New breakthrough! Ultra-fast memory accelerates Intel Xeon 6-core processors
- Consolidating vRAN sites onto a single server helps operators reduce total cost of ownership
- Consolidating vRAN sites onto a single server helps operators reduce total cost of ownership
- 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!
- EEWORLD University Hall----TI's solutions in electric bicycles
- LTC3872 60V Boost Controller with No RSENSE Architecture (Figure)
- How to implement the judgment and execution of two parts of code in Verilog
- Research on a New Control Method for High Frequency Electronic Ballast
- [Repost] Popular Science of Components: Pressure Sensors
- The meaning of the letters in the MSP430F5438A-EP and MSP430F5132IDA models
- How to detect power supply voltage in R7F0C001
- Laptop Power Management
- Ask for advice chip
- Commonly used algorithms for drones - Kalman filter (XII)