摘 要 目前在我国各地型水面舰船上都配备了航煤气体报警仪,气体浓度传感器采用的是传统的4-20mA模拟信号的模式传送气体浓度值,只好每个检测通道配备一块具有检测报警及浓度值显示功能的检测板,随着气体浓度检测通道数目的不同配备不同数量的通道板,但大型舰船通道的数目比较多,因此报警系统体积会变得十分庞大,不利于操作人员使用,而且传统的4-20mA电流环传输信号,不利于长距离传输,容易带来干扰。为了巡检的需要,需要将其改造成现场智能仪表,通过将传感器检测结果直接发送到报警模块。 本文以Protel 99位主要操作软件,采用软件和硬件相结合的方式,设计并验证所设计系统的可行性。在正文刚开始时,详细讲了KCB-3传感器的原理图和相关芯片的作用,也分析了它的不足之处;在硬件部分,介绍了8031单片机,通讯线路图,放大电路和滤波电路的连接和功能,还有有关传感器的阻抗匹配;在软件部分,主要介绍了信号采集和通讯部分的相关程序和框架图。 关键词:MCS-51系列单片机;CAN总线;数据显示 ABSTRACT Currently in a surface warship of the our country everyplace all provided with the sail coal gas body to report to the police the instrument on the boat, gas density that sensor adopt to convey gas density value traditional 4-20mA mode of analog signal, have to each measure passway allocate one is it is it report to the police to measure to have and density value show measuring board of function, as the density of gas measures the passway board of the different quantities of different outfit of the figure of the passway, but there is many figure of the large-scale naval vessel passway, so the volume of warning system will become very huge , unfavorable to attenbants to use, and traditional 4-20mA electric current ring transmits the signal, unfavorable to transmitting at a long distance, easy to bring and interfere。In order to patrol the need that is examined , need to transform it into an on-the-spot intelligence instrument , send to the warning module directly through measuring the result of the sensor . This text adopts the way in which the software combines with hardware in Protel 99 persons of main function software, design and prove the systematic feasibility designed. When the text just began , have spoken the principle picture of KCB-3 sensor and function of relevant chips in detail , have analysed its weak point too; In the part of the hardware , have introduced 8031 one-chip computers , the line map of the communication, enlarge the circuit and connection and function of straining the wave circuit, there is impedance about the sensor that is matched; In the part of the software , have introduced the relevant procedures and frame pictures of signal gathering and communication part mainly. Key words: MCS-51 series one-chip computer;Total line of CAN; The data showing 目 录 第1章 绪论 1 1.1 课题的来源、目的和意义 1 1.2 课题的主要研究内容 1 1.3国内外研究现状 1 1.3.1 国外研究现状 2 1.3.2国内研究现状 4 第2章 KCB-3智能型气体检测传感器 7 2.1传感器原理图的设计及分析 7 2.1.1传感器额定电压的生成 7 2.1.2 数字电位器DS1669 9 2.2 传感器原理图设计 11 2.2.1 总方案方框图 11 2.2.2 分块分析 11 2.2.3 本设计的缺点 14 2.3 本章小结 14 第3章 系统主要硬件设计 16 3.1 系统总体方案 16 3.1.1 原理 16 3.1.2 系统构成 16 3.2 MCS-51系列单片机特性 19 3.3 SJA1000的特性 19 3.3.1 SJA1000的介绍 20 3.3.2 SJA1000的管脚功能和应用 20 3.4 传感器接口电路设计 22 3.5 A/D采集接口电路设计 23 3.5.1 A/D转换器的原理 23 3.5.2典型A/D转换器ADC0809 23 3.6 CAN总线接口电路设计 25 3.7滤波器的设计 25 3.8阻抗分配 26 3.8.1总的原理框架图 26 3.8.2 详细分析传感器的输入特性 27 3.9放大电路的设计 28 3.9.1基本型差动比例电路 28 3.9.2 反相比例放大电路 29 3.10 本章小结 30 第4章 系统主要软件设计 31 4.1 A/D采集程序设计 31 4.2 显示程序设计 33 4.3 CAN总线通讯程序设计 34 4.3.1 CAN控制器SJA1000的初始化程序 35 4.3.2 发送程序的设计 35 4.3.3 接收程序的设计 35 4.4 本章小结 38 结 论 39 参考文献 41 致 谢 42 |