1 Introduction
Digital thermometers have a wide range of application prospects. Figure 1 shows the application of this thermometer in computer case temperature control, and it can also be applied to wireless data acquisition systems for railway subgrade temperatures, real-time water temperature detection systems, and temperature monitoring systems within buildings. This design uses the AT89C2051 microcontroller from ATMEL as the intelligent controller, and the single-wire DS18B20 temperature sensor from MAXIM/DALLAS Semiconductor Company, achieving the following specifications: a temperature measurement range of -50°C to 110°C; measurement accuracy within 0.1°C; direct reading display on a 4-digit LED numeric tube; and one temperature measurement per second.
This system is easy to operate, has a simple structure, and provides accurate temperature readings, making it an intelligent temperature controller with certain control functions. This paper introduces the characteristics and usage considerations of this digital thermometer, and provides the principle design diagram and program code for the intelligent temperature controller.
**Figure 1**: Application of the temperature controller in computer case temperature control.
2 Design Plan Argumentation
In daily life, temperature detection and control are frequently required. Traditional temperature sensing elements include thermocouples and thermistors. Thermocouples and thermistors generally measure voltage, which is then converted into the corresponding temperature. This process requires a lot of external hardware support, resulting in complex hardware circuits, difficult software debugging, and high production costs.
For this digital thermometer design, we use the improved smart temperature sensor DS18B20, introduced by DALLAS Semiconductor after the DS1820, as the detection element. The DS18B20 has a temperature measurement range of -50°C to 110°C, with a maximum resolution of up to 0.0625°C. The DS18B20 can directly read out the measured temperature value and connects to the microcontroller using a 3-wire interface, reducing the need for external hardware circuits and featuring low cost and ease of use.
The main controller selected is the AT89C2051 microcontroller. The AT89C2051 is based on the MCS-51 microcontroller core, fully compatible with the instructions of the MCS-51 microcontroller, and includes 15 bidirectional I/O ports, two 16-bit programmable timers/counters, and other resources, meeting the design requirements of this thermometer.
3 Overall System Composition
According to the functional requirements of the system design, the system is determined to consist of three modules: the main controller, the temperature measurement circuit, and the display circuit. The overall circuit structure diagram of the digital thermometer is shown in Figure 2.