With the development and progress of society, the requirements for temperature in more and more occasions are becoming increasingly stringent, and the application of temperature monitoring systems has received increasing attention. In the field of agricultural development, temperature measurement technology is required in many occasions such as agricultural greenhouses, cold storage, and cultivation greenhouses. Traditional temperature measurement systems are all wired systems. For some occasions that require multi-point temperature measurement, the use of traditional wired temperature measurement methods has many inconveniences in terms of layout, maintenance and updating. In order to solve this problem, a wireless temperature monitoring system based on a single-chip microcomputer and a wireless transceiver module is designed. Combined with a temperature sensor, it is very convenient to build a multi-point distributed intelligent wireless temperature monitoring system.
1 Composition of the wireless temperature monitoring system
The system mainly consists of two parts. As shown in Figure 1, the first part is the node temperature measurement system, and the second part is the temperature display management terminal. The node temperature measurement system is responsible for measuring the temperature and sending the temperature value to the temperature display management terminal through wireless communication. The management terminal receives the temperature information and displays and issues an alarm signal. In special cases, the management terminal can also send control information to the node temperature measurement system in reverse to achieve temperature control.
1.1 Design of node temperature measurement system
The node temperature measurement system is shown in Figure 2. The core control chip of the system uses the AVR series single-chip microcomputer ATmega16. This is a single-chip microcomputer with a reduced instruction set, high speed, low power consumption, sleep function and CMOS technology, and has a high degree of confidentiality. The Flash can be burned multiple times and has multiple password protection lock functions. In addition, the built-in watchdog timer (WDT) and the on-chip RC oscillator are very convenient to use. It has a sleep power saving function and an idle low power consumption function, and is relatively cost-effective in terms of practicality.
[page]
The temperature sensor module uses the digital temperature sensor DS18B20, which is an intelligent digital temperature sensor launched by Dallas Semiconductor Corporation in the United States. When connecting to the MCU, the DS18B20 only needs one line (i.e., a single bus interface, plus a three-wire interface for power supply) to achieve two-way communication between the microprocessor and the DS18B20. Using DS18B20 can save system resources and make the system structure simpler. The temperature measurement range of DS18B20 is -55℃~+125℃, and the inherent temperature measurement resolution is 0.5℃. The working power supply is 3V~5V/DC. No peripheral components are required during use, and the measurement results are transmitted serially in the form of 9-12-bit digital quantities. The internal structure of DS18B20 mainly consists of four parts: 64-bit photolithography ROM, temperature sensor, non-volatile temperature alarm triggers TH and TL, and configuration registers. The 64-bit photolithography ROM stores the address sequence number of the DS18B20. The number is arranged as follows: the first 8 bits (28H) are the product type number, the next 48 bits are the serial number of the DS18B20 itself, and the last 8 bits are the cyclic redundancy check code (CRC=X8+X5+X4+1) of the previous 56 bits. The address sequence code in the photolithography ROM can distinguish each DS18B20, so that multiple DS18B20 can be connected to the same bus. According to the communication protocol of DS18B20, the MCU (single-chip microcomputer) must go through three steps to control the DS18B20 to complete the temperature conversion:(1) Before each read and write, the DS18B20 must be reset
(2) After the reset is successful, a ROM instruction is sent
(3) Finally, a RAM instruction is sent
. Only in this way can the DS18B20 be operated as planned. Reset requires the main CPU to pull down the data line for 500 μs and then release it. When the DS18B20 receives the signal, it waits for about 16 to 60 μs, and then sends a low pulse of 60 to 240 μs. The main CPU receives this signal to indicate that the reset is successful. In the temperature measurement system designed in this paper, each DS18B20 occupies one I/O port when connected to the MCU. The steps of MCU controlling DS18B20 to complete temperature conversion are shown in Figure 3.
nRF24L01 is a highly integrated single-chip wireless transceiver device launched by Nordic. The chip has automatic response and automatic retransmission functions, a speed of up to 2 Mbps, 126 optional working channels, a very short channel switching time, and can be used for frequency hopping. Its output power, channel selection and protocol settings can all be set through the SPI port. Its Enhanced Shock Burst mode can control the response and retransmission functions at the same time without increasing the workload of the microcontroller. nRF24L01 also has the function of receiving six different channel data on the same channel, and can achieve data acquisition of up to 750 points using FDMA technology, making it the best choice for the hardware implementation of wireless temperature measurement systems. When the nRF24L01 module transmits data with the MCU, it can use the MCU's ordinary I/O port, and the system directly uses the SPI communication port of the inherent resources of ATmega16, which simplifies the software design process to a certain extent.
[page]
The LCD display module uses LCD1602 liquid crystal display. The character generation memory (CGROM) inside the module has stored 160 different dot matrix character graphics. These characters include: Arabic numerals, uppercase and lowercase English letters, commonly used symbols, Japanese kana, etc. Each character has a fixed code. For example, the code for the uppercase English letter "A" is 01000001B (41H). When displaying, the module displays the dot matrix character graphics in address 41H, and we can see the letter "A". Because 1602 recognizes ASCII code, ASCII code can be used to directly assign values in the design, and character constants or variables can also be used in single-chip microcomputer programming, such as A'. In the system, 1602 uses an 8-bit data line driver, and its control end and data transmission are directly controlled by the I/O port of the single-chip microcomputer. The circuit is shown in Figure 4.
MCU-ATmega16, temperature sensor DS18B20 and LCD module 1602 are all powered by 5 V. The system power supply is 5 V and can be used directly. The nRF24L01 wireless transceiver module requires 3.3 V power supply, so the REG1117-3.3 chip is used to convert the power supply voltage to generate 3.3 V power supply for nRF24L01. When the SPI port of ATmega16 is connected to the nRF24L01 wireless transceiver module, the ATmega16 output drive current is too large, which may damage the wireless module, so a 2 k resistor is connected in series to protect the wireless module.
1.2 Temperature display management terminal
In the temperature display management terminal, the wireless transceiver module nRF24L01 first receives the temperature information sent by the node temperature measurement system through the antenna. The temperature information data is collected to the MCU through the SPI serial port of the single-chip microcomputer. If the temperature is not within the normal monitoring range, the sound module will sound an alarm. Finally, the temperature data is sent to the PC for display and processing through RS232 communication. The communication of the whole system belongs to duplex communication. If necessary, the circuit function can be expanded to realize the control signal sent by the PC and adjust the temperature of each node through reverse communication.
2 Conclusion
The wireless temperature monitoring system designed in this paper has a simple structure, easy implementation and good system performance. It is suitable for wireless temperature monitoring in various occasions.
Previous article:Research on SPWM variable frequency speed regulation system based on 8098 single chip microcomputer
Next article:Design of railway crossing monitoring system in mining area using single chip microcomputer and GPRS
Recommended ReadingLatest update time:2024-11-17 01:38
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- 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
- [Contactless face recognition access control system] + 6-EFR32BG22 using GPIO
- EEWORLD University ---- Linear Regulator_Low Dropout Regulator and Switching Power Supply Introduction
- MicroPython programming environment——Pycharm
- Serial port printing problem of domestic AC7801X chip (with program)
- EEWORLD University Hall--Introduction to the system and software and hardware implementation of the vehicle external amplifier
- Anyone who has used Eagle, please help me convert Eagle files into PADs files, thank you
- MSP430 learning PS2 keyboard control program
- Suddenly I found that CH579 is too powerful. I plan to make a product using CH579. Has anyone made a product using this chip?
- Since HIT's MATLAB can be banned, IAR, keil mdk, and stm ide may also be banned. What should I do?
- Power inlet processing