In practical applications, it is often necessary to monitor temperature signals at a distant location. To this end, a solution integrating a single-chip microcomputer with a digital temperature sensor is designed, which can achieve temperature detection at a lower cost and higher accuracy.
System Overview
The system hardware design is based on Atmel's AT89S52 single-chip microcomputer, and is mainly composed of power supply circuit, reset circuit, crystal oscillator circuit, serial communication circuit, temperature sensor circuit, 12864 LCD display circuit, I2C memory circuit and key input circuit. The temperature acquisition circuit uses a single-bus digital temperature sensor to realize temperature acquisition, which can be designed as one or more channels; the temperature storage circuit uses an I2C interface E2PRPOM storage chip to realize data recording; the LCD display circuit uses a graphic dot matrix LCD to realize real-time display of temperature. At the same time, it is equipped with a keyboard input circuit, which can receive user command input, change the working mode at any time, or query temperature data at any time.
2 Hardware System Design
The overall structure of the hardware circuit design is shown in Figure 1. The +5 V power supply circuit, manual reset circuit, and crystal oscillator circuit (11.059 2 MHz) form the minimum system of the single-chip microcomputer to meet the basic operating requirements of the single-chip microcomputer. The serial port circuit is used for communication to achieve interaction with the host. The temperature acquisition circuit, 1602 LCD display circuit, and I2C memory circuit are the three core modules of the design, which realize the main design functions and the key input circuit.
2.1 Temperature acquisition circuit design
This design uses the 3-pin T0-T2 small-volume package temperature sensor DS18820 produced by Dallas Semiconductor. DS1820 is the first temperature sensor that supports the "single bus" interface launched by Dallas Semiconductor in the United States. It has the advantages of miniaturization, low power consumption, high performance, strong anti-interference ability, and easy matching with microprocessors. It can directly convert temperature into serial digital signals for microcomputer processing.
The temperature measurement range is -55~+125℃, and it can be programmed to 9~12-bit A/D conversion accuracy. The measured temperature is serially output in the form of a 16-bit digital quantity with sign extension. The temperature measurement resolution can reach 0.0625℃. Its working power supply can be introduced at the remote end or generated by parasitic power supply, which is easy to integrate into the system. Multiple DS18820s can be connected in parallel to three or two lines. The CPU only needs one port line to communicate with many DS18820s, which occupies fewer ports of the microprocessor and can save a lot of leads and logic circuits. The above characteristics make DS18820 very suitable for long-distance multi-point temperature detection systems. The temperature sensor circuit diagram is shown in Figure 2.
2.2 I2C memory expansion circuit design
The I2C bus (Inter Integrated Circuitbus) consists of a data line (SDA) and a clock line (SCL), and is a common bus structure used in single-chip microcomputer systems. This bus structure saves the I/O resources of the single-chip microcomputer as much as possible and reserves the largest expansion space for multi-channel temperature acquisition.
The memory AT24C16 used in this design is an I2C interface E2PROM chip produced by Atmel. AT24C16 has an on-chip address register. After each data byte is written or read, the address register automatically increases by 1 to implement the operation of the next storage unit, and all bytes are read in a single operation. In order to reduce the total write time, up to 8 B of data can be written in one operation. The I2C memory circuit is shown in Figure 3.
2.3 LCD display circuit design
The LCD display circuit is implemented with 1602 LCD with font library. This LCD module has clear interface functions, simple operation, simplified circuit design, and built-in font library greatly facilitates the realization of display operation.
3 System Function Implementation
The system software design has two main tasks: one is to continuously record temperature data; the other is to receive user input and respond to user instructions.
In the temperature recording program, temperature data is collected at fixed time intervals and recorded together with the current time. If the real-time clock chip is not expanded, the current time can be calculated and converted based on the time interval by software, avoiding the use of clock chips to increase system costs. For user key input, it responds in the form of external interrupts.
4 Conclusion
This design can realize the collection of temperature data and long-term data recording. It can sample any one channel individually or simultaneously sample multiple channels, and can interact with the host. The entire operation process of the system is centrally monitored at the same location, which is convenient and saves manpower, and realizes the integrated recording function of temperature collection, display, and storage. The design uses fewer peripheral components. It has the characteristics of simple design, flexible expansion, and comprehensive functions.
Previous article:Introduction to the interface application between single chip microcomputer and liquid crystal display
Next article:Application of single chip microcomputer in automobile electronically controlled air suspension system
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
- [Evaluation and experience of Zhongke Yihaiwei EQ6HL45 development platform] +04.RTC board test and debug (zmj)
- Xianji official engineer's dry goods: How to use the HPM6000 series on-chip SRAM
- Gizwits IoT Platform + MSP430G2553 + Low-power Li-ion Battery Smart Manager
- Is it better to use logic level MOS or standard level MOS for DCDC circuit driving?
- A small question about COMSOL
- It's settled. Twitter is laying off more than 50% of its employees. The ratio of M to IC is 1:20. All top executives will be laid off.
- Please help me find the model of the Renesas microcontroller R8L35C in the attached picture. What is the real model? I can't find it on the Renesas website.
- [Hangxin ACM32F070 supporting capacitive touch development board - dual-machine UART communication linkage Hangxin evaluation final part - part 2]
- How many layers does the Raspberry Pi have? What should I pay attention to when drawing it myself?
- Microchip Live Broadcast at 10:30 AM Today | How to Implement AWS IoT Secure Authentication