﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-jlinkcnc</title><link>http://www.cppblog.com/jlinkcnc/</link><description /><language>zh-cn</language><lastBuildDate>Tue, 05 May 2026 12:12:26 GMT</lastBuildDate><pubDate>Tue, 05 May 2026 12:12:26 GMT</pubDate><ttl>60</ttl><item><title>ZigBee变电站无线环境监控系统</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/07/08/211191.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Wed, 08 Jul 2015 13:56:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/07/08/211191.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/211191.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/07/08/211191.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/211191.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/211191.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 引言 变电站作为片区的供电枢纽，其稳定性和安全性与该片区的日常生活紧密相关。现有变电站均配置一套视频及环境监控系统，系统由监控工作站、通信控制器、摄像机、环境量采集设备、报警控制设备、交换机、存储设备等组成，实现对变电站现场视频及环境信息采集、处理、监控等功能，出现异常及时反馈，迅速通知救援，确保变电站安全、稳定运行。该系统意义重大，有着不可替代的作用，然而现有系统普遍采用有线方式进行供电及通信，...&nbsp;&nbsp;<a href='http://www.cppblog.com/jlinkcnc/archive/2015/07/08/211191.html'>阅读全文</a><img src ="http://www.cppblog.com/jlinkcnc/aggbug/211191.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-07-08 21:56 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/07/08/211191.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ZigBee无线气压测量模块的实现</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/07/06/211167.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Mon, 06 Jul 2015 14:37:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/07/06/211167.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/211167.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/07/06/211167.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/211167.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/211167.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在集装箱运输中，对冷藏集装箱可靠性要求很高，除进行强度实验外，还需按要求完成热工性能实验。热工性能实验中需要测量集装箱的气密性，漏热性，制冷性等。 为提高测量的自动化程度，控制测量过程的人为因素，需要设计一套全自动的气密性试验装置。试验装置需要能够精确地测量集装箱的气压，并且通过ZigBee数传模块将测量值发送到接收模块，由接收模块控制流量调节阀开度，调节供气量，保持箱内和环境的压差。 本文着重介...&nbsp;&nbsp;<a href='http://www.cppblog.com/jlinkcnc/archive/2015/07/06/211167.html'>阅读全文</a><img src ="http://www.cppblog.com/jlinkcnc/aggbug/211167.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-07-06 22:37 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/07/06/211167.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>低压配网负荷及漏电流监控的ZigBee通信管理机</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/07/04/211147.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Sat, 04 Jul 2015 15:25:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/07/04/211147.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/211147.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/07/04/211147.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/211147.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/211147.html</trackback:ping><description><![CDATA[<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt" lang="EN-US">0 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt">引言<span lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">一直以来，我国低压电网用电侧处于无法远程监控状态，无法获知漏电流越限信息及故障跳闸原因，更无法对故障进行定位和自动隔离，增加一线员工的工作量。若要解决此问题，必须装设带通信型漏电流动作保护器<span lang="EN-US">(</span>下称智能断路器<span lang="EN-US">)</span>，并把信息实时上传到主站系统进行分析管理。目前常规的智能断路器是通过<span lang="EN-US">RS-485</span>总线或<span lang="EN-US">GPRS</span>模块无线公网直接与主站进行数据交换，但<span lang="EN-US">RS-485</span>总线传输距离短、布线不方便且维护量大，<span lang="EN-US">GPRS</span>模块无线公网由于智能断路器的<span lang="EN-US">GPRS</span>模块节点多，通信费用高且与主站连接造成多并发问题。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本文设计一种用于低压配网负荷及漏电流监控的通信管理机，可与分散在一定区域范围内的智能断路器通过自组网的<span lang="EN-US">ZigBee</span>模块无线传感器网络进行数据通信，统一管理各个分散的智能断路器数据，并可通过<span lang="EN-US">GPRS</span>模块无线公网与监控主站进行数据交换，实现对智能断路器的远程监测、分合控制以及运行参数的设置。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信管理机担负<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467201_1.html"><font color="#000000">ZigBee数据采集</font></a></span>、命令转发、数据及状态量存储等工作，其具体功能包括：定时采集并存储低压线路智能断路器的电压、电流、漏电流数据，并定时上传主站；接收主站命令，向智能断路器发遥控命令实现智能断路器的参数设置、手自动设置及开关分合控制；存储告警事件并立即上传主站。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt" lang="EN-US">1 <span style="mso-spacerun: yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt">通信结构与智能断路器<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: -23.25pt; margin-left: 46.5pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-theme-font: minor-fareast" lang="EN-US"><span style="mso-list: ignore">1.1<span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">通信结构<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信管理机通信结构如图<span lang="EN-US">1</span>所示。与智能断路器间为<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467202_1.html"><font color="#000000">ZigBee模块</font></a></span>无线传感器网络，各个智能断路器作为<span lang="EN-US">ZigBee</span>无线数传网络节点，通信管理机为<span lang="EN-US">ZigBee</span>无线数传网络的协调器，数据传输遵循智能断路器厂家提供的通信协议。与主站间为<span lang="EN-US">GPRS</span>模块无线公网，主站拥有固定的<span lang="EN-US">IP</span>地址，通信管理机上电即自动向特定<span lang="EN-US">IP</span>的主站申请连接，待主站对连接响应后，主站和通信管理机便建立起透明的数据连接。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image002_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image002_thumb_1.gif" width="244" height="141" v:shapes="图片_x0020_1"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 楷体_gb2312; mso-font-kerning: 0pt">图<span lang="EN-US">1 </span>通信管理机通信结构图</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-indent: -23.25pt; margin-left: 46.5pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-theme-font: minor-fareast" lang="EN-US"><span style="mso-list: ignore">1.2<span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">智能断路器<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">智能断路器是具有数字化接口，能接收分合闸命令并能将位置信息、状态信息等与其它设备进行传输的设备，集保护、测量、监控于一体，具备人机对话显示、存储和记忆等功能。本文使用的三相和单相智能断路器选择适用于低压电网的通信型剩余电流断路器，可运行在手动或自动控制方式下，自动控制方式下突变漏电流、缓变漏电流、电流或电压越限智能断路器自动跳闸，并在实时数据帧的数据位最后一位表示自动跳闸原因，手动控制方式下不跳闸；其主要外设包括低压线路的输入口和输出口、状态指示灯、分合闸按钮、<span lang="EN-US">RS-485</span>接口和交流电源；该系列断路器的功能如表<span lang="EN-US">1</span>所示<span lang="EN-US">(</span>只列出主要功能<span lang="EN-US">)</span>，包括读数据、读参数、设置参数、智能断路器分合闸及设置手自动运行方式。智能断路器通过<span lang="EN-US">RS-485</span>接口外扩<span lang="EN-US">ZigBee</span>模块实现与通信管理机的<span lang="EN-US">ZigBee</span>无线通信，外扩的<span lang="EN-US">ZigBee</span>模块包括<span lang="EN-US">RS-485</span>接口、<span lang="EN-US">RS-485</span>转<span lang="EN-US">UART</span>芯片。<span lang="EN-US">ZigBee</span>模块无线传感器网络通信具有自组网、低功耗和抗干扰能力强等优点，方便通信管理机对智能断路器进行数据查询及控制。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image004_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image004_thumb_1.gif" width="244" height="128" v:shapes="图片_x0020_2"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">表<span lang="EN-US">1 </span>智能断路器主要功能</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt" lang="EN-US">2<span style="mso-spacerun: yes">&nbsp; </span></span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt">通信协议设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信管理机与智能断路器数据传输遵循智能断路器厂家提供的通信协议<span lang="EN-US">(</span>具体参见标准<span lang="EN-US">DL/T 645-2007)</span>，下称“终端规约”。主要介绍通信管理机与主站的通信协议，下称“主站协议”。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信管理机与主站数据传输规则采用应答方式，主站主动召唤数据或者通信管理机在正常工作状态下每隔<span lang="EN-US">N </span>分钟<span lang="EN-US">(</span>时间间隔可设置<span lang="EN-US">)</span>主动上报一次数据，当产生告警信息时，通信管理机即时上报告警事件。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">每帧由帧起始符、数据长度、地址域、数据单元标识域、数据单元域、校验域等组成，如表<span lang="EN-US">2</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image006_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image006_thumb_1.gif" width="244" height="118" v:shapes="图片_x0020_3"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">表<span lang="EN-US">2 </span>主站协议通信帧格式</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">数据传送，低字节在前，高字节在后。起始符值为<span lang="EN-US">68H</span>，标识一帧数据的开始；数据长度为原始数据除开始码、数据长度、校验和及结束码外的所有数据的字节数；地址域为通信管理机地址，数据单元标识为传输数据的类型；数据单元为传输的数据；校验和为数据长度开始到校验和之前所有字节的累加和，不计溢出位；结束符为<span lang="EN-US">16H</span>，标识一帧数据的结束。对启动站发送的无需数据返回的命令，从动站校验通过后一律返回接收正确命令，即系统应答报文。对<span lang="EN-US">SOE</span>事件的确认必须加上当前上报的事件计数器。主站协议部分数据单元标识如表<span lang="EN-US">3</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image008_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image008_thumb_1.gif" width="244" height="109" v:shapes="图片_x0020_4"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">表<span lang="EN-US">3 </span>主站协议部分数据单元标识</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt" lang="EN-US">3 <span style="mso-spacerun: yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt">硬件设计</span></b><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt">、<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt" lang="EN-US">3.1 </span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">系统部分<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统部分主要包括中央处理器、存储系统及其外围电路。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3.1.1 </span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">中央处理器<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">中央处理器选用<span lang="EN-US">digi</span>公司工业级<span lang="EN-US">RCM6710</span>模块，工作频率可达<span lang="EN-US">162.5 MHz</span>。相对于<span lang="EN-US">C51</span>、<span lang="EN-US">DSP</span>芯片，该模块具有数据处理能力强、串口多、外设丰富、抗干扰能力强及较高性价比等优点，满足配电网通信规约转换器要求。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">RCM6710</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">模块拥有一个<span lang="EN-US">USB</span>接口、一个以太网口及<span lang="EN-US">6</span>个高速<span lang="EN-US">UART</span>接口。主要硬件资源及外设如图<span lang="EN-US">2</span>所示。<span lang="EN-US">6</span>个高速<span lang="EN-US">UART</span>接口的设计分别为：串口<span lang="EN-US">A</span>通过<span lang="EN-US">SP3232</span>芯片提供<span lang="EN-US">RS-232</span>通信接口，作为调试及程序下载口；串口<span lang="EN-US">B</span>和<span lang="EN-US">D</span>不作开发；串口<span lang="EN-US">C</span>接<span lang="EN-US">ZigBee</span>模块，实现与智能断路器通信；串口<span lang="EN-US">E</span>与中兴<span lang="EN-US">ME3000GPRS</span>模块模块连接，实现与主站间的数据交换；串口<span lang="EN-US">F</span>通过<span lang="EN-US">RSM3485CT</span>芯片提供隔离<span lang="EN-US">RS-485</span>通信接口，作为预留。预留接口是考虑到系统电路设计的通用性及可扩展性，调试成功后可用于其它项目。该模块外设的串口状态指示灯显示各串口是否处于工作状态，板载实时时钟确保上传数据附带精确时间。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image010_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image010_thumb_1.gif" width="244" height="107" v:shapes="图片_x0020_5"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 楷体_gb2312; mso-font-kerning: 0pt">图<span lang="EN-US">2 </span>通信管理机硬件框图</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3.1.2 </span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">存储系统<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">存储系统包括芯片内置存储器<span lang="EN-US">SRAM</span>和板载存储器。内置的<span lang="EN-US">SRAM</span>空间<span lang="EN-US">1 MB</span>，用于程序运行；模块板载<span lang="EN-US">1 MB Serial Flash</span>和<span lang="EN-US">4 MB Serial Flash</span>，分别作为程序存储器和数据存储器，数据存储器存储的内容包括：通信管理机地址、<span lang="EN-US">IP</span>和主动上传时间间隔及智能断路器的历史数据、实时上传数据、运行状态和设置参数等。所存储的设置参数控制着通信管理机的运行，通信管理机启动时，将设置参数加载到<span lang="EN-US">RAM</span>中进行参数配置，一旦主站对参数进行更改，参数区数据立即进行更新并保存其最新状态到<span lang="EN-US">Flash</span>中。主站查询智能断路器的数据、设置参数及运行状态只需访问通信管理机的存储系统，无需再下发智能断路器。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt" lang="EN-US">3.2 </span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">接口部分<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">接口电路包括主要包括<span lang="EN-US">GPRS</span>模块模块、<span lang="EN-US">RS-485</span>通信电路和<span lang="EN-US">ZigBee</span>模块等。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">这里主要介绍<span lang="EN-US">GPRS</span>模块模块。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信管理机<span lang="EN-US">GPRS</span>模块模块选用中兴<span lang="EN-US">ME3000</span>模块，该模块拥有高速<span lang="EN-US">UART</span>接口、<span lang="EN-US">Audio</span>接口、<span lang="EN-US">SIM</span>卡接口、天线接口和<span lang="EN-US">RTC</span>接口。与<span lang="EN-US">RCM6710</span>的接口电路如图<span lang="EN-US">3</span>所示。<span lang="EN-US">RCM6710</span>串口<span lang="EN-US">E</span>与该模块高速<span lang="EN-US">UART</span>连接实现数据交换，<span lang="EN-US">RCM6710</span>的<span lang="EN-US">GPRS</span>模块<span lang="EN-US">_RST</span>和<span lang="EN-US">GPRS</span>模块<span lang="EN-US">_IGT</span>分别实现中兴<span lang="EN-US">ME3000</span>模块的复位和上下电，其中<span lang="EN-US">GPRS</span>模块<span lang="EN-US">_IGT</span>引脚低电平持续时间超过<span lang="EN-US">1 500 ms</span>时模块开启，低电平持续时间超过<span lang="EN-US">2 s</span>时模块关闭。该模块与<span lang="EN-US">RCM6710</span>采用双线模式通信，故使中兴<span lang="EN-US">ME3000</span>模块的<span lang="EN-US">UART</span>控制引脚<span lang="EN-US">/RTS</span>和<span lang="EN-US">/DTR</span>处于低电平。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">中兴<span lang="EN-US">ME3000</span>模块可通过标准<span lang="EN-US">AT</span>命令进行控制和数据传送，支持内嵌<span lang="EN-US">TCP/IP</span>协议，用户可以直接进行透明的数据传输，不用再考虑复杂的网络协议。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image012_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image012_thumb_1.gif" width="244" height="120" v:shapes="图片_x0020_6"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 楷体_gb2312; mso-font-kerning: 0pt">图<span lang="EN-US">3 </span>中兴<span lang="EN-US">ME3000</span>模块硬件原理图</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt" lang="EN-US">4 <span style="mso-spacerun: yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt">程序设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信管理机实现的功能包括<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467206_1.html"><font color="#000000">ZigBee数据采集</font></a></span>、数据存储、规约转换、参数设置和数据传输等，因此采用能处理多任务的μ<span lang="EN-US">C/OS-</span>Ⅱ操作系统。设计时，按照功能划分任务，并根据任务的实时性要求确定任务优先级，还要按照每个任务所处理的数据量的大小，给每个任务分配大小合适的堆栈。</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">按功能将任务划分为定时管理、<span lang="EN-US">GPRS</span>模块通信、数据解析和<span lang="EN-US">ZigBee</span>通信任务。任务创建程序如下：<span lang="EN-US">OSInit()</span>；<span lang="EN-US">OSTaskCreate(TimeDeal</span>，<span lang="EN-US">(void*)0</span>，<span lang="EN-US">2048</span>，<span lang="EN-US">10)</span>；<span lang="EN-US">OSTaskCreate(GPRS</span>模块，<span lang="EN-US">(void*)0</span>，<span lang="EN-US">2048</span>，<span lang="EN-US">11)</span>；<span lang="EN-US">OSTaskCreate(DataCom</span>，<span lang="EN-US">(void*)0</span>，<span lang="EN-US">4096</span>，<span lang="EN-US">15)</span>；<span lang="EN-US">OSTaskCreate(ZBDeal</span>，<span lang="EN-US">(void*)0</span>，<span lang="EN-US">4096</span>，<span lang="EN-US">20)</span>；<span lang="EN-US">OSStart()</span>；定时管理任务是最需保证准时运行的任务，所以优先级最高。其次为<span lang="EN-US">GPRS</span>模块通信任务、数据解析任务，最后为<span lang="EN-US">ZigBee</span>通信任务。当多个任务同时要执行时，优先级高的先运行。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">各任务分别编写，不仅能够提高开发效率，更有助于日后的升级维护。任务操作对象为缓冲区及全局变量，程序在<span lang="EN-US">RAM</span>中开辟了<span lang="EN-US">8</span>个<span lang="EN-US">GPRS</span>模块发送缓冲区和<span lang="EN-US">1</span>个<span lang="EN-US">GPRS</span>模块接收缓冲区，数据顺序为<span lang="EN-US">FIFO(First InFirst Out)</span>结构，采用环形队列实现。数据发送时必须先申请一个空闲的缓冲区，故要对缓冲区进行忙校验，申请缓冲区时也需要对缓冲区的大小进行合理设定。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">任务创建后，根据各任务要求执行的频率，在每个任务建立的循环中写入延迟执行命令：<span lang="EN-US">OSTimeDlyHMSM(h</span>，<span lang="EN-US">m</span>，<span lang="EN-US">s</span>，<span lang="EN-US">ms)</span>。各任务间的关系如图<span lang="EN-US">4</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image014_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image014_thumb_1.gif" width="239" height="244" v:shapes="图片_x0020_7"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 楷体_gb2312; mso-font-kerning: 0pt">图<span lang="EN-US">4 </span>通信管理机任务</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">定时管理任务主要负责计时和延迟，包括<span lang="EN-US">GPRS</span>模块重发延迟、<span lang="EN-US">GPRS</span>模块发送延迟和心跳包发送延迟功能，主动上传数据和心跳包上传时间间隔分别默认为<span lang="EN-US">5 min</span>和<span lang="EN-US">2 min</span>。下面主要介绍数据解析任务、<span lang="EN-US">ZigBee</span>通信任务和<span lang="EN-US">GPRS</span>模块通信任务。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt" lang="EN-US">4.1 </span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">数据解析任务<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">数据解析任务主要负责与主站服务器间的数据交换，操作的对象为全局变量、<span lang="EN-US">GPRS</span>模块发送缓冲区和<span lang="EN-US">GPRS</span>模块接收缓冲区，物理层按照<span lang="EN-US">GPRS</span>模块协议进行数据传输，协议层根据主站规约进行解析和打包。如图<span lang="EN-US">4</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">数据解析任务首先对<span lang="EN-US">GPRS</span>模块接收缓冲区数据根据主站规约进行解析，可分为应答、上行和下行三类处理。应答帧主要为主站对通信管理机主动上传数据、心跳包和告警事件回复的确认帧。上行部分主要为查询数据，含通信管理机的地址、时间、定时上传时间间隔、低压线路的实时数据以及智能断路器参数、开关状态和控制方式。将上行的回复数据按主站规约处理形成回复报文存入<span lang="EN-US">GPRS</span>模块发送缓冲区。下行部分主要为智能断路器的参数设置、手自动设置及分合闸命令，更改对应的变更标志，即全局变量，按规约形成回复确认帧存入<span lang="EN-US">GPRS</span>模块发送缓冲区。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">接着处理通信管理机主动上传数据和心跳包，主动上传数据包括三相智能断路器的三相相电流和三相漏电流以及单相智能断路器的相电压和单相漏电流，上传数据根据主站规约打包，定时存入<span lang="EN-US">GPRS</span>模块发送缓冲区。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt" lang="EN-US">4.2 ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">通信任务<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信任务负责与智能断路器的数据交换。通信协议为智能断路器厂家提供的通信协议，<span lang="EN-US">ZigBee</span>通信任务的操作对象为全局变量、<span lang="EN-US">ZigBee</span>模块数据接收缓冲区和<span lang="EN-US">ZigBee</span>模块数据发送缓冲区，如图<span lang="EN-US">4</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信任务分为下发数据和接收数据两部分。下发数据又分为两类：第一类为每<span lang="EN-US">10 s</span>主动下发一次的<span lang="EN-US">ZigBee</span>数据采集任务；第二类为变更任务，智能断路器无手动模式参数设置，手动模式数据越限不上传告警事件，故在<span lang="EN-US">ZigBee</span>通信任务设计手动模式下的参数设置，若为手动模式的参数设置变更标志，则立即保存新的越限告警参数并上传手动模式参数设置成功告警事件，若为其它变更标志则将变更数据按终端规约打包存入<span lang="EN-US">ZigBee</span>发送缓冲区，若通信管理机重发三次变更命令帧至智能断路器未收到确认帧，则立即上传变更失败告警事件。该部分变更内容包括自动跳闸动作值设置、手自动设置和分合闸。接收数据处理流程：从<span lang="EN-US">ZigBee</span>数据接收缓冲区接收一有效帧，根据终端规约解析，分为采集数据应答帧和变更设置应答帧。采集数据应答帧中数据位的最后一位为自动跳闸原因，首先对该位进行判断，若有跳闸则将带自动跳闸原因告警事件存入<span lang="EN-US">GPRS</span>模块发送缓冲区，并把采集的其它数据位进行存储。变更设置应答帧代表参数设置成功，将相应的变更设置重发次数清零，并把相应的设置成功告警帧存入<span lang="EN-US">GPRS</span>模块发送缓冲区。由于智能断路器无运行状态查询功能，<span lang="EN-US">ZigBee</span>通信任务对设置成功告警事件进行存储，主站可以通过访问通信管理机的存储区数据以得到智能断路器的运行状态及参数。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt" lang="EN-US">4.3 GPRS</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 黑体; mso-font-kerning: 0pt">通信任务<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">GPRS</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">模块通信任务主要为<span lang="EN-US">GPRS</span>模块的登陆和退出连接。首先判断是否因为通信管理机地址或主站服务器地址及端口更改而需要重连网络。如果需要重连网络，必须向主站发送退出登录包后关断连接，同时清除发送和接收缓冲区，清除<span lang="EN-US">GPRS</span>模块登录过程中的错误记录。重连后便可进行<span lang="EN-US">GPRS</span>模块数据的接收和发送。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">各状态变更的流程图如图<span lang="EN-US">5</span>所示。在<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467194_0_1.html"><font color="#000000">GPRS模块</font></a></span>通信中，将通信管理机与主站之间的连接分为四种状态：<span lang="EN-US">GPRS</span>模块<span lang="EN-US">_OFF(</span>代表模块没有正常工作<span lang="EN-US">)</span>、<span lang="EN-US">GPRS</span>模块<span lang="EN-US">_WORK(</span>代表<span lang="EN-US">AT</span>指令正常<span lang="EN-US">)</span>、<span lang="EN-US">GPRS</span>模块<span lang="EN-US">_GW(</span>代表<span lang="EN-US">GPRS</span>模块网关连接正常<span lang="EN-US">)</span>、<span lang="EN-US">GPRS</span>模块<span lang="EN-US">_SOCK(</span>代表<span lang="EN-US">SOCK</span>链接正常<span lang="EN-US">)</span>。每一次执行<span lang="EN-US">GPRS</span>模块通信任务时都会进行连接状态的判断，当连接状态为<span lang="EN-US">GPRS</span>模块<span lang="EN-US">_SOCK</span>才可以正常收发数据。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image016_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_14881/clip_image016_thumb_1.gif" width="174" height="244" v:shapes="图片_x0020_8"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 楷体_gb2312; mso-font-kerning: 0pt">图<span lang="EN-US">5 GPRS</span>通信状态流程</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt" lang="EN-US">5 <span style="mso-spacerun: yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: hya3gj; mso-font-kerning: 0pt">结语<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本文提出一种可实现低压电网负荷及漏电流综合管理的<span lang="EN-US"><a href="http://www.jlinkcn.com"><font color="#000000">ZigBee模块</font></a></span>通信管理机设计方案，该通信管理机可与主站及多台带通信功能的智能断路器组建成漏电监控系统，实时监控多条低压线路，保障低压电网更加安全、可靠的运行。通信管理机系统程序设计采用多任务的设计思路，提高开发效率，也有助于日后的升级维护。本文所设计的<span lang="EN-US">ZigBee</span>模块通信管理机在现场经过数月的运行，通信稳定，数据及命令转发准确，具有很高的可靠性。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast" lang="EN-US"><o:p></o:p></span></p><img src ="http://www.cppblog.com/jlinkcnc/aggbug/211147.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-07-04 23:25 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/07/04/211147.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>基于ZigBee和ARM的智能家居控制系统</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/06/17/210970.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Wed, 17 Jun 2015 14:27:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/06/17/210970.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/210970.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/06/17/210970.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/210970.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/210970.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 随着网络技术和当代通讯技术发展的不断完善，家居智能化已经愈来愈受到人们的关注。智能家居控制系统是以家庭住宅为平台，控制各种家居电器设备，完美地将系统、结构、服务、管理集合为一体的控制系统。 &nbsp;&nbsp;&nbsp; 系统通过对住宅内部环境的长期监测智能的获取用户的居住习惯，并结合人为设定的控制指令自动调节设备状态实现住宅的智能化、人性化，为人们营造一个节能、安全、舒适的居住环境。 &n...&nbsp;&nbsp;<a href='http://www.cppblog.com/jlinkcnc/archive/2015/06/17/210970.html'>阅读全文</a><img src ="http://www.cppblog.com/jlinkcnc/aggbug/210970.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-06-17 22:27 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/06/17/210970.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ZigBee机械设备故障预警系统</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/06/14/210925.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Sun, 14 Jun 2015 13:35:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/06/14/210925.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/210925.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/06/14/210925.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/210925.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/210925.html</trackback:ping><description><![CDATA[<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">0 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">引言<span lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">对电力设备的运行状态进行有效检测进而进行机械设备故障诊断，在故障初期发现、解决问题。热电厂输煤系统设备繁多且分布离散，所处环境恶劣，高粉尘、高电磁干扰，对于输煤系统设备检测大多是根据其机械振动情况来判断设备运行状况的好坏。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">文中介绍了一种基于<span lang="EN-US"><a href="http://www.jlinkcn.com"><font color="#000000">Zigbee无线模块</font></a></span>的低功耗、高可靠性的振动信号采集与处理系统，采用内装<span lang="EN-US">Ic</span>压电加速度传感器，实现对设备振动信号的采集，采集信号处理后，一方面通过<span lang="EN-US">Zigbee</span>无线模块将数据传到<span lang="EN-US">PC</span>机上，一方面通过显示终端<span lang="EN-US">LCD</span>屏显示当前检测设备的振动加速度值。系统设计体积较小，方便携带；功耗低，可以直接用电池供电。在检测过程中可以对设备进行随机监测，有效提高了设备故障诊断的准确性和效率，从而提高了设备正常稳定工作的安全性；减少了巡检人员的劳动强度，使管理更科学化、人性化。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">硬件设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统主要由<span lang="EN-US">5</span>个部分组成，分别是<span lang="EN-US">Zigbee</span>无线数据采集、按键选择、数据显示和数据传输等部分。<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467201_1.html"><font color="#000000">Zigbee无线数据采集</font></a></span>部采用内装<span lang="EN-US">Ic</span>压电加速度传感器<span lang="EN-US">SDl4N14</span>采集设备运行时的振动信息；数据处理部分是系统核心部分，<span lang="EN-US">ATmegal28</span>单片机为系统主处理器；数据显示部分选用<span lang="EN-US">LCDl2864</span>显示屏作为显示终端；选用触发按键作为人机交互终端；数据传输采用<span lang="EN-US">Zigbee</span>无线模块实现无线实时传输。系统整体结构框图如图<span lang="EN-US">I</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image002_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image002_thumb.gif" width="244" height="190" v:shapes="图片_x0020_1"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">1 </span>系统整体结构框图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">1 Zigbee</span>无线数据采集电路设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">选用内装<span lang="EN-US">IC</span>式压电加速度传感器<span lang="EN-US">SDl4N14</span>作为系统信号<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467206_1.html"><font color="#000000">Zigbee无线数据采集</font></a></span>的终端节点，内装<span lang="EN-US">Ic</span>压电式传感器抗干扰能力强，采集信号灵敏度高；<span lang="EN-US">BNC</span>型传感器接口，一根电源线同时也是信号线，一根地线<span lang="EN-US">(</span>外壳接地<span lang="EN-US">)</span>，接口简单且能有效抑制干扰。由传感器输出电压信号经<span lang="EN-US">NE5532</span>一级跟随后，交流耦合去除直流干扰信号，后经电阻<span lang="EN-US">R10</span>、<span lang="EN-US">R11</span>分压抬升<span lang="EN-US">2</span>．<span lang="EN-US">5 V</span>，以满足<span lang="EN-US">AD</span>转换只采样正电压要求，再经一级跟随后接到<span lang="EN-US">TLC2543(AVDC)</span>转换，单片机读取表示当前机械振动的数据信息，其中耦合电容<span lang="EN-US">C0</span>的选择与采集振动频率范围有直接关系。<span lang="EN-US">Zigbee</span>无线数据采集电路见图<span lang="EN-US">2</span>。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image004_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image004_thumb.gif" width="231" height="244" v:shapes="图片_x0020_2"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">2 </span>信号采集电路<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2 </span>数据显示电路设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">为提高系统的工作性能，使其在检测过程中能够实时看到检测数据的变化，在设计时加入了显示模块，选用内置<span lang="EN-US">ST7920</span>控制器<span lang="EN-US">LCDl2864ZB</span>作为系统显示端口，显示振动加速度值，以及由振动加速度值积分得到的速度值、位移值，显示部分电路设计如图<span lang="EN-US">3</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image006_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image006_thumb.gif" width="244" height="156" v:shapes="图片_x0020_3"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">圈<span lang="EN-US">3 </span>振动加速度数据显示和无线传输电路<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">PD5</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">、<span lang="EN-US">PD6</span>、<span lang="EN-US">PD7</span>分别是串行时钟线、串行数据线、片选线，<span lang="EN-US">tV5</span>用来控制液晶屏背光的亮灭，当<span lang="EN-US">30 s</span>内没有任何按键操作，则背光自动关闭，达到降低功耗的目的。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">3 </span>振动加速度数据传输电路设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">由于系统在使用过程中要实现可以随机移动对设备进行检测而又不影响<span lang="EN-US">PC</span>监测主机对检测数据的接收，有线传输由于布线的原因不能够满足设计要求。同时，近年来，无线传感器网络技术发展迅速，运用无线传感网络技术可对数据进行稳定传输。因此，综合实际考虑，系统选用<span lang="EN-US">Zigbee</span>数传模块传感网络传输振动加速度采集的数据。文中选用<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_0_0_1.html"><font color="#000000">Zigbee无线模块</font></a></span><span lang="EN-US">　CC2530</span>，它集成了业界增强<span lang="EN-US">8051 CPU</span>，有<span lang="EN-US">2</span>路<span lang="EN-US">UATR</span>和<span lang="EN-US">1</span>路<span lang="EN-US">SH</span>通信模式，定时计数等功能，适应<span lang="EN-US">2</span>．<span lang="EN-US">4 GHz IEEE 802</span>．<span lang="EN-US">15</span>．<span lang="EN-US">4</span>的<span lang="EN-US">RF</span>收发协议，极高的收发频率有效的抑制干扰。<span lang="EN-US">TXD</span>、<span lang="EN-US">RXD</span>分别与<span lang="EN-US">Atmegal28</span>引脚的<span lang="EN-US">PD2</span>、<span lang="EN-US">PD3</span>相连接，由于<span lang="EN-US">Atmegal28</span>是<span lang="EN-US">5 V</span>电压工作，<span lang="EN-US">CC2530</span>是<span lang="EN-US">3</span>．<span lang="EN-US">3 V</span>电压工作，两者电压不匹配，采用<span lang="EN-US">R17</span>、<span lang="EN-US">R16</span>分压用于匹配两者之间通信电平。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在<span lang="EN-US">PC</span>机处设有接收终端，与<span lang="EN-US">PC</span>机通过串口线进行数据传输。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">4</span>按键设计与信号处理系统<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在工作过程中有时需要手动完成一些设置，比如控制采集频率，是否进行数据传输等，为此设计了功能按键，按键一端接单片机外部中断引脚，一端接地，电路简单。信号处理主要分为硬件和软件上的处理，在硬件上主要有电源的升压、稳压、滤波，<span lang="EN-US">PCB</span>板抗干扰设计等；软件上主要是对传感器采集到的数据进行数字滤波，电压值转换到相应的振动加速度值。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">软件设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">基于<span lang="EN-US">Atmegal28</span>单片机的软件开发采用<span lang="EN-US">AVR Studio</span>，基于<span lang="EN-US">CC2530</span>系列无线传感模块集成开发采用<span lang="EN-US">IAR for 8051</span>。其软件流程如图<span lang="EN-US">4</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image008_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image008_thumb.gif" width="244" height="167" v:shapes="图片_x0020_4"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">4 </span>系统软件主流程图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在整个系统中，主要是通过<span lang="EN-US">Atmegal28</span>来控制<span lang="EN-US">A</span>／<span lang="EN-US">DC</span>转换和通过<span lang="EN-US">CC2530</span>来传输处理后数据。<span lang="EN-US">TLC2543</span>转换精度为<span lang="EN-US">12</span>位，与单片机通过<span lang="EN-US">SPI</span>方式通讯，读取<span lang="EN-US">A</span>／<span lang="EN-US">D</span>转换速率为<span lang="EN-US">20000</span>次／<span lang="EN-US">s</span>．为保证最高的转换精度，设置转换数据的输出位数为<span lang="EN-US">2</span>个字节，即<span lang="EN-US">16</span>位，数据的高四位为空。<span lang="EN-US">CC2530</span>无线传输主要是传输处理后数据到节点再由节点传输到接收终端，接收终端也可向发送终端发送命令，监控发送终端节点运行状况。自动模式下发送终端每隔<span lang="EN-US">1 s</span>自动向接收终端发送一次存在于<span lang="EN-US">Atmegal28</span>缓冲区的数据；手动模式下，巡检人员根据要检测设备情况手动选择要发送的检测设备数据。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">实验结果<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">振动加速度数据的采集在<span lang="EN-US">JZK-20</span>型激振平台上经行测试。激振平台由函数发生器产生标准正弦信号源，经<span lang="EN-US">YE5872</span>型功率放大器放大后传送给激振器，激励激振器产生竖直方向的简谐振动。<span lang="EN-US">SDl4N14</span>传感器固定在激振器接口上采集激振器振动加速度信号。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image010_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_12F49/clip_image010_thumb.gif" width="128" height="240" v:shapes="图片_x0020_5"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">5<span style="mso-spacerun: yes">&nbsp; </span>1 g</span>加速度下不同频率实验对比<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">5</span>为<span lang="EN-US">l g</span>加速度下不同频率试验对比。通过调节函数信号发生器的频率和幅值和功率放大器的放大倍数来控制激振器振动的频率和幅度，图<span lang="EN-US">5</span>是截取部分无线传输到<span lang="EN-US">PC</span>机上的实验数据，通过<span lang="EN-US">Maflab</span>仿真出振动加速度传感器采集处理后的振动数据与驱动激振器的标准函数信号对比图。由图<span lang="EN-US">5</span>中曲线对比分析可知，在相同振幅<span lang="EN-US">1 g</span>的情况下，振动频率由<span lang="EN-US">9</span>．<span lang="EN-US">7 Hz</span>到<span lang="EN-US">10 kHz</span>振动加速度传感器均可采集到振动的峰值，且与理论值相吻合，满足检测准确度要求。图<span lang="EN-US">5</span>曲线中，虚线表示理论值，实线表示测量值。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">4 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">结束语<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">文中介绍了一种基于<span lang="EN-US">Zigbee</span>无线模块的机械设备故障预警中的振动信号<span lang="EN-US">Zigbee</span>无线数据采集与处理系统。通过反复的实验数据对比分析可知，该系统可以有效准确地采集、传输振动加速度信号，满足热电厂输煤系统机械设备故障诊断的要求。<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467198_1.html"><font color="#000000">Zigbee数传模块</font></a></span>的应用提升数据传输的实时性。同时，该系统不仅应用在热电厂输煤系统中，在码头等地也有很广阔的应用前景。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast" lang="EN-US"><o:p></o:p></span></p><img src ="http://www.cppblog.com/jlinkcnc/aggbug/210925.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-06-14 21:35 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/06/14/210925.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ZigBee无线传感器网络接入以太网研究</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/06/13/210917.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Sat, 13 Jun 2015 13:22:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/06/13/210917.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/210917.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/06/13/210917.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/210917.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/210917.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1&nbsp;&nbsp; 引言 无线传感器网络( Wireless Sensor Network,WSN)就是由部署在监控区域内的大量的廉价微型传感器节点组成,通过无线通信方式形成的一个多跳的自组织的网络系统,其目的是协作地感知、采集和处理网络覆盖区域中感知对象的信息,并发给观察者。可以这样说,无线传感器网络使人们可以直接感知客观世界,从而极大地扩展了现有网络的功能和人类认识世界的能力。 &nb...&nbsp;&nbsp;<a href='http://www.cppblog.com/jlinkcnc/archive/2015/06/13/210917.html'>阅读全文</a><img src ="http://www.cppblog.com/jlinkcnc/aggbug/210917.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-06-13 21:22 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/06/13/210917.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>引入估计推理的ZigBee隧道灯光控制系统</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/06/11/210889.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Thu, 11 Jun 2015 13:43:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/06/11/210889.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/210889.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/06/11/210889.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/210889.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/210889.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 0 引言 公路中的隧道照明不同与一般的道路，需要进行24小时不间断的照明，研究表明，一条中等长度的隧道每天的耗能达到800 kW/h,电费开支与能源消耗成为高速公路建设与运营必须面对的问题。公路的隧道作为高速公路中的特殊路段，内外的光亮度差值较大，环境不一致，高度与侧向净宽有限，使得如何在保证车辆的行驶光照强度下进行隧道照明节能，成为目前的研究热点与难点。近些年，我国的各大院校与研究所开展了Zig...&nbsp;&nbsp;<a href='http://www.cppblog.com/jlinkcnc/archive/2015/06/11/210889.html'>阅读全文</a><img src ="http://www.cppblog.com/jlinkcnc/aggbug/210889.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-06-11 21:43 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/06/11/210889.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ZigBee无线传感网络光照度监控系统设计</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/06/09/210865.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Tue, 09 Jun 2015 13:57:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/06/09/210865.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/210865.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/06/09/210865.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/210865.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/210865.html</trackback:ping><description><![CDATA[<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">0 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">引言<span lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">随着农业科技的快速发展。农业信息获取是农业信息化建设的重要组成部分。其中的信息采集和控制技术是不可缺少的重要环节。除了温湿度数据采集之外，农作物生长需要进行光合作用。因此调节适宜的光照度对于提高农作物产量和品质起着至关重要作用田。然而传统的光照度监控系统采用人工监测和控制。具有施工成本高、不易扩展，同时有线传输面临布线复杂，维护升级困难等。随着<span lang="EN-US">ZigBee</span>无线数传传感网络通信技术的快速发展。本文提出一种基于<span lang="EN-US">Windows CE</span>平台和<span lang="EN-US"><a href="http://www.jlinkcn.com"><font color="#000000">ZigBee无线模块</font></a></span>传感网络技术对农作物的光照度进行实时监控的设计方案。通过基于<span lang="EN-US">ZigBee</span>协议的<span lang="EN-US">CC2530</span>单片机和光照度传感器及执行节点结合。可以实现光照度的自动监测和控制功能。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统总体设计和工作流程<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: -36pt; margin-left: 59.25pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-theme-font: minor-fareast" lang="EN-US"><span style="mso-list: ignore">1．1<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">总体设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">为了提高传统农业种植环境监控系统的灵活性和可扩展性，使光照度监控系统更加模块化。在本系统设计中采用<span lang="EN-US">ZigBee</span>无线模块通信方式。系统中的网关模块配置<span lang="EN-US">Windows CE</span>嵌入式操作系统。改变以往网关附加进程较多、响应慢的问题。此外，系统网关附带<span lang="EN-US">Window</span>图形管理界面。一方面为用户提供更直观地光照度数据信息和光照设备的工作状态。另一方面可以通过触摸屏控制和调节所处环境的光照度。系统采用开环控制方式进行控制，系统分为光照度数据采集、嵌入式网关数据处理和光照度控制三大部分。依次完成<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467201_1.html">ZigBee无线数据采集</a></span>、处理和光照度调节。系统总体结构见图<span lang="EN-US">1</span>。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image002_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image002_thumb.gif" width="240" height="236" v:shapes="图片_x0020_1"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">1 </span>光照度监控系统架构组成<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2</span>系统工作流程<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">首先由<span lang="EN-US">ZigBee</span>无线数传协调器建立通信网络，然后<span lang="EN-US">ZigBee</span>无线数传传感器节点和<span lang="EN-US">ZigBee</span>执行节点分别加入该通信网络，这样就可以方便<span lang="EN-US">ZigBee</span>协调器和<span lang="EN-US">ZigBee</span>传感器节点及<span lang="EN-US">ZigBee</span>执行节点之间的数据通信。完成光照度数据的采集、处理和调节，以实现光照度自动监控。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2</span>．<span lang="EN-US">1</span>光照度<span lang="EN-US">ZigBee</span>无线数据采集部分<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">传感器节点在加入<span lang="EN-US">ZigBee</span>网络成功之后。周期性的通过<span lang="EN-US">ADC</span>方式采集光照度传感器数据，该数据即反映了光照度。然后进行数据分析处理。处理的方法是将采集的数据和设定的阀值进行大小比较。若这个数据大于阀值<span lang="EN-US">f</span>光照度偏暗<span lang="EN-US">)</span>则向协调器无线发送开灯命令。否则发送关灯命令。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2</span>．<span lang="EN-US">2</span>嵌入式网关数据处理部分<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">协调器节点可以接收来自<span lang="EN-US">ZigBee</span>传感器节点和<span lang="EN-US">ZigBee</span>执行节点发送的数据信息。根据接收的数据判断是光照度传感器<span lang="EN-US">ZigBee</span>无线数传节点发送的命令字还是<span lang="EN-US">ZigBee</span>执行节点发送的控制状态。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">若是前者。则直接转发命令字到执行节点：若是后者。则将执行器节点的地址保存下来，以便<span lang="EN-US">ZigBee</span>协调器节点向<span lang="EN-US">ZigBee</span>执行节点发送控制命令时用。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2</span>．<span lang="EN-US">3</span>光照度控制部分<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467198_1.html"><font color="#000000">ZigBee数传模块</font></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">执行节点在加入<span lang="EN-US">ZigBee</span>无线数传网络成功之后。循环周期性的向<span lang="EN-US">ZigBee</span>协调器节点发送自己的控制状态。在整个系统中只有协调器节点会向<span lang="EN-US">ZigBee</span>执行节点发送数据。当协调器节点有控制命令发送到执行节点时。执行节点接收并执行该命令，以便完成开灯和关灯操作。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统的硬件设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">1 </span>嵌入式网关模块硬件设计本系统中，硬件设计主要有嵌入式网关模块、光照度数据采集模块和光照度控制模块设计。嵌入式网关硬件结构如图<span lang="EN-US">2</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image004_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image004_thumb.gif" width="244" height="138" v:shapes="图片_x0020_2"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">2 </span>嵌入式网关硬件结构示意图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">网关模块处理器核心采用<span lang="EN-US">ARMll76JZF-S</span>内核的<span lang="EN-US">$3C6410</span>。它是一款三星公司推出的一个<span lang="EN-US">16</span>／<span lang="EN-US">32</span>位<span lang="EN-US">RISC</span>微处理器。<span lang="EN-US">MMU</span>支持<span lang="EN-US">WinCE</span>、<span lang="EN-US">Linux</span>、<span lang="EN-US">Android</span>等操作系统。为移动设备和<span lang="EN-US">3G</span>通信提供低功耗、性能高的应用处理器解决方案<span lang="EN-US">[31</span>。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">利用<span lang="EN-US">S3C6410</span>的<span lang="EN-US">RS232</span>连接协调器<span lang="EN-US">ZigBee</span>无线模块。协调器<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_0_0_1.html"><font color="#000000">ZigBee无线模块</font></a></span>采用德州仪器公司的<span lang="EN-US">CC2530</span>芯片。<span lang="EN-US">CC2530</span>已经在内部固化了<span lang="EN-US">ZigBee</span>协议栈的物理层和<span lang="EN-US">MAC</span>层。它不仅结合了领先的<span lang="EN-US">RF</span>收发器的优良性能。而且能够以很低的材料成本建立强大的网络节点。<span lang="EN-US">CC2530</span>具有不同的运行模式，使得它能够适应超低功耗要求的系统。本系统<span lang="EN-US">CC2530</span>只需配置简单的外围设备就可以组成协调器的收发模块。更好地提供了一个真正的片上系统解决方案。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">存储模块采用<span lang="EN-US">K9F1216UOA(128MB)</span>和<span lang="EN-US">K4S561632f64MBl</span>分别作为系统的<span lang="EN-US">Nand Flash</span>和<span lang="EN-US">SDRAM</span>。<span lang="EN-US">LCD</span>显示模块选用四线电阻式触摸屏接口，可以直接连接四线电阻触摸屏。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2</span>光照度<span lang="EN-US">ZigBee</span>无线模块硬件设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">光照度<span lang="EN-US">ZigBee</span>无线数据采集模块包括<span lang="EN-US">ZigBee</span>数传模块传感节点和光敏传感器。<span lang="EN-US">ZigBee</span>数传模块传感节点和后面的<span lang="EN-US">ZigBee</span>执行节点也是选用德州仪器公司的<span lang="EN-US">CC2530</span>芯片。光敏传感器使用光敏电阻搭载<span lang="EN-US">ZigBee</span>智能传感器底板。用于光的测量、控制及光电转换。当光照度增强时，光敏电阻的阻值会减小。经过电路转换将阻值变化转换为电压变化。最后通过<span lang="EN-US">MD</span>把电压变化转换为数字量来反映光照度的改变。电路图如图<span lang="EN-US">3</span>所示，图中<span lang="EN-US">J18</span>与<span lang="EN-US">CC2530</span>单片机的<span lang="EN-US">PO</span>口相连。<span lang="EN-US">C30</span>为滤波电容。<span lang="EN-US">R21</span>为分压电阻。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image006_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image006_thumb.gif" width="244" height="125" v:shapes="图片_x0020_3"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">3 </span>光照度传感器模块电路图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">3</span>光照度控制模块硬件设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">光照度控制模块包括<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467202_1.html"><font color="#000000">ZigBee模块</font></a></span>执行节点和控制模组。控制模组主要有<span lang="EN-US">6</span>个<span lang="EN-US">5V</span>继电器，两个双层<span lang="EN-US">USB</span>口及控制电路三部分组成。它主要实现对开关量的控制及对<span lang="EN-US">USB</span>接口供电的电器设备控制。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">无线模块执行节点接收来自<span lang="EN-US">Windows CE</span>嵌入式网关<span lang="EN-US">ZigBee</span>协调器节点发送的指令。然后控制这六个继电器的一个端口的通断以实现一个光照设备的开和关操作。光照度控制模块工作方式如图<span lang="EN-US">4</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image008_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image008_thumb.gif" width="244" height="155" v:shapes="图片_x0020_4"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">4 </span>光照度控制模块工作图<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统的软件设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">1 Windows CE</span>嵌入式网关平台构建嵌入式网关采用<span lang="EN-US">ARMll</span>硬件平台。通过指定的<span lang="EN-US">BSP</span>包定制编译其上运行的<span lang="EN-US">Windows CE</span>操作系统。然后根据具体硬件运行环境生成并导出<span lang="EN-US">SDK</span>。这样通过<span lang="EN-US">VS</span>。<span lang="EN-US">NET</span>开发的软件系统能够成功运行在<span lang="EN-US">WindowsCE</span>平台上同。如图<span lang="EN-US">5</span>所示<span lang="EN-US">Windows CE</span>系统开发流程。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image010_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image010_thumb.gif" width="244" height="149" v:shapes="图片_x0020_6"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">5 Windows CE</span>系统开发流程<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2 Windows CE</span>嵌入式网关平台主程序流程设计<span lang="EN-US">ZigBee</span>传感器节点和<span lang="EN-US">ZigBee</span>执行节点分别将光照传感器数据信息和光照设备的亮灭状态信息无线发送至<span lang="EN-US">ZigBee</span>协调器节点，再由<span lang="EN-US">zigBee</span>协调器节点通过<span lang="EN-US">RS232</span>接口传输至<span lang="EN-US">Windows CE</span>嵌入式网关的主程序进行解析处理，显示在<span lang="EN-US">Windows CE</span>界面系统上。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">嵌入式网关主程序流程如图<span lang="EN-US">6</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image012_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image012_thumb.gif" width="171" height="244" v:shapes="图片_x0020_7"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">6 </span>嵌入式网关主程序流程图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">3</span>光照度<span lang="EN-US">ZigBee</span>无线数据采集模块程序流程设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">光照度传感器节点循环周期性采集光照度传感器数据，将采集得到数据和阀值进行大小比较。根据比较的结果得出控制命令，然后发送到协调器节点。若数据大于阀值<span lang="EN-US">(</span>光照度偏暗<span lang="EN-US">)</span>则向协调器无线发送命令字“<span lang="EN-US">1(</span>开灯<span lang="EN-US">)</span>”，否则向协调器无线发送命令字“<span lang="EN-US">O(</span>灭灯<span lang="EN-US">)</span>”，并将发送的命令字前加上一个字节长度的的编号，通过编号可以让协调器分辨是哪个节点发送的数据。光照度数据采集模块程序流程如图<span lang="EN-US">7</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image014_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image014_thumb.gif" width="163" height="244" v:shapes="图片_x0020_8"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">7 </span>光照度数据采集模块程序流程图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">4 ZigBee</span>协调器节点程序流程设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">协调器节点接收无线数据，根据接收到的第一个字节编号判断是哪个节点发送过来的数据。若是光照度传感器节点发送的数据则转发控制命令到<span lang="EN-US">ZigBee</span>执行节点；若是<span lang="EN-US">ZigBee</span>无线模块执行节点发送过来的数据则分析出其地址并保存，留作向执行节点发送控制命令时使用。协调器节点程序流程如图<span lang="EN-US">8</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image016_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image016_thumb.gif" width="167" height="244" v:shapes="图片_x0020_9"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">8 </span>协调器节点程序流程图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">5 ZigBee</span>执行节点程序流程设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">无线模块执行节点循环周期性的向协调器节点发送数据。该数据是执行节点当前的控制状态。另外，当协调器节点有数据发送到<span lang="EN-US">ZigBee</span>执行节点时。执行节点直接根据接收到的命令字是<span lang="EN-US">0</span>还是<span lang="EN-US">1</span>改变自己的控制状态。当接收到的是<span lang="EN-US">1</span>则开灯。接收到的是<span lang="EN-US">0</span>则关灯。从而完成光照度的调节控制。执行节点程序流程如图<span lang="EN-US">9</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image018_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image018" border="0" alt="clip_image018" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_13493/clip_image018_thumb.gif" width="240" height="214" v:shapes="图片_x0020_10"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">9 </span>执行节点程序流程图<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">4 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">测试实验与分析<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">为了保证测控系统的正常可靠工作。对本系统进行运行试验。实验选择在太仓农业科技园的蔬菜种植房内。实验所处的室内光照度为<span lang="EN-US">1800</span>。<span lang="EN-US">2000Lux</span>。实验目的。一方面验证无线网络的光照度数据采集以及数据传输能力。另一方面验证设计的节点能否在复杂的环境下正常工作。经测试。系统数据传输准确可靠，数据丢失率为<span lang="EN-US">0</span>，测量误差不超过<span lang="EN-US">3</span>％。这说明传感器节点及执行节点在复杂环境里的监测和控制的数据较为精准。可以正常工作。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">5 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">结束语<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本文提出了一种基于<span lang="EN-US">ZigBee</span>无线模块的农业种植环境中的光照度监测与自动控制解决方案。设计了以<span lang="EN-US">WindoWs CE</span>嵌人式平台作为网关模块。结合<span lang="EN-US">CC2530</span>芯片为无线通信节点硬件结构。完成了嵌入式网关、光照度<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/vip_doc/10155874_0_0_1.html"><font color="#000000">ZigBee无线数据采集</font></a></span>和光照度控制的软硬设计。运行试验表明：基于<span lang="EN-US">ZigBee</span>无线通信技术的光照度测控系统具有可靠性高、抗干扰性好、组网灵活等特点。能够实现复杂环境下的光照度数据采集及自动控制。从而在有效保证农作物健康成长的前提下提高产量和增加收益。本系统只是实现了对环境光照度的监控，如果更换数据采集节点的传感器和执行节点控制的设备。则该监控系统可以应用于不同的场合，具有广泛的应用前景。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast" lang="EN-US"><o:p></o:p></span></p><img src ="http://www.cppblog.com/jlinkcnc/aggbug/210865.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-06-09 21:57 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/06/09/210865.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ZigBee无线抄表系统集中器设计</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/06/08/210861.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Mon, 08 Jun 2015 13:41:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/06/08/210861.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/210861.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/06/08/210861.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/210861.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/210861.html</trackback:ping><description><![CDATA[<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">0 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">引言<span lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">随着城市居民住宅建设日益发展，独立电能表数量迅速增多，抄表计量也日趋复杂。近年来用电形势越来越紧张，分时电价已势在必行。由于长距离室内外的布线存在着短路、断线隐患，错综复杂的线路使系统调试和维护困难重重，传统的远程集中抄表方式已不能满足电力公司日益增长的业务需求。采用<span lang="EN-US"><a href="http://www.jlinkcn.com"><font color="#000000">ZigBee无线模块</font></a></span>可以很好地解决下段信道的供电效益问题，<span lang="EN-US">ZigBee</span>无线数传抄表技术能够更好地为广大用户提供服务。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">技术是一种近距离、低复杂度、低功耗、低数据速率、低成本的双向无线通信技术，是一组基于<span lang="EN-US">IEEE 802</span>．<span lang="EN-US">15</span>．<span lang="EN-US">4</span>无线标准研制开发的有关组网、安全和应用软件方面的技术。它支持<span lang="EN-US">3</span>种主要的自组织无线网络类型，即星型结构、网状结构和簇状结构。可由多到<span lang="EN-US">65000</span>个无线数传模块组成无线数传网络，每个网络节点间的距离可以从标准的<span lang="EN-US">75 m</span>到扩展后的几百米，甚至几千米。无线数据传输速率高达<span lang="EN-US">76</span>．<span lang="EN-US">8 kb</span>／<span lang="EN-US">s</span>。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>GPRS(</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通用无线分组业务<span lang="EN-US">)</span>技术是在现有的<span lang="EN-US">GsM</span>网络上增加的一种新型分组数据传输技术，具有永久在线、快速登录、高速传输、按量计费、自动切换、安全可靠等优点。现有的<span lang="EN-US">GPRS</span>实际数据传输速率约为<span lang="EN-US">40 kb</span>／<span lang="EN-US">s</span>。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本文采用<span lang="EN-US">ZigBee</span>无线模块实现底层采集器与集中器间的数据通信，通过<span lang="EN-US">GPRS</span>网络实现集中器与抄表中心之问的数据传输。对于居民小区抄表终端分布较密集、距离较近的情况，基于<span lang="EN-US">ZigBee</span>无线模块组网能很好地解决自动抄表系统下段信道出现的问题。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">l </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">总体方案<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">抄表系统整体采用分布式体系结构，用电管理中心与集中器之问<span lang="EN-US">(</span>上层<span lang="EN-US">)</span>数据的采集采用星型结构；集中器与采集器之间<span lang="EN-US">(</span>下层<span lang="EN-US">)</span>的<span lang="EN-US">ZigBee</span>无线数据采集采用总线型结构。无线抄表系统总体结构如图<span lang="EN-US">l</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image002_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image002_thumb_1.gif" width="226" height="244" v:shapes="图片_x0020_1"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">l </span>无线抄表系统总体结构图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">上层通信以电力局中心的系统主站为中心，通过中国移动<span lang="EN-US">GPRS</span>网络与分散于各物业小区的集中器连接，形成<span lang="EN-US">1</span>对<span lang="EN-US">n</span>的连接形式，实现集中器和数据中心系统的实时在线连接；下层通信包括集中器对电表参数的采集、存储、转发，以及转发上位机下达的指令和对电表进行控制操作等。出于成本与通信可靠性的考虑，设计了采集器<span lang="EN-US">(</span>图<span lang="EN-US">l</span>中的<span lang="EN-US">ZigBee</span>无线抄表终端<span lang="EN-US">)</span>。每栋居民楼没置一个采集器，电表通过<span lang="EN-US">RS-485</span>总线或者电力线载波与采集器进行通信，采集器通过天线与小区中心的集中器进行通信。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中器硬件设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在整个系统中，集中器处于信息传递通路的中间位置。该系统的集中器采用无线方式传输数据，是整个系统的核心。集中器的主要功能有：<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(1)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">执行协议转换功能，负责<span lang="EN-US">ZigBee</span>通信协议与<span lang="EN-US">GPRS</span>通信协议之间的转换。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(2)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">承担存储、转发和遇错重发<span lang="EN-US">(ARQ)</span>功能。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(3)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">对用户提供透明连接。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(4)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通信过程使用密匙校验。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">无线数据集中器主要由无线<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_0_0_1.html"><font color="#000000">ZigBee数传模块</font></a></span><span lang="EN-US">(</span>包括<span lang="EN-US">ZigBee</span>模块和<span lang="EN-US">GPRS</span>模块<span lang="EN-US">)</span>、外部存储单元、本地通信接口、微处理器<span lang="EN-US">(MCU)</span>、电源模块和时钟单元组成。集中器硬件框图如图<span lang="EN-US">2</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image004_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image004_thumb_1.gif" width="244" height="168" v:shapes="图片_x0020_2"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">2 </span>数据集中器硬件框图<b style="mso-bidi-font-weight: normal"><span lang="EN-US"><o:p></o:p></span></b></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">1</span>控制芯片的选择<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中器控制芯片采用<span lang="EN-US">Microchip</span>公司生产的增强型<span lang="EN-US">44</span>引脚<span lang="EN-US">TQFP</span>封装闪存<span lang="EN-US">8</span>位单片机<span lang="EN-US">PICl8F4620</span>芯片，其特点如下：<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(1)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">具有<span lang="EN-US">4</span>种晶振模式，<span lang="EN-US">3</span>种类别功耗管理模式。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(2)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">频率最高为<span lang="EN-US">40 MHz</span>，<span lang="EN-US">21 bit</span>程序计数器，可以对<span lang="EN-US">2 MB</span>的程序存储器空间进行寻址，带有<span lang="EN-US">64 KB</span>的闪存。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(3)3</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">个可编程外部中断。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(4)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">主同步串行口模块。支持<span lang="EN-US">3</span>线<span lang="EN-US">SPI(4</span>种模式<span lang="EN-US">)</span>和<span lang="EN-US">I2C</span>主／从模式。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(5)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">增强型可寻址<span lang="EN-US">USART</span>模块，支持<span lang="EN-US">RS-485</span>、<span lang="EN-US">RS-232</span>和<span lang="EN-US">LIN1</span>．<span lang="EN-US">2</span>。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(6)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">最多两个捕捉／比较／<span lang="EN-US">PWM(CCP)</span>模块，其中一个模块具有自动关闭功能。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(7)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">具有自动关闭、白动重启和波特率自动检测功能。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(8)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">最多<span lang="EN-US">13</span>路通道的<span lang="EN-US">10 bit A</span>／<span lang="EN-US">D</span>转换器模块。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(9)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">可编程<span lang="EN-US">16</span>级高／低压检测模块。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(10)8</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">×<span lang="EN-US">8</span>单周期硬件乘法器。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(11)2</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">O-5</span>．<span lang="EN-US">5 v</span>宽工作电压范围。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>PICl8F4620</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">片内<span lang="EN-US">nash ROM</span>用于存储应用程序、通信协议；<span lang="EN-US">UART</span>接口连接<span lang="EN-US">GPRS</span>无线通信模块；<span lang="EN-US">SPI</span>接口连接<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467202_1.html"><font color="#000000">ZigBee模块</font></a></span>；<span lang="EN-US">10 bitA</span>／<span lang="EN-US">D</span>转换器实现电池电压检测、模拟量输入；其余的通用<span lang="EN-US">I</span>／<span lang="EN-US">O</span>端口分别实现集中器的各种控制和传输功能。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2 ZigBee</span>无线模块的设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">Chipcon</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">公司的无线收发芯片<span lang="EN-US">CC2420</span>是一个<span lang="EN-US">2</span>．<span lang="EN-US">4 GHz</span>射频收发芯片，采用<span lang="EN-US">0</span>．<span lang="EN-US">18um CMOS</span>技术，具有低功耗特性，接收器采用低一中频变频接收，发射器采用直接变频发射。<span lang="EN-US">CC2420</span>的性能超过了<span lang="EN-US">IEEE 802</span>．<span lang="EN-US">15</span>．<span lang="EN-US">4</span>标准中要求的性能指标，可以确保长距离、有效、可靠的通信。<span lang="EN-US">ZigBee</span>数传模块由<span lang="EN-US">CC2420</span>芯片和<span lang="EN-US">2</span>．<span lang="EN-US">4 GHz</span>射频天线以及相应的阻抗匹配电路组成。芯片外围电路包括晶振时钟电路、射频输入／输出匹配电路和单片机接口电路<span lang="EN-US">3</span>部分。电路采用<span lang="EN-US">16 MHz</span>无源晶振，其负载电容值约为<span lang="EN-US">27 pF</span>。射频输入／输出匹配电路用来匹配芯片的射频输／<span lang="EN-US">V</span>输出阻抗，使其输入／输出阻抗为<span lang="EN-US">50 n</span>，同时为芯片内部的功率放大器和低噪声放大器提供直流偏置。<span lang="EN-US">CC2420</span>芯片通过<span lang="EN-US">4</span>线<span lang="EN-US">SPI</span>口<span lang="EN-US">(SI</span>、<span lang="EN-US">SO</span>、<span lang="EN-US">SCLK</span>、<span lang="EN-US">CSn)</span>与<span lang="EN-US">PICl8F4620</span>连接，实现芯片工作模式的设置，并实现读／写缓存数据和揍／写状态寄存器。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">从天线接收到的射频信号首先经过低噪声放大器和正交下变频到<span lang="EN-US">2 MHz</span>的中频信号，该混合<span lang="EN-US">VQ</span>信号经过滤波、放大，再通过<span lang="EN-US">A</span>／<span lang="EN-US">D</span>转换器转变成数字信号。后经自动增益控制、数字解调和解扩，最终恢复出传输的正确数据。发射机部分采用直接上变频。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">3 GPRS</span>模块设计<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">GPRS</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">模块采用<span lang="EN-US">Siemens</span>公司的<span lang="EN-US">GPRS</span>无线通信模块<span lang="EN-US">MC35</span>。<span lang="EN-US">Mc35</span>模块主要由射频天线、内部<span lang="EN-US">Flash</span>、<span lang="EN-US">SRAM</span>、<span lang="EN-US">GSM</span>基带处理器、匹配电源和一个<span lang="EN-US">40</span>引脚的<span lang="EN-US">ZIF</span>插座组成。<span lang="EN-US">GSM</span>基带处理器是核心部件，其作用相当于一个协议处理器，用来处理外部系统通过串口发送的<span lang="EN-US">AT</span>指令。射频天线部分主要实现信号的调制和解调，以及外部射频信号与内部基带处理器之间的信号转换。匹配电源为处理器基射频部分提供所需的电源。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中器软件设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中器的通信包括两部分<span lang="EN-US">:<o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(1)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">与主控计算机通过<span lang="EN-US">GPRS</span>网络与集中器进行通信。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(2)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中器通过<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467198_1.html"><font color="#000000">ZigBee无线数传</font></a></span>网络与抄表终端进行通信。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">其中<span lang="EN-US">ZigBee</span>数传模块的设计是实现<span lang="EN-US">ZigBee</span>组网的关键。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">1 ZigBee</span>协议栈<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">完整的<span lang="EN-US">ZigBee</span>协议栈自上而下由应用层、应用汇聚层、网络层、数据链路层和物理层组成。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">Microchip</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">的协议栈根据<span lang="EN-US">ZigBee</span>规范的定义来给逻辑分层，其架构如图<span lang="EN-US">3</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image006_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image006_thumb_1.gif" width="195" height="242" v:shapes="图片_x0020_3"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">3 <span style="mso-spacerun: yes">&nbsp;</span>MicrocKp</span>协议栈架构<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">用户应用程序总是与应用编程支持层<span lang="EN-US">(APS)</span>和应用层<span lang="EN-US">(APL)</span>交互。每层的<span lang="EN-US">API</span>都是简单的<span lang="EN-US">C</span>语言宏，调用下一层的函数。该方法可以避免与模块化相关的典型开销。<span lang="EN-US">APL</span>模块提供高级协议栈管理功能。用户应用程序使用<span lang="EN-US">APL</span>模块来管理协议栈功能。<span lang="EN-US">zAPL.c</span>文件实现了<span lang="EN-US">APL</span>逻辑．而<span lang="EN-US">zAPL</span>．<span lang="EN-US">h</span>文件定义<span lang="EN-US">APL</span>模块支持的<span lang="EN-US">API</span>。用户应用程序将包含五<span lang="EN-US">APL.h</span>头文件来访问其<span lang="EN-US">API</span>。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中器与采集器之间的通信采用定长格式。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">数据帧由数据模式、目标地址、数据长度、数据信息与校验和<span lang="EN-US">5</span>部分构成。数据帧格式如图<span lang="EN-US">4</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image008_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image008_thumb_1.gif" width="244" height="63" v:shapes="图片_x0020_4"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">4 </span>数据帧格式<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">数据帧结构中的数据都是<span lang="EN-US">16</span>进制数。待发送的数据先被送入<span lang="EN-US">256 Byte</span>的发送缓存器中，头帧和起始帧是通过硬件自动产生的。根据<span lang="EN-US">IEEE 802</span>．<span lang="EN-US">15</span>．<span lang="EN-US">4</span>标准，所要发送的数据流的每<span lang="EN-US">4bit</span>被<span lang="EN-US">32</span>码片的扩频序列扩频后送到<span lang="EN-US">D</span>／<span lang="EN-US">A</span>转换器。然后，经过低通滤和上变频的混频后调制到<span lang="EN-US">2</span>．<span lang="EN-US">4 GHz</span>，并经放大后送到天线发射出去。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">．<span lang="EN-US">2</span>软件实现方案<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中器对电表的操作通常是每帧只针对一个电表，数集中器在受到主控计算机下发命令帧后，将数据帧进行拆分，转换成电与表交互的命令格式。集中器主程序的流程如图<span lang="EN-US">5</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image010_4.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1310E/clip_image010_thumb_1.gif" width="183" height="244" v:shapes="图片_x0020_5"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">5 </span>主程序流稷图<b style="mso-bidi-font-weight: normal"><span lang="EN-US"><o:p></o:p></span></b></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中器软转述程启动后，首先进行初始化工作。初始化完成后，启动<span lang="EN-US">GPRS</span>模块工作。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">对于主控计算机下发的命令帧。由于数据量过太或故障造成延缓，集中器可能无法及时应答，造成主控计算机连接失败。为了解决这个问题，抄表前先接收主站命令，将集中器在运行中的数据记录到数据文件中，遇到通信异常时从数据文件中恢复现场数据，创建一个循环队列来存储主控计算机下发的命令帧和发送端口号，并按照对应的主控计算机端口回传应答数据。集中器每次下这命令后可以立既接收到电表的回应。如果因意外不能收到回应，集中器将重发命令。如果<span lang="EN-US">4</span>次重发均未收到回答或回答不正确，则按故障处理。集中器每隔<span lang="EN-US">lO ms</span>对每个电表的运行状态连行一次<span lang="EN-US">ZigBee</span>无线数据采集，根据电表回传数据判断电表获态是否正常。如工作不正常，则进行相应处理，并上报主控计算机。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">4 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">结语<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">采用低成本的<span lang="EN-US"><a href="http://www.jlinkcn.com"><font color="#000000">ZigBee无线模块</font></a></span>组网技术，结合<span lang="EN-US">GPRS</span>网络组建了一个无线传输信道，锁缩短了单段的传输距离，削弱了信遭衰减与干扰的影响，提高了信道传输的稳定性。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">该无线抄表系统具有如下优点：<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(1)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">电表抄录数据及时、准确，系统的传输容量大。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(2)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">可对电表设备进行远程控制、参数调整、开关等控制操作。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(3)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">安装、维护方便，不需要进行专门布线。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(4)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">集中抄表范围广，<span lang="EN-US">GPRS</span>网络覆盖范围广，<span lang="EN-US">ZigBee</span>无线数传技术使扩容无限制。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast" lang="EN-US"><o:p>&nbsp;</o:p></span></p><img src ="http://www.cppblog.com/jlinkcnc/aggbug/210861.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-06-08 21:41 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/06/08/210861.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>基于ZigBee的出租车调度系统</title><link>http://www.cppblog.com/jlinkcnc/archive/2015/06/07/210850.html</link><dc:creator>小鱼王王</dc:creator><author>小鱼王王</author><pubDate>Sun, 07 Jun 2015 13:45:00 GMT</pubDate><guid>http://www.cppblog.com/jlinkcnc/archive/2015/06/07/210850.html</guid><wfw:comment>http://www.cppblog.com/jlinkcnc/comments/210850.html</wfw:comment><comments>http://www.cppblog.com/jlinkcnc/archive/2015/06/07/210850.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/jlinkcnc/comments/commentRss/210850.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jlinkcnc/services/trackbacks/210850.html</trackback:ping><description><![CDATA[<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">1 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">引言<span lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></span></b></p> <p style="text-align: left; text-indent: 24pt; mso-char-indent-count: 2.0; mso-layout-grid-align: none" class="MsoNormal" align="left"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><a href="http://www.jlinkcn.com"><font color="#000000">ZigBee无线模块</font></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">出租车调度系统一定程度上解决了“人找车，车找人”的现象，降低了城市出租车空载率。目前的出租车调度系统主要有：电话调度、<span lang="EN-US">GPS</span>调度、站牌调度等。出租车电话调度具有可随时随地叫车的优点，但需乘客拨打出租车调度中心电话与话务员座席沟通确认乘客位置，方能人工调度附近的出租车前往搭载乘客，交互过程长、调度效率低，不适于快节奏的打车需求。<span lang="EN-US">GPS</span>调度是根据乘客实时的<span lang="EN-US">GPS</span>位置信息进行调度的出租车调度系统，乘客可以通过短信和手机软件发送<span lang="EN-US">GPS</span>位置信息至调度中心，调度中心采用<span lang="EN-US">Dijkstra</span>算法，自动调度附近的出租车搭载乘客。该方法采取自动调度，节省了人工座席服务的支出。但是，由于乘客位置是<span lang="EN-US">GPS</span>信息，需要出租车安装有电子导航仪。电子导航仪价格贵，有升级费用，出租车司机消费高，难以普及。站牌调度系统通过站牌和出租车车载应答子系统进行无线通信，实现城市出租车预约功能。该系统中乘客和出租车司机直接交互，无需调度中心等第三方平台。站牌即乘客位置，各站牌采用统一编码，通过编码信息即可得知乘客所在精确位置，无需<span lang="EN-US">GPS</span>定位系统，乘客定位简单准确。站牌调度虽然具有不依赖调度中心和<span lang="EN-US">GPS</span>定位系统、交互直接、调度快和设备费用低等优点，但目前的站牌调度系统还存在以下不足：<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: left; text-indent: 24pt; mso-char-indent-count: 2.0; mso-layout-grid-align: none" class="MsoNormal" align="left"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(1)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">司机没有乘客信息，仅乘客知道出租车车牌号，而且乘客没有具体凭证，多位乘客叫车时，司机不能辨别乘客，容易出现乘客抢车插队现象；<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: left; text-indent: 24pt; mso-char-indent-count: 2.0; mso-layout-grid-align: none" class="MsoNormal" align="left"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(2)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">根据出租车司机响应结果来决定出租车调度对象，没有考虑出租车具体路程，不能确保是最优的调度结果；<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: left; text-indent: 24pt; mso-char-indent-count: 2.0; mso-layout-grid-align: none" class="MsoNormal" align="left"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">(3)</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">缺乏乘客和出租车司机双方的诚信约束措施，爽约现象频发，造成司乘双方支持信心不足，对推广实施不利。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">为解决上述不足，本文在传统的站牌调度系统上进行较大改进，提出基于物联网<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467202_1.html"><font color="#000000">ZigBee无线模块</font></a></span>的感知、传输、应用三层架构的出租车调度系统方案。方案采用乘客刷卡预约出租车的方式，用以解决乘客插队和诚信问题；通过增加信号中继节点，扩大出租车调度范围；并采用<span lang="EN-US">JN5139</span>作为核心处理模块进行系统设计，用<span lang="EN-US">Jennie ZigBee</span>协议组建<span lang="EN-US">ZigBee</span>无线数传树状拓扑网络，对信息进行<span lang="EN-US">ZigBee</span>数传采集，结合<span lang="EN-US">Cskip</span>地址分配算法和<span lang="EN-US">AODVjr</span>路由算法，选择最佳出租车调度对象，实现乘客“自助式”、可靠、快速的出租车调度。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">2 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统结构<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本系统基于物联网感知、传输、应用三层体系架构，三层功能分布在系统的站牌预约点子系统、车载应答子系统、<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467198_1.html"><font color="#000000">ZigBee数传模块</font></a></span>中继节点和调度管理中心四部分实体中实现。系统在原站牌调度系统基础上，增加架构了感知层<span lang="EN-US">RFID</span>读写器、<span lang="EN-US">ZigBee</span>数传模块中继节点、传输层<span lang="EN-US">GPRS(General Packet RadioService)</span>网关模块和应用层调度管理中心等。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">站牌预约点子系统安装在经常出现打车行为的道路边<span lang="EN-US">(</span>如大型商场、小区、学区、写字楼等<span lang="EN-US">)</span>，乘客通过<span lang="EN-US">RFID</span>刷卡预约车，采用<span lang="EN-US">ZigBee</span>无线模块通信方式发布乘客打车信息、接收出租车司机应答信息，并用<span lang="EN-US">GPRS</span>上传调度结果信息。车载应答子系统安装在出租车内，用于接收乘客打车信息、发送司机应答信息和乘客上车刷卡核对卡号。<span lang="EN-US">ZigBee</span>数传模块中继节点安装在信号较弱处，用于转发<span lang="EN-US">ZigBee</span>无线信号，扩大调度范围。调度管理中心负责接收、保持和查询<span lang="EN-US">GPRS</span>上传的调度结果信息和司乘双方守约爽约信息等，建立乘客预扣定金、出租车爽约扣罚金和扣罚金补偿给守约方的双重机制，促使双方遵守诚信。系统结构如图<span lang="EN-US">1</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image002_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image002_thumb.gif" width="240" height="147" v:shapes="图片_x0020_1"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">1 </span>系统结构<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">3 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统硬件设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">该系统主要通过感知层实现分布在城市内的多站牌点附近的出租车信息进行<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_467193_467201_1.html"><font color="#000000">ZigBee数据采集</font></a></span>调度功能。该层以分布在城市内的站牌预约点为网络协调器节点，信号中继装置为路由器节点，构成不断将行驶进入站牌限定范围内的出租车车载应答子系统加入为网络终端节点的多个动态<span lang="EN-US">ZigBee</span>自组网络。站牌预约点子系统主要包括<span lang="EN-US">ZigBee</span>无线模块、<span lang="EN-US">RFID</span>读写器模块、<span lang="EN-US">GPRS</span>网关模块、显示模块和电源模块，站牌预约点子系统框图如图<span lang="EN-US">2</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image004_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image004_thumb.gif" width="244" height="58" v:shapes="图片_x0020_2"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">2 </span>站牌预约点子系统框图<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">站牌预约点子系统<span lang="EN-US">ZigBee</span>无线模块负责搭建<span lang="EN-US">ZigBee</span>网络，控制<span lang="EN-US">RFID</span>读写器模块工作，无线传输乘客打车信息、将违约／调度结果信息通过串口发送给<span lang="EN-US">GPRS</span>网关模块；<span lang="EN-US">RFID</span>读写器模块供乘客刷卡发送打车信息和预约成功后预扣定金；<span lang="EN-US">GPRS</span>网关模块发送调度结果和爽约信息至调度管理中心；显示模块显示乘客预约打车结果。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>ZigBee</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">无线模块采用<span lang="EN-US">JN5139 Z01 M02(</span>以下简称<span lang="EN-US">JN5139)</span>，其具有使用免费频段、无线自组网等优点，适用于出租车和乘客之问通信。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>RFID</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">读写器模块采用<span lang="EN-US">Mifare RC522</span>读写卡芯片，它是一款低电压、低成本、体积小的非接触式读写卡芯片。<span lang="EN-US">GPRS</span>网关模块采用<span lang="EN-US">SIMCOM</span>公司的<span lang="EN-US">SIM300</span>模块，它具有<span lang="EN-US">GSM</span>和<span lang="EN-US">GPRS</span>功能。显示器模块采用<span lang="EN-US">VL TS COG BTl2864(</span>以下简称<span lang="EN-US">BTl2864)</span>系列液晶显示器。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">站牌预约点子系统中，核心处理器是<span lang="EN-US">JN5139</span>，其他各模块都需要和<span lang="EN-US">JN5139</span>进行通信。<span lang="EN-US">JN5139</span>、<span lang="EN-US">RC522</span>、<span lang="EN-US">SIM300</span>和<span lang="EN-US">BTl2864</span>各通信接口如下：<span lang="EN-US">JN5139</span>具有<span lang="EN-US">SPI</span>串行接口<span lang="EN-US">(</span>可选择五个从属<span lang="EN-US">SPI</span>设备<span lang="EN-US">)</span>和两个<span lang="EN-US">UART</span>；<span lang="EN-US">RC522</span>有<span lang="EN-US">SPI</span>、<span lang="EN-US">12C</span>、<span lang="EN-US">UART</span>三种接口，这三种接口的最高通信速率分别为<span lang="EN-US">10 Mbit</span>／<span lang="EN-US">s</span>、<span lang="EN-US">3400 Kbit</span>／<span lang="EN-US">S</span>和<span lang="EN-US">1 228</span>．<span lang="EN-US">8 Kbit</span>／<span lang="EN-US">S</span>；<span lang="EN-US">SIM300</span>与外部接口为<span lang="EN-US">UART</span>；<span lang="EN-US">BTl2864</span>有串行接口<span lang="EN-US">(SPI</span>接口<span lang="EN-US">)</span>和并行接口两种。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统电路设计按照电路简单、较少使用<span lang="EN-US">JN5139</span>的<span lang="EN-US">DIO</span>接口和通信速率较快的要求，结合各模块的通信接口标准，设计的通信接口电路如图<span lang="EN-US">3</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image006_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image006_thumb.gif" width="183" height="229" v:shapes="图片_x0020_3"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">3 JN5139</span>与各模块接口<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">3</span>中，<span lang="EN-US">JN5139</span>和<span lang="EN-US">BTl2864</span>、<span lang="EN-US">RC522</span>采用<span lang="EN-US">SPI</span>串行接口通信，通信速率分别为<span lang="EN-US">2 Mbit</span>／<span lang="EN-US">s</span>、<span lang="EN-US">1 Mbit</span>／<span lang="EN-US">s</span>；<span lang="EN-US">JN5139</span>和<span lang="EN-US">SIM300</span>之问采用<span lang="EN-US">UART</span>通信，通信波特率为<span lang="EN-US">19200 baud</span>／<span lang="EN-US">s</span>。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">站牌预约点子系统中<span lang="EN-US">JN5139</span>、<span lang="EN-US">RC522</span>、<span lang="EN-US">BTl2864</span>都可采用<span lang="EN-US">3</span>．<span lang="EN-US">3 V</span>供电。而<span lang="EN-US">SIM300</span>需要<span lang="EN-US">4 V</span>供电，而且要求能够提供最大<span lang="EN-US">2A</span>的瞬时电流，取市电<span lang="EN-US">(220V</span>交流电<span lang="EN-US">)</span>输入变压器后得<span lang="EN-US">12 V</span>电压，采用可以调节输出电压的稳压芯片<span lang="EN-US">LM2756</span>。<span lang="EN-US">LM2756</span>输出电压<span lang="EN-US">Vo=1</span>．<span lang="EN-US">23</span>×<span lang="EN-US">(1+Rl</span>／<span lang="EN-US">R2)</span>。其中<span lang="EN-US">R1</span>取<span lang="EN-US">4</span>．<span lang="EN-US">7kQ</span>，<span lang="EN-US">R2</span>取<span lang="EN-US">2kQ</span>，经整流滤波后输出<span lang="EN-US">4</span>．<span lang="EN-US">12V</span>电压，符合<span lang="EN-US">SIM300</span>的工作要求。将此<span lang="EN-US">4</span>．<span lang="EN-US">12 V</span>电压输入稳压芯片<span lang="EN-US">LP2985</span>，输出端接电容滤波，得到较为稳定的<span lang="EN-US">3</span>．<span lang="EN-US">3 V</span>电压，给其它模块供电。本文硬件设计部分主要介绍站牌预约点子系统的硬件电路设计，车载应答子系统各模块与站牌预约点子系统各模块大体相同，将站牌预约子系统的<span lang="EN-US">GPRS</span>网关模块<span lang="EN-US">(SIM300)</span>换成语音识别模块即为车载应答子系统。<span lang="EN-US">ZigBee</span>数传模块中继节点即<span lang="EN-US">JN5139</span>模块加上电源模块。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">4 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">系统软件设计<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 23.25pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">乘客需在站牌预约点刷卡，站牌预约点子系统通过动态<span lang="EN-US">ZigBee</span>自组网络组播一则打车消息。若有多位出租车司机回复，选择路由最短的作为调度对象。站牌预约点子系统调度流程如图<span lang="EN-US">4</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image008_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image008_thumb.gif" width="239" height="244" v:shapes="图片_x0020_4"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 23.25pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">4 </span>站牌预约点子系统流程<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>JN5139</span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通过配置<span lang="EN-US">RC522</span>寄存器控制读写器进行相应工作，需要注意的是在使用<span lang="EN-US">SPI</span>总线读取<span lang="EN-US">RC522</span>的<span lang="EN-US">FIFO Buffer</span>时，写第一次地址读出来的是无效值，写第二次地址返回第一次的数据，写第三次地址返回第二次的数据，以此类推构建出租车调度系统的动态<span lang="EN-US">ZigBee</span>自组网，需对网络内协调器、路由、终端节点进行配置，特别是要不断动态地发现和将行驶进入站牌点限定范围内的出租车车载单元加入成为网络终端节点。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本系统网络默认的信道可能在一些场合中已被其他系统使用，故各站牌预约点子系统可能使用不同信道，终端节点要加入不同信道的<span lang="EN-US">ZigBee</span>无线数传网络，需要进行配置，如设置网络信道为<span lang="EN-US">0</span>，则可实现终端设备自动搜索所在区域的<span lang="EN-US">ZigBee</span>无线数传网络。当信道和个域网<span lang="EN-US">ID</span>都匹配时，加入该网络。当<span lang="EN-US">ZigBee</span>协议栈一段时间没有收到网络应答信息时，判断为离开网络，需要重新设置，并重新寻找网络。系统无线通信采用<span lang="EN-US">Jennic</span>公司的硬件及协议栈，调度中心采用<span lang="EN-US">C++Build</span>的<span lang="EN-US">Socket</span>套接字编程，在<span lang="EN-US">Socket</span>服务器组件中添加<span lang="EN-US">OnClientRead</span>事件处理函数，接收、处理<span lang="EN-US">GPRS</span>上传的数据，存储在<span lang="EN-US">sQLserver</span>数据库中。调度中心、各出租车公司可对出租车司机的基本信息、调度结果和爽约情况进行查询。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">5 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">最佳调度对象选择<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本系统采用<span lang="EN-US">AODVjr</span>路由，<span lang="EN-US">AODVjr</span>对<span lang="EN-US">AODV</span>算法进行了简化和改进，这种按需路由协议在移动性高、负载低的场合性能较高。<span lang="EN-US">AODVjr</span>路由中，当源节点需要向目的节点发送数据而不知道路径时，则将<span lang="EN-US">RREQ</span>分组组播至其邻居节点。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">若收到该分组的邻居节点是带路由功能的节点，则该邻居节点先建立反向路由，该反向路由指向源节点，然后继续组播该<span lang="EN-US">RREQ</span>分组至其自己的邻居节点。不具备路由功能的邻居节点，则通过上述的地址分配算法将该<span lang="EN-US">RREQ</span>分组发送至其子节点或父节点，由其子节点或父节点转发该分组。而目标节点在收到<span lang="EN-US">RREQ</span>分组后，向源节点单播回复<span lang="EN-US">RREQ</span>分组，并将接收到此<span lang="EN-US">RREQ</span>分组的所有节点保存在邻居表中，从而建立到源节点的路由。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在有多个司机回复乘客预约车信息时，系统需要进行最佳调度对象的选择，因布点时相邻中继节点距离基本相同，路由跳数基本上能反映出租车距站牌预约点的距离，可通过路由跳数大小确定较佳的调度对象。但是，当道路中存在护栏或者绿化带时，站牌预约点另一侧的出租车即使路由跳数少，也因出租车不能直接转向到达站牌预约点，而不能作为调度对象。所以，本系统在站牌预约点另一侧添加一个节点<span lang="EN-US">(</span>如图<span lang="EN-US">5</span>中的<span lang="EN-US">F</span>节点，相应增加中继节点后，也可以将<span lang="EN-US">F</span>节点做成站牌预约点，供另一侧的乘客预约车<span lang="EN-US">)</span>，以区分站牌预约点另一侧的出租车，并采用<span lang="EN-US">Cskip</span>算法和最短路由相结合确定系统的最佳调度对象。为父节点所能拥有的最大路由节点数上述算法分配的地址为车载应答子系统加入网络时的地址，<span lang="EN-US">JN5139</span>采用的协议栈中，除了路由表之外还有一个邻居节点表，它保存了可以直接通信的节点的地址。在实际生活中，乘客可能会在站牌预约点下车，这时出租车空载，从而加入网络。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">此时它处在站牌预约点的邻居表中而不是路由表中，所以在比较路由时，需要同时读取路由表和邻居表中的节点进行比较<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">6 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">测试结果<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">实验测试环境为齐齐哈尔市文化大街，道路宽<span lang="EN-US">8 m</span>，路旁有<span lang="EN-US">10 m</span>高的杨树。测试设备采用连接<span lang="EN-US">5db</span>天线的<span lang="EN-US">JN5139 Z01 M02</span>模块，经测试信号传输距离在<span lang="EN-US">500 m</span>左右，本系统测试时最大调度范围为<span lang="EN-US">1500m</span>。测试网络布点如图<span lang="EN-US">5</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image010_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image010_thumb.gif" width="244" height="144" v:shapes="图片_x0020_5"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">5 </span>网络布点<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">节点<span lang="EN-US">A</span>、<span lang="EN-US">B</span>、<span lang="EN-US">C</span>、<span lang="EN-US">D</span>、<span lang="EN-US">E</span>、<span lang="EN-US">F</span>为信号中继装置，除节点<span lang="EN-US">C</span>、<span lang="EN-US">D</span>外，其他相邻节点问的距离为<span lang="EN-US">500m</span>。测试中，车牌号为黑<span lang="EN-US">BTl347</span>和黑<span lang="EN-US">BTl947</span>的两辆出租车都向站牌预约点行驶。乘客在站牌预约点刷卡预约出租车，两辆出租车均同意乘客打车，其中，黑<span lang="EN-US">BTl347</span>出租车消息路由为<span lang="EN-US">B-D-C-O</span>，黑<span lang="EN-US">BTl947</span>的消息路由为<span lang="EN-US">E-D-C-O</span>，二者路由跳数相同，二者距站牌预约点的距离也基本相同<span lang="EN-US">(</span>布点时相邻中继节点问距离基本相同<span lang="EN-US">)</span>。但是，根据我国行驶规则，黑<span lang="EN-US">BTl947</span>出租车不需等待交通灯，能最快赶到站牌预约点，故选择结果最合理的调度对象为车牌号为黑<span lang="EN-US">BTl947</span>的空载出租车。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image012_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image012_thumb.gif" width="240" height="116" v:shapes="图片_x0020_6"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">6 Cskip</span>算法网络地址分配图<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">结合图<span lang="EN-US">6</span>知，黑<span lang="EN-US">BTl947</span>出租车通过<span lang="EN-US">E</span>节点加入网络，其网络短地址在<span lang="EN-US">22</span>～<span lang="EN-US">24</span>之问；同理，黑<span lang="EN-US">BTl347</span>的网络短地址在<span lang="EN-US">28</span>～<span lang="EN-US">30</span>之问，所以，根据出租车短地址即可以进行相同路由跳数下的最佳调度对象选择。站牌预约点子系统调度结果如图<span lang="EN-US">7</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image014_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image014_thumb.gif" width="243" height="211" v:shapes="图片_x0020_7"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">7 </span>系统调度结果<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">测试实例中，乘客共发出<span lang="EN-US">11</span>次打车请求，其中有一次为司机响应后没有前往站牌预约点接乘客，属于出租车司机爽约，调度管理中心据此对出租车司机扣除相应违约金，以维护乘客和出租车司机双方的诚信约束制度。站牌预约的进程信息通过<span lang="EN-US">GPRS</span>传输至调度管理中心。调度管理中心可查询乘客和出租车司机爽约信息、各站牌预约点打车信息和司机详细信息等。实例中调度管理中心对司机李强的详细信息查询结果如图<span lang="EN-US">8</span>所示。<span lang="EN-US"><o:p></o:p></span></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-no-proof: yes" lang="EN-US"><a href="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image016_2.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://www.cppblog.com/images/cppblog_com/jlinkcnc/WindowsLiveWriter/ZigBee_1322C/clip_image016_thumb.gif" width="244" height="231" v:shapes="图片_x0020_8"></a></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><o:p></o:p></span></p> <p style="text-align: center; text-indent: 24pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">8 </span>司机详细信息查询<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">7 </span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">结束语<span lang="EN-US"><o:p></o:p></span></span></b></p> <p style="text-indent: 24pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本文提出了一种基于物联网<span lang="EN-US"><a href="http://www.jlinkcn.com/liqingk/products/10155873_0_0_1.html"><font color="#000000">ZigBee模块</font></a></span>的出租车调度系统，系统基于物联网<span lang="EN-US">ZigBee</span>数传模块技术，融合<span lang="EN-US">RFID</span>、<span lang="EN-US"><a href="http://www.jlinkcn.com"><font color="#000000">ZigBee数传采集</font></a></span>、<span lang="EN-US">GPRS</span>等感知层、传输层技术，实现乘客在站牌预约点刷卡叫车，系统感知层构建的<span lang="EN-US">ZigBee</span>自组网络可合理调度网内空载出租车为乘客提供乘车服务。系统传输层、应用层的构建，实现调度管理中心通过记录、保存调度信息、暂扣乘客卡内预约定金和监督出租车司机守约功能，有效防止出租车司机或乘客爽约，建立出租车司机和乘客之间的诚信。各出租车公司也可查询本公司员工调度纪录确保系统长期稳定运行。系统还可以进行升级与扩展，如在应用层增加物联网预约车平台和手机平台后，乘客预约出租车信息通过<span lang="EN-US">GPRS</span>网关即可传至相应站牌预约点子系统，乘客可通过互联网与<span lang="EN-US">3G</span>／<span lang="EN-US">4G</span>技术预约出租车。本系统为乘客提供一种打车新方式，具有一定的实际应用价值。<span lang="EN-US"><o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-theme-font: minor-fareast; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-fareast" lang="EN-US"><o:p></o:p></span></p><img src ="http://www.cppblog.com/jlinkcnc/aggbug/210850.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jlinkcnc/" target="_blank">小鱼王王</a> 2015-06-07 21:45 <a href="http://www.cppblog.com/jlinkcnc/archive/2015/06/07/210850.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>