51单片机船舶主机轴系多点测温器设计+源程序

本课题开发了一种,具有多节点远距离测温功能的温度监测报警器。使用的STC12C5A60S2芯片连接多种外设,具有通信、存储、报警、人机操作等多种功能。


摘   要:可靠运转的主机轴承是船舶推进与航行的重要保障,是船舶运行安全的重要因素。当轴系出现轴心偏移、润滑不畅、轴系震动、异物进入等情况时,会迅速产生大量的热量导致轴温升高,严重时甚至会造成热损坏和热切轴,从而导致严重的事故后果。

船舶主机轴系多点测温器是一种基于单片机控制的,用于船舶主机轴系温度监测报警的装置,同时还具有与主机和复视器相互通信,存储报警信息和查看当前船舶主机轴系各处温度的功能。

本文主要设计一种基于STC12C5A60S2系列单片机控制的船用主机轴系测温报警设备。并且具有多点远距离测温功能,并将温度实时显示在OCM240128液晶屏和复视器上。当轴系中的任意点温度超出了设定温度时,该设备会启动声光报警,提示操作员采取措施。报警后,还具有储存存报警记录的功能。同时,该设备还具有两个RS485通信通道,一条连接复视器,实时传递温度信息;另一条连接主机,主机可以随时询问并获取该设备的各种运行状态。

关键词:51单片机;Altium designer;KEIL;DS18B20;RS-485通信

Abstract:Reliable operation of the host bearing is an important guarantee for ship propulsion and navigation. It will quickly produce a lot of heat and cause the bearing temperature to rise,when axis offsetting,inadequate lubrication,axis vibration,existing foreign matter and so on happens. It can cause heat damage or heat cutting-axle, which may result in serious accident ,when it gets worse.

Multi-point temperature measurement meter for ship main engine is a kind of devices which controlled by single chip microcomputer used for ship's main engine shafts temperature monitoring and alarm.It also has other functions like communicating with the host and the double vision device, storing alarm messages and checking the temperature of the current ship's main shaft system.

This paper mainly designs a kind of temperature alarm equipment for ship's main shaft system, which is based on STC12C5A60S2 series of single-chip microcomputer .It can also realize multi-point remote temperature measurement and display the temperature in real time on the OCM240128 LCD panel and the reviewer.The device will initiate sound light alarm and prompt the operator to take action when the temperature of any point in the shafting is above the setting temperature.It can also store alarm records.At the same time, the device has two RS485 communication channels, one for reviewer to transmit real-time temperature information. The other is connecting host, which can be interrogated at any time and obtain various running states of the device.

Keywords:51single chip microcontroller;altium designer;KEIL;DS18B20;

RS-485    

目 录

第一章 绪论 1

1.1 引言 1

1.2 船舶温度报警器的现状和发展趋势 1

1.3 课题的意义和目的 2

第二章 硬件设计 3

2.1 使用Altium Designer开发硬件设计 3

2.1.1 软件简介 3

2.1.2 使用Altium Designer 10 的硬件开发流程 3

2. 2 硬件设计的概述和主要原则 7

2.3 单片机的选择 8

2.4 温度测量电路 11

2.5 报警电路的设计 15

2.6 看门狗复位电路的设计 16

2.7 液晶显示电路   18

2.8 RS485通信电路 20

2.9 数据存储电路 21

2.10  I/O扩展电路 22

2.10.1 输出口的扩充 22

2.10.2 输入口的扩充 23

2.11 电源电路 24

2.12 按键输入电路 25

2.13 状态显示电路 26

第三章 软件设计 28

3.1 软件设计概述以及主要设计原则 28

3.2 温度传感器模块 29

3.2.1 温度传感器初始化子程序 29

3.2.2温度传感器写一个字节子程序 31

3.2.3 DS18B20读一个字节 32

3.2.3读取 DS18B20序列号子程序 34

3.2.4启动温度转换子程序 35