毕业论文(设计)基于DMX512 协议的灯光控制信号无线传输设计.doc

上传人:仙人指路1688 文档编号:4145318 上传时间:2023-04-07 格式:DOC 页数:7 大小:608KB
返回 下载 相关 举报
毕业论文(设计)基于DMX512 协议的灯光控制信号无线传输设计.doc_第1页
第1页 / 共7页
毕业论文(设计)基于DMX512 协议的灯光控制信号无线传输设计.doc_第2页
第2页 / 共7页
毕业论文(设计)基于DMX512 协议的灯光控制信号无线传输设计.doc_第3页
第3页 / 共7页
毕业论文(设计)基于DMX512 协议的灯光控制信号无线传输设计.doc_第4页
第4页 / 共7页
毕业论文(设计)基于DMX512 协议的灯光控制信号无线传输设计.doc_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《毕业论文(设计)基于DMX512 协议的灯光控制信号无线传输设计.doc》由会员分享,可在线阅读,更多相关《毕业论文(设计)基于DMX512 协议的灯光控制信号无线传输设计.doc(7页珍藏版)》请在三一办公上搜索。

1、基于DMX512协议的灯光控制信号无线传输设计华东师范大学 梁艺, 周卫星, 陈炳锐单片机与嵌入式系统应用. 2009年第7期引 言随着数字化技术和计算机技术的广泛普及,舞台和演播厅等灯光控制系统由传统的模拟控制转变为数字控制。为了解决各厂家设备兼容性问题,美国剧场技术协会(USITT)制定了DMX512协议标准。由于该协议简单实用,目前几乎所有的灯光及舞台设备生产厂商都支持该控制协议,使之成为灯光控制的国际标准。由于协议规定DMX512信号通过EIA-485有线线缆进行传输,这就造成在条件不利于有线布线的环境下设备安装困难。因此,设计一种短距离无线通信系统来代替有线线缆完成信号的传输就显得十

2、分必要。1 DMX512协议简介DMX512协议适用于一点对多点的主从式灯光控制系统,主控制器往总线发送控制时序,总线上的其他从灯光设备接收总线数据,提取其对应通道的数据,完成控制信号的接收。协议规定控制信号数据包的传输通过异步通信的方式进行。一个DMX512数据包包含起始码和512个数据帧。数据帧内包含1个起始位(低电平)、8个位数据和2个停止位(高电平),没有奇偶校验。DMX512的信号数据传输率为250 kbps,数据帧每位宽度为4s,发送一帧需要44s。一个数据帧代表了一路控制通道,因此该协议支持512路控制通道。一般舞台灯光设备可以同时接受多路通道控制。接受的通道数越多,接收的控制数

3、据量也越大,灯光的表现能力也就越强。譬如,某些舞台激光灯可以根据需要投射出不同图案、颜色甚至字符。 DMX512数据包的传输要符合一定的格式和时序要求。主要包含1个至少88 s的低电平输出起始标志(Break)、起始码帧、512个数据帧和最后的数据包结束标志(高电平)。控制器和接收器只有满足DMX512数据包的时序要求,才能正常完成主从机之间的通信。具体的信号时序如图1所示。2 系统硬件设计21 系统设计框图系统设计的目的是利用无线传输代替有线电缆,解决有线布线困难的问题,因此在设计上必须满足轻便易安置的条件,以保证与原有线系统无缝结合。如图2所示,整个系统的硬件结构由微控制器单元(MCU)、

4、射频收发单元和电源管理单元3部分组成。在工作方式上,一方面发射模块的MCU单元接收DMX512控制端的总线数据,分析并拆解总线数据,然后将数据经过适当处理之后通过射频发送单元发送出去;另一方面接收模块在接收无线数据之后,由MCU单元将数据整合重组,在接收端总线恢复DMX512控制信号。这样设计的好处是可以将有线和无线传输相结合。在接收端架设一个无线接收模块就可以保证该区域DMX512控制信号得到有效传输,并不需要为每个设备都安置一个无线接收模块。22 微控制器单元本系统的微控制器采用了STC系列单片机STC12C5410。该单片机含有12 KB的Flash存储器、512字节RAM、异步串口(U

5、ART)和内部PLL单元等。内置的SPI总线控制器可以方便地与射频芯片CC1100通信,而内部的ISP(在线可编程)模块允许用户直接通过串口下载程序,给系统软件升级带来便捷条件。由于DMX512的数据波特率为250 kbps,所以选取16 MHz晶振作为时钟源,以便产生同频波特率。23 射频收发单元CC1100是一款低功耗单片射频收发芯片,具有通信距离远、功耗低、接口灵活等优点。该芯片主要设定工作在315 MHz、433 MHz、868 MHz和915 MHz的工业、科学和医学波段;数据速率支持12500 kbps的可编程控制;提供-3010 dBm的输出功率;最大空地发射距离大于200 m,

