China sensor manufacturers

China Temperature Sensor & Thermistor manufacturer

Designing a Temperature Detection System for a Microcontroller

(1) An alarm is issued when the temperature is lower than or exceeds the set DS18B20 temperature range.
(2) The temperature value of DS18B20 can be digitally displayed in real time on the digital tube.
(3) The DS18B20 alarm temperature can be set freely manually.
In the design of microcontroller circuits, most sensors are used, so it is very easy to think of, so a temperature sensor DS18B20 can be used. This sensor can easily directly read the measured temperature value and convert it to meet the design requirements.
Design the temperature acquisition module of DS18B20
Design block diagram

working principle

(1) Introduction to DS18B20 temperature sensor

In the temperature measurement principle of DS18B20, the oscillation frequency of the low temperature coefficient crystal oscillator is very little affected by temperature, and is used to generate a fixed frequency pulse signal and send it to the subtraction counter. The oscillation frequency of a high temperature coefficient crystal oscillator changes significantly with temperature changes, and the generated signal is used as the pulse input of the subtraction counter.

The opening time of the counting gate is determined by a high temperature coefficient oscillator. Before each measurement, first place the base number corresponding to -55 degrees into the subtraction counter and temperature register respectively. The subtraction counter subtracts the pulse signal generated by the low-temperature coefficient crystal oscillator. When the preset value of the subtraction counter decreases to 0, the value of the temperature register will be increased by 1, the preset of the subtraction counter will be reloaded, and the subtraction counter will restart the base of the pulse signal generated by the low temperature coefficient crystal oscillator.

When the slope accumulator is used to compensate and correct the nonlinearity in the temperature measurement process, its output is used to correct the preset value of the subtraction counter. As long as the counting gate is not closed, the above process is repeated until the temperature register value reaches the measured temperature value. This is the temperature measurement principle of DS18B20.

(2) The main design process is as follows
The temperature system we designed consists of a central controller, temperature detector and display. The controller adopts the C51 series of single-chip microcomputer, the temperature detection part adopts the DS18B20 temperature sensor, and uses LCD as the display. The temperature sensor DS18B20 collects temperature signals and sends them to the microcontroller for processing. The memory stores data at certain points in time through the microcontroller, and the microcontroller sends the temperature data to the LCD for display, thus achieving the purpose of displaying the current temperature.
Design the display module of DS18B20
DS18B20 temperature acquisition module:
Microcontroller control and AD conversion module:
DS18B20 display module:
DS18B20 alarm module:
DS18B20 power module:
PREV:Microcontroller and DS18B20 Digital Thermometer
NEXT:Design ds18b20 Electronic Temperature Alarm

RELATED POSTS




Skype

WhatsApp

WangWang

QQ
Email me

Mail to us