仓库温度监测系统设计毕业论文

摘 要

本设计主要包括温度传感器DS18B20、单片机AT89S51和LCD1602等器件,硬件电路包括温度检测电路、温度控制电路和一些接口电路等辅助电路,软件设计主要包括 数码管显示程序、键盘扫描及按键处理程序、温度信号处理程序、继电器控制程序、超温报警程序五个模块。设计电路工作原理为:首先,由DS18B20温度传感器芯片测量当前的温度,并将结果送入单片机。然后,通过AT89S51单片机芯片对送来的测量温度读数进行计算和转换,井将此结果送入液晶显示模块,如果测量温度超过预定值,单片机同时也会把信号传递给报警电路单元。最后,LCD1602A芯片将送来的值显示于显示屏上。

关键词:AT89S51单片机;温度传感器;DS18B20;LCD1602

ABSTRACT

The design includes temperature sensor DS18B20, MCU AT89S51, LCD1602 and other devices. Hardware circuit includes the temperature sensing circuit, the temperature control circuit , a number of interface circuits and other auxiliary circuits, Software design process includes five modules, such as digital tube display, keyboard scanning and key processes, the temperature signal processing, relay control procedures, over-temperature alarm program. The circuit design works as follows: First, by measuring current DS18B20 Temperature sensor chip temperatures, and the results into the single chip. Then sending the microcontroller chip on the measurement of temperature readings to calculate and convert the result well into this LCD module through the AT89S51, if the measured temperature exceeds a predetermined value, the microcontroller will also send signals to the alarm circuit module. Finally, SMC1602A sends the value of the chips which will be shown on the screen. Keywords: AT89S51 Microcontroller, Temperature sensor, DS18B20, LCD1602

目 录

第一章 前言 ......................................................................................................................... i

1.1 课题背景及目的 ....................................................................................................... 1 1.2 论文构成及研究内容 ............................................................................................... 1 1.3 仓库温度检测系统的原理框图 ............................................................................... 1

第二章 核心器件的选择 ................................................................................................ 3

2.1 单片机的选择 ........................................................................................................... 3

2.1.1 AT89S51简介 ............................................................................................... 3 2.1.2 AT89S51引脚功能 ....................................................................................... 3 2.2 温度传感器的选择 ................................................................................................... 5

2.2.1 DS18B20简介 ............................................................................................... 5 2.2.2 DS18B20的性能特点 ................................................................................... 6

第三章 硬件设计电路 ..................................................................................................... 7

3.1 主控制器 ................................................................................................................... 8 3.2 显示电路 ................................................................................................................... 8 3.3 温度检测电路 ........................................................................................................... 8 3.4 温度报警电路 ........................................................................................................... 9

第四章 软件设计 ............................................................................................................ 10

4.1 概述 ......................................................................................................................... 10 4.2 温度检测流程及程序实现 ..................................................................................... 10

4.2.1 初始化流程 .................................................................................................. 10 4.2.2 读DS18B20流程 ........................................................................................ 11 4.2.3 写18B20流程 ............................................................................................. 13 4.3 报警模块流程 ......................................................................................................... 15 4.4 中断设定流程 ......................................................................................................... 15

第五章 结论 ...................................................................................................................... 17 参考文献 ............................................................................................................................... 18 致谢 ........................................................................................................................................ 19

- i -

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4