1 Introduction
The measurement of atmospheric temperature is of great significance. Generally, various thermometers are used for manual measurement and the measurement results are recorded regularly. This method is time-consuming and labor-intensive and very inconvenient. This paper proposes a very compact atmospheric temperature measurement and recording device, which can automatically measure the temperature in the range of -55℃~+125℃ and record the measurement results at the same time, with an accuracy of up to 0.0625℃.
2 System Principle
The system structure is shown in Figure 1. The system is mainly composed of AT89C2051 microcontroller and peripheral circuits. The basic idea is that the serial clock chip DS1306 provides the time reference, the temperature sensor DS18B20 measures the temperature, and the temperature data is stored in DS2433. The AT89C2051 microcontroller is responsible for the coordination and control of the entire system.
AT89C2051 is a low voltage, high performance CMOS 8-bit single-chip microcomputer, with 2k bytes of repeatedly erasable read-only Flash program memory and 128 bytes of random access data memory (RAM). The device is produced using ATMEL's high-density, non-volatile storage technology, compatible with the standard MCS-51 instruction system, built-in general 8-bit central processor and Flash storage unit, the powerful AT89C2051 single-chip microcomputer can provide cost-effective applications.
AT89C2051 is a powerful single-chip microcomputer, but it has only 20 pins, 15 bidirectional input/output (I/O) ports, of which P1 is a complete 8-bit bidirectional I/O port, two external interrupt ports, two 16-bit programmable timer counters, two full bidirectional serial communication ports, and an analog comparator amplifier. At the same time, the clock frequency of AT89C2051 can be zero, that is, it has a sleep power saving function that can be set by software. The system wake-up methods include RAM, timer/counter, serial port and external interrupt port. After the system wakes up, it will enter the continuous working state. In power saving mode, the on-chip RAM will be frozen, the clock will stop oscillating, and all functions will stop working until the system is reset by hardware.
System structure diagram
Figure 1 System structure diagram.
DS18B20 is an integrated digital thermometer with a temperature measurement range of -55℃ ~ +125℃. It can achieve four different resolutions of 0.5℃, 0.25℃, 0.125℃, and 0.0625℃ through programming. Its biggest feature is that it can realize digital communication with the microcontroller through a data line.
The measured temperature data length is 2 bytes. The DS18B20 digital thermometer is a 1-wire, that is, a single bus device produced by DALLAS, which has the characteristics of simple circuit and small size. Therefore, it is very convenient to use it to form a temperature measurement system with simple circuits. Many such digital thermometers can be hung on one communication line.
Features of DS18B20:
(1) Only one port is required to achieve communication.
(2) Each device in DS18B20 has a unique serial number.
(3) In practical applications, temperature measurement can be achieved without any external components.
(4) The measurement temperature range is between -55℃ and +125℃.
(5) The resolution of the digital thermometer can be selected from 9 bits to 12 bits.
(6) There are internal upper and lower temperature limit alarm settings. [page]
Due to the unique characteristics of 1-Wire communication, that is, they all have a 64-bit registration code inside to provide a unique identification for each device, ensuring the absolute traceability of each device. When multiple 1-Wire devices are connected to the bus in parallel to form a local network, the registration code can be used as the node address of the device. Data is transmitted serially according to the 1-Wire protocol, requiring only one data line and one ground line. Therefore, DS2433 can be connected to the same data line as DS18B20, and they can be distinguished by their internal identification codes, which greatly saves data connection lines.
The biggest advantage of the whole system is that the devices used are very small, which has two advantages:
(1) The system is small in size and can be placed in a small space to measure the temperature of the space.
(2) The system has low power consumption and can be powered by batteries, so it can be placed in the field environment for temperature measurement. After the measurement, you only need to retrieve the memory and read the record through the computer interface.
3 Device Selection
3.1 Miniaturization
Compared with the AT89C52 microcontroller, the AT89C2051 has been greatly reduced in size because it has removed the P0 and P2 ports. The DS1306 is a serial clock chip, which saves a lot of I/O interfaces compared to the parallel mode.
The temperature sensor DS18B20 outputs digital quantities, which can be processed by the microcontroller without A/D conversion.
3.2 Scalability
The 1-Wire single bus is a proprietary technology of Dallas, a wholly-owned subsidiary of Maxim. Unlike most current standard serial data communication methods, such as SPI/I2C/MICROW IRE, it uses a single signal line to transmit both clock and data, and the data transmission is bidirectional. It has the characteristics of saving I/O port line resources, simple structure, low cost, and easy bus expansion and maintenance.
Therefore, according to actual needs, multiple temperature sensors and memories can be connected to the 1-Wire bus, which can measure multiple targets and record more data.
4 Communication Function
MAX232 is a chip compatible with RS232 standard launched by Texas Instruments (TI). Since the RS232 level of computer serial port is -10V ~ 10V, and the signal voltage of general single-chip microcomputer application system is TTL level 0V ~ 5V, MAX232 is used for level conversion. The device contains 2 drivers, 2 receivers and a voltage generator circuit to provide TIA/EIA-232-F level. The device complies with TIA/EIA-232-F standard. Each receiver converts TIA/EIA-232-F level into 5-V TTL/CMOS level. Each transmitter converts TTL/CMOS level into TIA/EIA-232-F level. MAX232 provides RS232 communication interface between single-chip microcomputer and PC. The host computer software can be written in Visual Basic 6.0 high-level language. VB6.0 provides a serial communication control. With this control, the PC can easily communicate with the microcontroller through the serial port. 5 Application Examples Figure 2 shows the software operation interface and data processing. The temperature change of a certain day is given by two methods: a list and a curve chart. In this way, the temperature change pattern of that day can be mastered. Temperature data processing interface diagram Figure 2 Temperature data processing interface diagram. 6 Conclusion From the perspective of measurement range, accuracy and measurement examples, this system can be used to measure and record a variety of ambient temperatures including atmospheric temperature. Future work plans: (1) Data storage: A single DS2433 can only store 256 temperature data. It can be replaced with a memory with a larger storage capacity or multiple DS2433s can be connected in parallel to record more data at one time and extend the measurement cycle; (2) Data reading: The current method of removing the memory for reading is still a bit cumbersome. A handheld wireless (such as RF, infrared, Bluetooth, etc.) receiving device can be designed to obtain the data from the memory. If measurements are being taken in the wild, data can be transmitted using mobile communication networks (such as the emerging 3G technology), saving researchers the hassle of traveling.
Previous article:Design and implementation of Doppler blood flow meter system controlled by 51 single chip microcomputer
Next article:High-speed control scheme for large-screen LED display based on 51 single-chip microcomputer
- Popular Resources
- Popular amplifiers
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!
- 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
- How to analyze which solution is better when two rectifier bridges are connected together?
- [RVB2601 Creative Application Development] Introduction and use of RVB2601 WiFi networking to obtain weather information
- IGBT Driver
- Renesas Electronics RL78/G11 target board free application, participate in the application can also win a JD card!
- Faster CircuitPython LED animation with ulab
- Simple analysis of a circuit for collecting the average value of AC voltage
- EEWORLD University Hall----Live Replay: Infineon / Weikeng - Market environment is uncertain, Infineon is very sure to protect IoT devices
- Usage of pragma in dsp
- FPGA Learning Notes-----FPGA Competition Adventure
- W806 Lighting