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 used to form a temperature measurement system with simple circuits. Many such digital thermometers can be hung on one communication line, which is very convenient.
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, no external components are required to achieve temperature measurement.
(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 temperature upper and lower limit alarm settings. DS2433 is a 1-W ire memory with a capacity of 4k-Bit and can store 256 temperature data. It uses EEPROM technology, and the stored data will not be lost even if the power is off. The DS2433 has a factory-marked registration code that includes: a 48-bit unique serial number, an 8-bit CRC checksum, and an 8-bit family code (23h), and also has a 4096-bit user-programmable EEPROM. The power required to read and write the DS2433 is completely taken from the 1-Wire communication line. The memory is divided into 16 pages, each with 256 bits. The scratchpad is an additional page that can be used as a buffer when writing to the memory. The data is first written to a scratchpad, where it is verified. The copy scratchpad command is then used to transfer the data to the memory. This process ensures data integrity when modifying the memory contents. The PR-35 and SO IC packages provide a compact structure that allows the device to be mounted and connected on a printed circuit board using standard mounting equipment.
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 microcontroller 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 /E IA - 232- F level. The device complies with TIA /E IA - 232- F standard. Each receiver converts TIA /E IA - 232- F level into 5-V TTL /CMOS level. Each transmitter converts TTL /CMOS level into TIA /E IA - 232- F level.
MAX232 provides an RS232 communication interface between the microcontroller and the 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. This can help us understand the temperature change pattern of the day.
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 to read 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 the measurement is carried out in the field environment, the mobile communication network (such as the emerging 3G technology) can be used to transmit the data, which saves the researchers from the hard work.
Previous article:Functional verification of TURBO51 embedded microprocessor
Next article:Design of vehicle-mounted digital video compression recording system based on LPC2210 and SZ1510
Recommended ReadingLatest update time:2024-11-16 20:29
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Siemens PLC Programming Technology and Application Cases (Edited by Liu Zhenquan, Wang Hanzhi, Yang Kun, etc.)
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
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
- It seems like I'm in trouble. I dropped a bunch of chips on the ground. I have to pick them up with my hands or tweezers. I'm waiting online. It's urgent.
- 27 operators "abandon Huawei"! The United States released the list of "5G clean networks"
- A summary of the most downloaded electronic technical materials this week (2020-04-17)
- JTAG debug test access port TAP
- About serial port loopback test
- 【ST NUCLEO-G071RB Review】SPI
- The rice dumplings exchanged for Chip Coins arrived so quickly
- ADC and analog switch issues
- [BearPi-HM Nano, play with Hongmeng "Touch and Go"]-3-HarmonyOS compilation architecture learning record
- #idlemarket# nRF6936 Nordic IOT Sensor Kit Thingy: 52 Bluetooth module nRF52832