6、工作电压为1836 V;最大支持64字节的接收和发送FIFO。设计人员可以通过SPI接口完成内部寄存器配置,读写接收发送FIFO等内部控制。24 接口电路设计接口电路的设计主要包括2部分:DMX512总线与单片机之间的通信,以及单片机控制 CC1100射频模块收发数据。由于DMX512总线数据帧格式与通用异步串口(UART)格式基本兼容,因此系统与DMX512总线的通信利用串口通信接口。但DMX512信号的电气接口标准是EIA-485,与单片机的TTL电平接口不兼容,要实现相互通信,需要采用电平转换芯片作为桥接电路。在分解和还原DMX512总线数据上,分别采用MC3486和MC3487。在系统

7、发送端,通过MC3486将DMX512总线的差分数据转换为TTL电平数据,由单片机的串口接收数据;另外,串口的该引脚还同时连接到单片机的P32INTO口,用于识别DMX512总线的起始标志(Break),提前通知单片机准备接收总线数据。在系统接收端,通过MC3487将单片机串口TTL电平数据转换为DMX512差分数据。对CC1100的内部寄存器配置和FIFO单元读写都通过单片机4线SPI总线接口来完成。MISO和MOSI分别是数据发送、接收端口,SCLK是同步时钟,SS用作器件的片选信号。CC1100的GD02信号用作内部FIFO的状态信号,用于提示单片机FIFO空间已满。发射和接收模块接口示

8、意图如图 3所示,发射模块与接收模块的结构基本一致,只是通信数据流方向相反。 3 系统软件实现31 主要程序流程系统上电后首先进行初始化配置,包括IO端口输入输出状态配置、串口配置、SPI接口设置、CC1100寄存器配置,以及无线传输数据格式的配置,使系统处于正常工作状态。此时主发射模块等待DMX512总线数据的到来。一旦DMX512数据包起始标志出现,即打开单片机串口,等待串口接收中断产生。中断产生之后单片机缓存总线数据,激活CC1100,并向其发送FIFO中写入发送数据,然后无线发送出去。接收模块的工作流程和发送模块相反。在初始化完成之后,单片机设置好CC1100的FIFO寄存器,等待FI

9、FO产生外部中断。这里外部中断被用作无线数据接收成功的标志。FIFO中断产生后,单片机通过SPI总线缓存FIFO中的数据,并立刻通过串口模拟DMX512时序,恢复总线信号,完成信号的无线传输。发送和接收数据流程如图4所示。32 自定义通信数据格式虽然CC1100的传输数率比DMX512的时序速率要高,但毕竟CC1100的FIFO有限,不可能把一个DMX512数据包一次性全部发送出去,因此在主从端之问必须协商一种合适的数据通信格式。CC1100支持4种格式的数据包,分别是:定长(小于255字节)、变长(小于255字节)、无限长和有限长。完整的数据包包括前导码、同步字、数据长度、地址、有效数据和C

10、RC校验。本系统采用有效数据为32字节的有限长格式,具体的数据格式如下:DMX512的数据包中包含有512路调光数据,而CC1100发送一次数据包只包含32个有效数据,因此在发送时要在CC11OO的地址码段填入该次发送有效数据在总数据包中的序号,以保证接收端在接收的时候按顺序重组成功。33 拆解和重组DMX512总线数据系统在对DMX512总线数据的拆解和重组过程中,都利用了单片机内部的串口单元。但DMX512总线数据时序与单片机UART串口不完全相同,因此在使用的时候需要做如下修正。主发射端对DMX512总线数据的拆解,需要先将串口端口(P31)配置为IO口。当接收到DMX512的起始标志(

11、即P31=0)时,开启定时器 0开始计数,88s溢出中断后准备接收数据。单片机确认MaB(Mark afterBreak)信号出现后,配置串口端口为普通串口,开始缓存数据帧。从接收端在无数据传输时,要把串口端口配置为IO口,并置为高电平。在接收完毕无线数据后,先将串口端口拉低,利用定时器延时超过88 s,完成起始标志(Break)信号的发送。然后配置串口端口为普通串口,按缓存的顺序将数据发送到DMX512总线上。数据发送完成之后,还需要将串口端口还原为普通IO,发送结束信号(小于1 s的高电平),完成DMX512时序要求。4 总 结基于CC1100设计的DMX512灯光控制信号无线传输系统,具

