Single chip temperature recording system

Publisher:跳跃龙珠Latest update time:2011-08-06 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Single chip temperature recording system

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

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号