当前位置:网站首页>Design of digital temperature monitoring and alarm system based on DS18B20 single chip microcomputer [LCD1602 display + Proteus simulation + C program + paper + key setting, etc.]
Design of digital temperature monitoring and alarm system based on DS18B20 single chip microcomputer [LCD1602 display + Proteus simulation + C program + paper + key setting, etc.]
2022-04-23 15:02:00 【Jiang Yuzhi】
notes : Get the full set of resources , Please refer to the following description …
The design requirements
1. The accuracy of the measured temperature value is ±1℃;
2. The allowable error range of the system is 1℃ within ;
3. The system can preset the temperature value by the user , The temperature range is -55℃~+125℃;
4. adopt DS18B20 Sensor and system connections , Can detect the temperature of the site in real time and accurately ;
5. Pass the temperature value detected on site in real time LCD1602 The LCD displays ;
6. Alarm temperature setting and alarm : The alarm temperature can be set as required , And when the alarm temperature is reached, an alarm prompt will be sent ;
System Overview
The system adopts an improved temperature sensor DS18B20 As a detection element , The temperature range is -55~125ºC, The highest resolution can reach 0.0625ºC.DS18B20 The measured temperature value can be read out directly , And the three wire system is connected with the single chip microcomputer , Reduced external hardware circuits , It has the characteristics of low cost and easy to use .
This design is based on AT89C52 Simulation design of temperature monitoring system based on single chip microcomputer , System USES DS18B20 As a temperature monitoring element , measuring range -55℃-~+125℃, Use LCD1602 The LCD module displays the measured temperature value and the set upper and lower limits of temperature , The key module is used to set the upper and lower limits of temperature alarm . If the currently obtained temperature is not within the upper and lower limits of the set temperature , Buzzer alarm ,LED The indicator light is on , Indicates the current alarm message .
System consists of 4 Component composition , They are AT89C52 Minimum system of single chip microcomputer ( Including reset circuit and crystal oscillator circuit )、DS18B20 Temperature acquisition module 、LCD Display module 、 Key setting module and alarm module , Its design framework is as follows .
Simulation circuit diagram
The simulation results run
When from DS18B20 When the collected temperature is lower than the lower temperature limit , The simulation results are shown in the figure below , Known blue LED The indicator light is on , Buzzer alarm .
part C Program
The main program
void main()
{
init();//LCD initialization
Init_time();
Init_DS18B20();//DS18B20 initialization
while(1)
{
if(s1==0||s1num>=1)
{
keyscan(); TR0 = 0; D1 = 1; D2 = 1;}// Key scan
else
{
ReadTemp();// Read temperature value
write_temp_value(0,temp_value);//LCD Display temperature value
comp();
}
}
}
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x–)
for(y=110;y>0;y–);
}
/LCD Initializer ***/
void init()
{
lcden=0;
lcdrw=0;
write_com(0x38); // Set up 16x2 Show 5x7 Lattice ,8 Bit data interface
write_com(0x0c); // Set whether to display the cursor at the beginning
write_com(0x06); // After writing a character, add... To the address pointer 1
write_com(0x01); // Display reset data pointer reset
write_com(0x80); // Place the data pointer at the first word of the first line ,
write_com(0x80+9); // Defines the current pointer position
write_data(‘H’);
write_data(’:’);
write_data(’+’);
write_data(‘2’);
write_data(‘0’);
write_data(0xdf);
write_data(‘C’);
write_com(0x80+9+0x40); // Defines the current pointer position
write_data(‘L’);
write_data(’:’);
write_data(’+’);
write_data(‘1’);
write_data(‘0’);
write_data(0xdf);
write_data(‘C’);
h=0x14;
l=0+0x0a;
D1=1;
D2=1;
figh=0;
figl=1;
}
The content of resource sharing includes
(1) be based on DS18B20 Digital temperature monitoring system Proteus Simulation paper 【 Full version 】;
(2)Proteus Simulation file ;
(3)Keil C Language program file ;
(4) References (DS18B20、LCD1602 Manuals, etc );
(5)Visio Flow chart file ;
Share below
Resource acquisition method
Resource acquisition method
Resource acquisition method
Important things are to be repeated for 3 times !!!!!!!!!!!
Because this design is the author's original design , Get a complete paper report 、Keil C Program 、Proteus Simulation 、Visio Flow chart documents and references .
Please search WeChat for official account : Jiaoyuan Xiaozhi
版权声明
本文为[Jiang Yuzhi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231412472489.html
边栏推荐
- Frame synchronization implementation
- Model location setting in GIS data processing -cesium
- [jz46 translate numbers into strings]
- Share 3 tools, edit 5 works at home and earn more than 400
- Share 20 tips for ES6 that should not be missed
- 8.5 concise implementation of cyclic neural network
- Advanced application of I / O multiplexing: Processing TCP and UDP services at the same time
- 如何打开Win10启动文件夹?
- 2-GO variable operation
- Tencent has written a few words, Ali has written them all for a month
猜你喜欢
Leetcode exercise - 396 Rotation function
The art of automation
UML学习_day2
8.5 concise implementation of cyclic neural network
GIS数据处理-cesium中模型位置设置
win10 任务栏通知区图标不见了
Sword finger offer II 019 Delete at most one character to get palindrome (simple)
[stc8g2k64s4] introduction of comparator and sample program of comparator power down detection
Leetcode162 - find peak - dichotomy - array
We reference My97DatePicker to realize the use of time plug-in
随机推荐
[untitled]
OPPO数据湖统一存储技术实践
async关键字
Thinkphp5 + data large screen display effect
Provided by Chengdu control panel design_ It's detailed_ Introduction to the definition, compilation and quotation of single chip microcomputer program header file
Fill in the next right node pointer II of each node [classical hierarchy traversal | regarded as linked list]
Set onedrive or Google drive as a drawing bed in upic for free
Detailed analysis of SQL combat of Niuke database (26-30)
我的 Raspberry Pi Zero 2W 折腾笔记,记录一些遇到的问题和解决办法
Achievements in science and Technology (21)
Swift: entry of program, swift calls OC@_ silgen_ Name, OC calls swift, dynamic, string, substring
自动化的艺术
[detailed explanation of factory mode] factory method mode
One of the advanced applications of I / O reuse: non blocking connect -- implemented using select (or poll)
Daily question - leetcode396 - rotation function - recursion
What is the role of the full connection layer?
async void 导致程序崩溃
Sqlserver transaction and lock problem
分享3个使用工具,在家剪辑5个作品挣了400多
Leetcode exercise - 396 Rotation function