毕 业 设 计(论文) 开 题 报 告
题 目:基于单片机的天燃气泄漏报警系统设计
学 院: 电气与电子电气工程学院 专 业: 电气工程及其自动化 学 号: 201220210109 学生姓名: 郑 永 光 指导教师: 南 光 群 老师
2014 年 3 月 1 日
毕 业 设 计 开 题 报 告
1.结合毕业设计情况,根据所查阅的文献资料,撰写2000字左右的文献综述: 一、本课题的研究背景及意义 单片机现在已越来越广泛地应用于智能仪表、工业控制、日常生活等很多领域,可以说单片机的应用已渗透到人类的生活、工作的每一个角落这说明它和我们每个人的工作、生活密切相关,也说明我们每个人都有可能和有机会利用单片机去改造你身边的仪 器、产品、工作与生活环境。 红外技术已经成为先进科学技术的重要组成部分,他在各领域都得到广泛的应用。由于他是不可见光,因此用他做天然气防漏报警监控器,具有良好的效果,而且抗干扰能力强。这种监控报警装置广泛应用与博物馆、单位要害部门和家庭的防护。 通常红外线发射电路,和传感器都是采用脉冲调制式。红外接收电路首先将接收到的红外光转换为电信号,并进行放大和解调出用于无线发射电路的调制信号。当无人遮挡红外光时,锁相环输出低电平,报警处于监控状态;一旦有人闯入便遮挡了红外光,则锁相环失锁,输出高电平,驱动继电器接通无线发射电路,监控室便可接收到无线报警信号,并可区分报警地点。 二、本课题国内外研究现状 1.国内研究现状 目前,石油化工企业、百货、住宅等,均要求对可燃气体浓度检测。国家相关标准日趋严格。虽然有许多可燃气体报警系统在市场上,他们中的大多数都有非常高的错误信息和低性能。分离技术的可燃气体报警器是相当成熟,但它仍然不能满足系统的要求,具有多个节点和广泛的报道。现在大多数Bus-type可燃气体报警系统是基于RS485这并不是很稳定,不能容纳更多的探测器节点。只有采用CAN总线模式、理论价值的在线检测节点也只是大约有100。在本文中,这一计划是主控制器+CAN/ 485转换器+燃气探测器。节点能力达数千。系统的稳定和实时性能得到很大提高,结合(触摸屏),整机系统的操作更容易。到现在为止在中国尚未报道气体报警系统,根据这项计划,它是连接的重要发展方向,具有广阔的市场空间和发展前景。
2.国外研究现状 国外的红外报警器大多数都是采用先进技术,其功能也非常先进。其中包括被动式热释电型红外报警器,红外监控无线报警器,超声波防盗报警器,红外线防盗报警器,高灵敏红外报警器,触摸式防盗报警器等等。目前国际上应用最多的是主动红外对射总线制报警主机的方式,这种方式具有技术成熟、可靠性高、易扩展、操作简便、经济性好等优点。 三、本课题相关理论综述 本设计是利用单片机对防盗报警系统进行控制,系统要求能对16个以上的监测点进行自动监测。是以单片机为核心构成防盗报警系统,以完成用户键盘输入,数码(可汉字液晶)显示、故障状态指示为主,完成报警检测,若有报警事故发生,可向外界发出声光报警信号。 8255的每一个输入输出口都将接一个检测来的信号信号,也就是每一路输入都有一个检测电路,它传过来的是一个4~20mA的电流信号,接一个250欧姆的电阻使其转换成1V~5V的电压信号,此电路中只可能为1V和5V两种情况,再通过一个电压比较器LM393,当LM393(U7)的2脚为5V时,输出为高电平,光电耦合器导通,8255的输入口将为低电平(其余时刻为高电平),表示检测到有人。检测信号与单片机接口如图3.1所示 U6PA.0A长距离导线R610KR725023+5VU7A1LM393光电耦合器R450.1R31K+5V8255R539+5V48 图3.1 检测信号与单片机接口图 晶体管输出型光电耦合器可做为开关运用,这时发光二极管和光电晶体管平常都处于关断状态。在发光二极管通过电流脉冲时,发光二极管在电流持续的时间内导通。光电耦合器也可做线性耦合器运用,在发光二极管上提供一个偏置电流,再把信号电压通
过电阻耦合到发光二极管上,引起其亮度的变化,这样光电晶体管接收到的是在偏置电流上增、减变化的光信号。输出电流也就将随输入的信号电压线性变化。 四、作者的观点和主要思路 本文采用单片机为核心的红外报警,并以此为核心设计了报警器的硬件系统和软件系统, 实现了系统的智能化控制, 红外接收电路首先将接收到的红外光转换为电信号,并进行放大和解调出用于无线发射电路的调制信号。当无人遮挡红外光时,锁相环输出低电平,报警处于监控状态;一旦有人闯入便遮挡了红外光,则锁相环失锁,输出高电平,驱动继电器接通无线发射电路,监控室便可接收到无线报警信号单片机检测到报警信号经预设的处理程。基本框如图4.1所示。 警语播放 检测电路 单 键盘输入 报警电路 片 机 显示电路 图4.1 系统基本框图 参考文献:
[1]李虎山,潘牟.防盗报警系统的设计与实现[J].电子工程师.2002:4~6 [2]谭克俊,栾秀珍,房丽萍,范劲玻.基于单片机的数字视频监控系统键盘及报警控制卡设计[J].电子技术.2004:80~81 [3]鲁青胶.新颖实用的红外探测防盗报警器[J].电子技术.1994:78~80 [4]鲁青胶.15路人体遥感无线防盗报警器[J].电子技术.1995:33~35 [5]吴英才,林华清.热释红外传感器在防盗系统中的应用[J].传感技术.2002:47~48 [6]刘辉.智能小区防盗报警系统的可靠性设计[J].电器时代.2002:74~75 [7]蒸燕春.智能化住宅小区安防电子系统的常用手段[J].现代电子技术.2002:39~41 [8]雷旭,何万强.新型家用防盗报警系统[J].现代电子技术.2003:82~83 [9]郑长风,程光伟,郭军.一种基于探测无线报警监控系统[J].现代电子技 术.2003:84~86 [10]于长军,张秀珍,杨向明,杨魁,王辉.多路红外防盗报警器[J].传感技术.1993.4:22~24 [11] John F. Wakerly[J].DIGITAL DESIGN.北京:高等教育出版社2007:125~133 [12] XILINX COMPANY[J].Field Programmable Array Gatas Data Book:25~27 [13]FPGA For Cache Logic[J].Printed on recycled paper of Atmle .cop.1995:36~38 [14]X.Wu.M.Pedram and L.Wang .Multi-code state assiment for lowpower design[J].IEE Proc-Circuts Syst,Vol.147.No.5.October 2000:46~48 [15]K.J.Astrom.Where is the intelligence in intelligent control[J].IEEE Control.May1991:65~68 [16]K.S.Narendra.IntelligentControl.SystemScience[J].YaleUniversity.New.Haven.May1990:14~16
毕 业 设 计 开 题 报 告
2.本课题要研究或解决的问题和拟采用的研究手段(途径): 一 本课题要研究或解决的问题 当我们考虑的范围广一点:若是在小区每一住户内安装天然气泄漏报警装置。当住户家中无人时,可把家庭内的报警系统设置为布防状态,当房屋内天然气泄漏时,报警系统自动发出警报并向小区安保中心报警。周界报警系统做出相应的应对措施。 1拟采用的研究手段 1. 在设计之前首先对本课题做了广大的市场调研工作,进行分析、对比、总结,再进行方案选择论证。 2.总体方案的确定。 设计主要采用了以下的硬件和软件设备,硬件设备:单片机部分和检查报分、软件设计部分包括主程序设计、中断子程序设计。 3. 设计中出现的图片都是利用WORD软件、PRTEL,PROTEUS等元件, 具体到设计时,又分硬件设计和软件设计,硬件设计主要分两大部分:单片机部分和检测部分,软件设计分主程序设计和中断子程序设计。在完成正文部分后,主要工作就是要进行调试,为了实现设计预计现象,软件和硬件都要作必要的修改,在设计之前首先工对本课题作广大的市场调研工作,进行分析、对比、总结,再进行方案选择论证。具体到设计时,又分硬件设计和软件设计,硬件设计主要分两大部分:单片机部分和检测部分。软件设计分主程序设计和中断子程序设计。
外文翻译部分
At present, petrochemical enterprises, department stores,residential buildings
etc, are all required to detect concentration of combustible gas. Relevant national standards become stricter. Although there are many combustible gas alarm systems in the market, most of them have high misinformation and low performance. The technology of isolated combustible gas alarm is rather mature, but it still couldn’t satisfy the system requirements with multiple nodes and wide coverage. Now most Bus-type combustible gas alarm systems are based on RS485 which isn’t very stable and couldn’t accommod ate more detector nodes. When only adopting CAN bus mode, the theoretical value of the on-line detector nodes is also only about 100. In this paper, the scheme is main controller+CAN/485 converter +gas detector. The node capacity can reach several thousands. The system stability and real-time performance is greatly improved and by combining touch screen, the system’s operation becomes easier. The gas alarm system based on this scheme has not been reported until now in China, it’s en important developing direction and has wide space of market and developing prospect.
II. SYSTEM PRINCIPLE AND FUNCTION
1. System Principle
Whole structure of the system is described as Fig1.Combustible gas detectors detect and process gas concentration, and then respond demands of CAN/485 converter to transmit data based on RS485 to CAN/485 converter.CAN/485 converters pack up data and transmit to the main controller based on CAN bus.
Main functions of the main controller are to analyze and display gas concentration information and sound-light alarm and to control relevant linkage module. It also responds touch screen and implements corresponding functions according to different key value. Fig2 is the main controller’s structure. 2. System Function
As is described in Fig1, The whole system includes three levels of part. The main controller communicates with CAN/485 controllers based on CAN bus and CAN/485 controller communicates with gas detectors and linkage modules based on RS485 bus. Designed maximum number of CAN/485 converter is 32 and it can have 33 gas detectors or linkage modules under each CAN/485 converter. Using this structure, the system ensures the stability and the capacity of detectors reach 1024, so the system can meet the requirements of most customers.
Sensor of gas detector detects gas concentration and switches to a 0V-5V voltage signal. Then detector analyzes and processes data, converts into the corresponding data format. Detectors transmit data to corresponding CAN/485 converter based on RS485 bus. In addition, gas detector
realizes functions such as zeroing, calibration, addresses modification and so on. Relay on linkage module controls gas pipeline opening and closing of valves or exhaust fan when the linkage module is set to link with detector and the detector has alarmed, and thus in time to avoid accidents.
CAN/485 converter selects ATMega16 MCU as the microcontroller. It receives data from gas detectors and linkage modules and communicates with the main
controller based on CAN bus. It also must complete functions such as responding and analyzing commands of the main controller, transferring commands to gas detectors and linkage modules to complete specific tasks.
In the design of the system, the main controller is most important and difficult part. Its structure is showed as Fig2.On the one hand, displaying real-time concentration information, on another hand, responding touch screen to realize query function, setting function etc. the main controller mainly includes CAN communication module, HMI, printer module, memory module, alarm module, power module etc. A 10.4 inch intelligent color LCD display terminal which communicate with MCU based on RS232 is used as HMI. It is easy and attractive to program, and complex interface is easier to realized. UP-A16PZ mini-printer which connects with Atmega128 based on parallel port can print historical alarming record, fault record, turning off and opening records. The main controller extends 32KB E2PROM to record historical and system parameters and 32KB SDRAM to record real-time concentration information. Power module’s functions are to convert voltage and detect commercial power, backup power and charging status.
III. HARDWARE DESIGN OF THE GAS ALARM SYSTEMA.
1.The Main Controller Part
The circuit of the main controller mainly includes two parts: power circuit, microcontroller and various I/O modules. The power circuit mainly realizes two functions: convert 24V to 5V based on LM2575 switching voltage regulator;
power monitoring. Using pulse method to detect commercial power, backup power and charging status.
The design of various I/O modules is another key point. The schematic diagram is showed as Fig.3. ATmega128, a low power CMOS 8-bit MCU is used as the microcontroller and it uses RISC architecture. It includes 128KB flash, TWI, SPI, JTAG interface (used as simulation debugging and program download). Features of ATmega128 satisfy the demand to design the main controller.
Amount of real time data and historical data are very large, so FM24C256(32K E2PROM) and SD2200EPI(clock chip with 32KB SDRAM) are extended via TWI bus. FM24C256 made by Ramtron Company has the features such as: it can read and write 10 billion times, record data for long time, and its read-write speed is very fast comparing with common E2PROM. SD2200EPI, an industrial grade real-time clock chip with 32KB SDRAM can guarantee accuracy of the clock error less than 2.5 minutes per year. SD2200EPI offers SDRAM to record real-time data and offers real time clock.
MCP2515 produced by Microchip Technology Inc is selected as CAN controller. MCP2515 is a full controller area network(CAN) protocol controller implementing CAN specification V2.0A/B. It is capable of transmitting and receiving standard and extended messages. It is also capable of both acceptance filtering and message management.
It includes three transmit buffers and two receive buffers which reduce the
amount of microcontroller management required. The MCU communication is implemented via an industry standard serial peripheral interface with data rates up to 5 Mb/s. 82C250 is used as bus transceiver. In order to ensure the system stability, Squelch suppressor, magnetic beads and lightning protection devices are added to the circuit.
Considering high requirement to the system stability, MAX705, a low-cost, up supervisory circuit is used for system reset. Intelligent color LCD terminal connects to MCU via USART1. It supplies Chinese word and touch screen function. Dot, line, circle, rectangle, lattice and other complex figures can easily be designed by simple instruction. The terminal also offers much figure memory to store fixed picture and BMP image to store boot screen. The touch screen's resolution is 1024*1024.
The enable signal of printer, fault indicating lights, alarm lights are decoded by GAL16V8. GAL is a new electrically erasable and programmable PLD device. By using GAL, the control becomes easier and security of program becomes better. The output signal of printer and all indicator lights and several control signals are extended by parallel bus combining 74AHC573. The input signal is realized by parallel bus combining 74AHC245.
LM246 is used to give three alarm signals. The alarming circuit is as Fig4. 2.CAN/485 converter
ATmega16 MCU is chosen as the converter's core, it has high performance-price ratio and has 16KB FLASH, 256 BYTES E2PROM, 1KB
RAM, so it's very suitable to used in CAN/485 converter.
Converter mainly used to convert data format between CAN and RS485. The circuit mainly includes CAN part and RS485 part.The CAN part is similar to the part in the main controller showed in Fig.3.
The RS485 bus part is showed. Low-Power and high performance-price ratio chip SN65HVD3082 is used as the RS485 transceiver. Its features show as follow:
1) Meets or exceeds the requirements of the TIA/EIA−485A standard. 2) Low quiescent power: 0.3 mA @ active mode and 1 nA @ shutdown mode. 3) 1/8 unit load—up to 256 nodes on a bus.
In order to enhance system stability, 6N137 is used to separate circuit and magnetic beads and lightning protection devices are added to the circuit. IV. SOFTWARE DESIGN
1.Software Design of the Main Controller
Program flow of the main controller is described. Before running into the main loop program, the microcontroller and other chips must be initialized and the start-up interface displays for 1 minute. In this process the system detects power state, key value and reads parameters. The system parameters mainly include using condition of nodes, password and other information. Multi-host communication method may be used on CAN bus, but the main controller is still used as host for estimating faults and maintaining balance of each node. The system can work stably and quickly as soon as proper error handling method is
taken. The main function of key value detection and processing part is to detect weather the touch screen is pushed and then respond it. Touch-screen images mainly include three pulldown menus: displaying menu, setting menu and control menu. Each menu has several pull-down options and all the functions are completed by key value handling function.
Interruption INT0 is used to receive data from CAN bus and 29 bits extended frame format is used to send and receive messages. Register TXBnSIDH is used as node's ID, and receiver's node sets corresponding shielding and acceptance bits. Such a method can distinguish 127 CAN nodes and fully meet the requirements. Register TXBnEID8 stores sender's ID and TXBnEID0 stores address of gas alarm or linkage module. So a set of data of gas alarm or linkage module can transmit by one frame data.
2. Software Design of CAN/485 Converter
Converter receives commands from the main controller by interruption based on CAN bus. Then it analyzes commands and executes different subfunction. Converter polls child nodes of this RS485 bus when it doesn't receive commands from the main controller. Fig.7 is program flow chart of CAN/485 converter. V. SEVERAL POINTS FOR ATTENTION IN THE DESIGN
The program of CAN communication interruption and UART receiving interruption must be short enough. Otherwise, the communication efficiency will be influenced. There must be proper delay between each frame of data if some CAN note send message continuously, or else overflow error is easy to happen.
Some requirements for programming of the time segments must be satisfied in order to avoid communication failure. 1) Prop Seg + Phase Seg 1 >= Phase Seg 2 2) Prop Seg + Phase Seg 1 >= TDELAY 3) Phase Seg 2 > Sync Jump Width
In order to close speaker, not only the VCC pin, but also the OSC1 and OSC2 pins must be changed to low level, otherwise some LM246 couldn’t work normally.
To avoid disturbance of touch screen, the key values must be taken 3 groups at least.
VI. CONCLUSION
The combustible gas alarm system has high stability, nodes capabilities and its interface is friendly. PC can be added to the system via CAN adapter to realize displaying, setting and other functions. Now the product is going into mass production. 汉译:
目前,石油化工企业、百货、住宅等,均要求对可燃气体浓度检测。国家相关标准日趋严格。虽然有许多可燃气体报警系统在市场上,他们中的大多数都有非常高的错误信息和低性能。分离技术的可燃气体报警器是相当成熟,但它仍然不能满足系统的要求,具有多个节点和广泛的报道。现在大多数Bus-type可燃气体报警系统是基于RS485这并不是很稳定,不能容纳更多的探测器节点。只有采用CAN总线模式、理论价值的在线检测节点也只是大约
有100。在本文中,这一计划是主控制器+CAN/ 485转换器+燃气探测器。节点能力达数千。系统的稳定和实时性能得到很大提高,结合(触摸屏),整机系统的操作更容易。到现在为止在中国尚未报道气体报警系统,根据这项计划,它是连接的重要发展方向,具有广阔的市场空间和发展前景。 二、系统的原理和功能 1、系统原理
该系统的整个结构描述如图1。可燃气体探测器瓦斯浓度检测和过程,然后反应CAN/ 485转换器的需求来传输数据基于RS485 到CAN/ 485转换器。根据CAN总线,将CAN/ 485转换器整理数据,并传送到主控制器,。主控制电路的主要功能是瓦斯浓度分析、显示信息和声光报警联动和控制相关模块。根据不同的核心价值也回应并实施相应触摸屏功能。图2是主要的控制器的结构。 2、系统功能
根据图1描述,整个系统包括三个层次的一部分。主控制器与CAN/485基于CAN总线和CAN/485控制器的气体探测器和联动模块基于RS485总线通信控制器进行通信。设计CAN/485转换器的最大数量为32,根据每个CAN/485转换器,它可以有33个气体探测器或联动模块。采用这种结构,系统确保稳定,有能力达到1024的探测器,该系统能够满足绝大多数客户的要求。 气体检测传感器检测气体浓度,并切换到0V-5V的电压信号。然后探测器分析和处理数据,将相应的数据格式转换。探测器将数据传输到相应的CAN/485转换器基于RS485总线。实现调零,校准等功能,解决修改等。继电器联动模块控制天然气管道打开和关闭阀门或排气扇联动模块设置为连接
探测器和探测器敲响了警钟,从而及时避免了事故的发生。
CAN/485转换ATMEGA16单片机作为微控制器的选择。从气体探测器,联动模块接收数据,并与基于CAN总线的主控制器通信。它还必须完成的功能,如响应和分析,主控制器的命令,转移到气体探测器和联动模块的命令来完成特定的任务。
在系统设计中,主控制器是最重要和最困难的部分。其结构表明为图2。一方面,浓度实时信息显示。另一方面,响应触摸屏来实现查询功能,设置等功能主要包括主控制器CAN通信模块,人机界面,打印机模块,内存的模块,报警模块,电源模块等作为10.4英寸的智能彩色液晶显示终端与MCU通信基于RS232作为人机界面。这是又容易又有吸引力的程序设计和复杂的接口容易实现。UP - A16PZ与ATMEGA128基于并口连接的微型打印机,可以打印历史的惊人记录,故障记录,关闭和打开记录。主控制器扩展了32KB的E2PROM记录历史、系统参数和32KB SDRAM记录实时浓度信息。电源模块的功能是转换电压和检测商用电源,备用电源和充电状态。 三、气体报警SYSTEM硬件设计 1、主控制器
主控电路主要包括两部分:电源电路,微控制器和各种I / O模块。电源电路主要实现两个功能:基于LM2575开关电压调节器转换成24V至5V电源监控。使用脉冲的方法来检测商用电源,备用电源和充电状态。 设计各种I/O模块是另一个关键点。示意图显示图如图3所示。ATmega128是以8位单片机低功耗作为微控制器,它采用精简指令集架构。它包含128KB闪存,TWI,SPI和JTAG接口(用于仿真调试和下载程序)。ATmega128的特
点设计满足主控制器的需求。
实时数据量和历史数据量是非常大的,所以FM24C256(32 K E2PROM)和SD2200EPI(时钟芯片以32 KB SDRAM)通过TWI总线扩展。FM24C256由Ramtron公司制造,有产品的特点。例如:它可以读取和写入10亿次,很长一段时间的记录数据,其读写速度与常见的E2PROM相比要快得多。SD2200EPI是32KB SDRAM的工业级实时时钟芯片,它可保证时钟偏差的精度小于每年2.5分钟。SD2200EPI SDRAM记录提供了实时数据和实时时钟。
MCP2515是由美国微星科技有限公司生产被当做CAN控制器选择的。MCP2515的是一个完整的控制器区域网络(CAN)协议控制器落实CAN规范V2.0A/B。它是能够发送和接收标准和扩展的消息。这也是双方验收滤波和信息管理能力。
它包括三个发送缓冲器和两个接收缓冲器,减少所需的微控制器管理的金额。MCU的通讯是通过行业标准的数据传输速率且高达5 Mb / s的实施串行外设接口。用作总线收发器82C250。为了确保系统的稳定性,静噪抑制,磁珠和雷电灾害防护装置的电路。
考虑到系统的稳定性要求很高,MAX705,一种低成本,用于监控电路系统复位。通过USART1的智能终端连接到彩色液晶显示终端连接到MCU的。它提供了汉语分词和触摸屏功能。点,线,圆,长方形,格子和其他复杂的图形可以很容易地通过简单的指令被设计出来。该终端还提供了图形记忆存储固定的图片和BMP图像存储开机画面。触摸屏显示的分辨率是1024 * 1024。
打印机的使能信号,故障指示灯,报警灯,经GAL16V8解码。GAL是一
个新型的电可擦除和可编程PLD器件。使用GAL,控制变得更加容易和程序的安全性能变得更好。打印机和所有指示灯和几个控制信号的输出信号通过并行总线相结合74AHC573延长。通过并行总线相结合74AHC245来实现输入信号。
ATmega16单片机被选择作为转换器的核心,它具有较高的性能价格比,并具有16KB闪存,256字节的E2PROM,1KB的RAM,因此它非常适合用于CAN/485转换。
它主要是用来转换数据格式之间的CAN和RS 485。该电路主要包括CAN与部分RS 485。CAN部分类似于在主控制器显示图如图3。
RS485总线部分显示图如图5。低功耗和高性能价格比芯片SN65HVD3082用作RS485收发器。其特点表现如下: 1)达到或超过TIA/EIA-485A标准的要求。
2)低静态功率:0.3毫安主动模式和1 nA的关断模式。 3)1/8单位负载高达256总线上的节点。
为了提高系统的稳定性,6N137用于分离电路、磁珠和雷电灾害防护装置的电路。 四、软件设计 1.主控制器
主控制器的程序流的软件设计描述如图6。微控制器和其它芯片进入主循环程序运行之前,必须初始化和启动界面显示1分钟。在这个过程中,系统检测到电源状态,关键价值和读取参数。系统参数主要包括节点,密码和其他信息的使用条件。多主机通信的方法可用于CAN总线上,但仍估计故障和
保持平衡每个节点的主机使用主控制器。系统工作稳定,快速地尽快采取适当的错误处理方法。键值检测和处理部分的主要功能是检测天气推触摸屏,然后回应。触摸屏的图像,主要包括三个下拉菜单:显示菜单,设置菜单和控制菜单。每个菜单有几个下拉和键值处理功能完成所有的功能。 中断INT0是用来接收来自CAN总线和29位扩展帧格式用于发送和接收消息的数据。注册TXBnSIDH被用作节点的ID,和接收器的节点设置相应的屏蔽和验收位。这种方法可以区分127个CAN节点,并完全满足要求。注册TXBnEID8商店发件人的ID和TXBnEID0商店气体报警或联动模块的地址。因此,一套气体报警或联动模块的数据可以传输一帧数据。 2. CAN/485转换器的软件设计
接收信号变换器主控制器由基于CAN总线的中断。然后分析指令并执行不同的子函数。转换器的民意调查的子节点RS485总线接收命令时,它不从主控制器。图7是程序流程图可以/ 485转换器。 五、设计需要注意的几个问题
必须足够短的CAN通信中断和UART接收中断程序。否则,沟通的效率会受到影响。每个数据帧之间必须有适当的延迟,如果有人能注意不断地发送消息,或其他溢出错误是易发生。
时间段编程的一些要求必须满足,以避免通讯故障。 1) Prop Seg + Phase Seg 1 >= Phase Seg 2 2) Prop Seg + Phase Seg 1 >= TDELAY 3) Phase Seg 2 > Sync Jump Width
以关闭扬声器,不仅VCC引脚,但也必须改变低水平的OSC1和OSC2引
脚,否则一些LM246不能正常工作。为了避免干扰的触摸屏,键值必须采取至少3组。 六、结论
可燃气体报警系统,具有稳定性高,节点的功能和界面友好。 PC可以添加到系统中,通过显示适配器来实现,设置等功能。现在产品已进入批量生产。
因篇幅问题不能全部显示,请点此查看更多更全内容