广西科技大学(筹)毕业设计(论文)说明书课题名称基于CAN总线的智能照明控制系统设计院系电气与信息工程学院专业测控技术与仪器班级081班学号200800903072姓名秦宗伟指导教师罗功坤二0一二年五月二十日广西科技大学(筹)毕业设计论文摘要I摘要本设计是基于CAN总线的智能照明控制系统。设计中采用主从节点组网设计方案,通过主节点与多个从节点之间的相互通信以实现对照明设备的远程实时监控。主节点采用NXP公司生产的ARM7系列LPC2119微处理器和其内部集成的CAN控制器以及PCA82C250收发器设计出主节点硬件原理图,并制作出主节点硬件电路板。从节点采用STC89C52单片机和SJA1000独立CAN控制器以及PCA82C250CAN总线收发器,设计出从节点硬件原理图并制作出2个从节点实验电路板。通过将主从节点实验电路板挂接到网络构成一个一主多从的主从式照明控制局域网络。利用该网络进行CAN总线照明控制系统理论研究和实验测试。在本文中详细的介绍了CAN总线主从节点的软硬件设计原理、CAN总线通信原理、以及CAN总线应用层协议的制定,并采用SD卡存储技术、TFT彩屏显示技术、触摸屏技术等现实了友好的人机界面。在TFT液晶显示方面是本设计的一大亮点,设计中模拟工业控制工艺流程图,对工艺中涉及的总线、灯设备、板卡等进行精心绘制显示。使整个控制系统结构清晰、形象、逼真。在输入设备方面是本设计的第二大亮点,本设计采用当前较为先进方便的触摸屏输入技术,为用户提供一个方便易捷的输入方式,以实现人机交互。灯设备离线检测功能是本设计的又一大亮点,本设计采用定时询问方法,实现了从节点的离线检测功能。总之,在本设计中,主节点实现了对多个从节点灯设备的远程设置和监控功能、离线检测功能、运行通信指示功能、实时更新显示功能等。从节点具有独立设置、控制本节点灯设备的功能。整体系统运行可靠,通信正常,不出现通信拥堵、死机等现象。并开发出具有一定应用意义的系统软硬件,实现了照明灯设备的有效控制。关键词:CAN总线;节点;照明控制;TFT;触摸屏技术;SD卡广西科技大学(筹)毕业设计论文AbstractIIAbstractThedesignisintelligentlightingcontrolsystem.It’sbasedonCANbus.Inthedesignweusemasterandslavenetworknode.ByThemaincommunicationbetweenthemasternodeandmultipleslavenodestomaketheremotereal-timemonitoringoflightingequipmentsuccessful.ThemasternodeusestheARM7familyNXPLPC2119microprocessorsandintegratedtoitsinternalCANcontrollerandPCA82C250transceiverdesignhardwareschematicdiagramofthemasternode,andcreatethehardwarecircuitboardofthemasternode.ThesalvenodeuseSTC89C52microcontrollerSJA1000stand-aloneCANcontrollerandPCA82C250CANbustransceiverdesignfromthenodehardwareschematicdiagramandalsocreatetwonodesbreadboard.Byputthemasterandslavenodeexperimentalcircuitboardtothemainnetworktoconstituteamainandsomeslaveslightingcontrollocalareanetwork.UsingthenetworktoresearchandexperimentaltestingoftheCANbuslightingcontrolsystem.InthispaperadetailedintroductionmasterandslavenodeoftheCANbus,hardwareandsoftwaredesignprinciples,theprincipleofCANbuscommunication,theformulationoftheCANbusapplicationlayerprotocol,SDcardstoragetechnology,TFTcolordisplay,touchscreentechnologyandotherpracticalfriendlyinterface.TheTFTLCDisoneofthemostwonderfulofthisdesign.Inthedesign,wesimulateindustrialcontrolprocessflowdiagramofthebusinvolvedintheprocess,lightequipment,boards,carefullydrawingdisplay.Andthenmakethecontrolsystemmoreclearimageandvivid.Advancedandconvenienttouch-screeninputtechnologyarethesecondhighlightsinthedesign.Becauseitapplyaconvenientinputtotheowners.ThethirdhighlightsisthatLightequipmentofflinedetection.SoWeusefromtimetotimeask,fromthenodeofflinedetection.Inshort,inthisdesign,themasternodetomultipleremotesetupandmonitoringfunctionsoflightequipmentfromthenodeofflinedetection,runcommunicationindicator,updatedinrealtimedisplay.TheslavenodeWithindependentsettings,controlthefunctionofthelampdeviceofthenodefromthenode.Theoverallsystemisreliable,normalcommunication,thecommunicationcongestion,crashesandsoon.Anddevelopsystemsoftwareandhardwarewithacertainsignificanceofapplicationtoachieveeffectivecontrolofthelightingequipment.Keyword:CANbus;node;Lightingcontrol;TFT;Touchscreentechnology;SDcard广西科技大学(筹)毕业设计论文目录III目录摘要.........................................................................................................................................I ABSTRACT....................................................................................................................................II 1绪论......................................................................................................................................1 1.1课题背景........................................................................................................................1 1.2现场总线的技术特点和现状........................................................................................1 1.3课题的提出及意义........................................................................................................2 2系统设计..............................................................................................................................3 2.1设计要求........................................................................................................................3 2.2总体设计方案................................................................................................................3 2.2.1设计思路.................................................................................................................3 2.2.2方案论证与比较.....................................................................................................4 2.2.2.1主控制器.........................................................................................................4 2.2.2.2CAN控制器选择..............................................................................................4 2.2.2.3CAN收发器......................................................................................................5 2.2.2.4CAN通信电缆..................................................................................................5 2.2.3系统结构框图.....................................................................................................