12、有成本低、外围器件少、电路结构简洁的特点。虽然CC11OO标称空旷地发射距离可以达到200 m,但在实际使用时,由于楼宇等建筑物的影响,有效的通信距离为30 m左右。因此利用该系统能实现小范围(如室内环境)将DMX512有线传输转变为无线传输。为了延长系统传输距离,可以考虑在射频收发单元增加功放模块,在保证灯光数据实时传输的条件下,降低通信速率,提高系统传输的稳定性。Editors note: Judson Jones is a meteorologist, journalist and photographer. He has freelanced with CNN for four yea

13、rs, covering severe weather from tornadoes to typhoons. Follow him on Twitter: jnjonesjr (CNN) - I will always wonder what it was like to huddle around a shortwave radio and through the crackling static from space hear the faint beeps of the worlds first satellite - Sputnik. I also missed watching N

14、eil Armstrong step foot on the moon and the first space shuttle take off for the stars. Those events were way before my time.As a kid, I was fascinated with what goes on in the sky, and when NASA pulled the plug on the shuttle program I was heartbroken. Yet the privatized space race has renewed my c

15、hildhood dreams to reach for the stars.As a meteorologist, Ive still seen many important weather and space events, but right now, if you were sitting next to me, youd hear my foot tapping rapidly under my desk. Im anxious for the next one: a space capsule hanging from a crane in the New Mexico deser

16、t.Its like the set for a George Lucas movie floating to the edge of space.You and I will have the chance to watch a man take a leap into an unimaginable free fall from the edge of space - live.The (lack of) air up there Watch man jump from 96,000 feet Tuesday, I sat at work glued to the live stream

17、of the Red Bull Stratos Mission. I watched the balloons positioned at different altitudes in the sky to test the winds, knowing that if they would just line up in a vertical straight line we would be go for launch.I feel this mission was created for me because I am also a journalist and a photograph

18、er, but above all I live for taking a leap of faith - the feeling of pushing the envelope into uncharted territory.The guy who is going to do this, Felix Baumgartner, must have that same feeling, at a level I will never reach. However, it did not stop me from feeling his pain when a gust of swirling

19、 wind kicked up and twisted the partially filled balloon that would take him to the upper end of our atmosphere. As soon as the 40-acre balloon, with skin no thicker than a dry cleaning bag, scraped the ground I knew it was over.How claustrophobia almost grounded supersonic skydiverWith each twist,

20、you could see the wrinkles of disappointment on the face of the current record holder and capcom (capsule communications), Col. Joe Kittinger. He hung his head low in mission control as he told Baumgartner the disappointing news: Mission aborted.The supersonic descent could happen as early as Sunday

21、.The weather plays an important role in this mission. Starting at the ground, conditions have to be very calm - winds less than 2 mph, with no precipitation or humidity and limited cloud cover. The balloon, with capsule attached, will move through the lower level of the atmosphere (the troposphere)

22、where our day-to-day weather lives. It will climb higher than the tip of Mount Everest (5.5 miles/8.85 kilometers), drifting even higher than the cruising altitude of commercial airliners (5.6 miles/9.17 kilometers) and into the stratosphere. As he crosses the boundary layer (called the tropopause),

23、 he can expect a lot of turbulence.The balloon will slowly drift to the edge of space at 120,000 feet (22.7 miles/36.53 kilometers). Here, Fearless Felix will unclip. He will roll back the door.Then, I would assume, he will slowly step out onto something resembling an Olympic diving platform.Below,

24、the Earth becomes the concrete bottom of a swimming pool that he wants to land on, but not too hard. Still, hell be traveling fast, so despite the distance, it will not be like diving into the deep end of a pool. It will be like he is diving into the shallow end.Skydiver preps for the big jumpWhen h

25、e jumps, he is expected to reach the speed of sound - 690 mph (1,110 kph) - in less than 40 seconds. Like hitting the top of the water, he will begin to slow as he approaches the more dense air closer to Earth. But this will not be enough to stop him completely.If he goes too fast or spins out of co

26、ntrol, he has a stabilization parachute that can be deployed to slow him down. His team hopes its not needed. Instead, he plans to deploy his 270-square-foot (25-square-meter) main chute at an altitude of around 5,000 feet (1,524 meters).In order to deploy this chute successfully, he will have to sl

27、ow to 172 mph (277 kph). He will have a reserve parachute that will open automatically if he loses consciousness at mach speeds.Even if everything goes as planned, it wont. Baumgartner still will free fall at a speed that would cause you and me to pass out, and no parachute is guaranteed to work hig

28、her than 25,000 feet (7,620 meters).It might not be the moon, but Kittinger free fell from 102,800 feet in 1960 - at the dawn of an infamous space race that captured the hearts of many. Baumgartner will attempt to break that record, a feat that boggles the mind. This is one of those monumental moments I will always remember, because there is no way Id miss this.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 办公文档 > 其他范文


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号