版本协议

GPL 3.0

标签
标准版
#第一届立创大赛#基于高性价比的ESP8266 wifi 控制板 物联网云平台手机监测

创建时间:4年前

3094 5

描述

<p style="font-weight: 400;"><strong>一:作品简介 </strong></p> <p style="font-weight: 400;"> </p> <p><span style="font-weight: 400;"><strong>1:前言:</strong></span></p> <p style="font-weight: 400;">        自从ESP8266wifi模块上市以来,由于其低成本,高性能的特点,越来越受到各个公司的关注,初期个人也花了很多的时间去学习ESP8266的wifi固件编写,由于长期做外包设计,接触到需要定制开发wifi固件的相关公司比较多,也就积累了一定的资源和开发经验,发现近来开发wifi开关的公司挺多,于是产生了开发一个WIFI开发板即可用于初学者学习,也可以供给相关需要开发wifi插座或温湿度检测的公司做为demo样机使用。于是设计了该块wifi开发套件,通过该控制板可以快速学习ESP8266 基于Ecpipse编译平台的SDK固件二次开发,也可以学习最近比较流行的Ardunio平台编程开发。配套有工程源码,视频教程。基于该WIFI控制板写了一套可以采集温湿度,光照强度,远程控制继电器开关,实现了MQTT协议接口,目前可以连接第三方www.tlink.io云服务器平台(根据需要,也可以实现与其它物联网云平台的远程监控)。可以通过该源码深入学习物联网智能软硬件产品的开发,同时利用该源码也可以实现自己产品的商用,缩短研发周期,快速将自己的产品推向市场。配套有原理图,工程源码,视频教程等。可以让没有相关开发经验的WiFi开发人员快速上手。实现自己的wifi通信功能需求。</p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong>2</strong><strong>:使用场景举例:农场、室内等</strong></p> <p style="font-weight: 400;">       该WIFI通讯控制板上集成了温湿度传感器,光照传感器,一路继电器开关信号可以将该WiFi模块放到蔬菜大棚中,手机APP端或手机微信公众账号下,都可以实时远程查看当前蔬菜大棚中的温度、湿度、光照环境是否满足蔬菜的正常生长,如当环境中湿度偏低,干燥时,可以通过手机端远程控制打开控制板的继电器开关,继电器开关控制小型电机自动对蔬菜就行喷水,当湿度满足要求时,自动或手动远程手机操作关闭喷水电机,实现智能化大棚蔬菜种植管理。</p> <p style="font-weight: 400;">      以上仅为个别使用案例,类似的物联网智能化管理需求很多。</p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong>3:硬件外设简介:</strong><br>      该模块采用ESP8266 Wifi模块设计,外围功能如下图所示:</p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/3wFaOllKBn1p64b7JQ0PREtRWK4bGF53QdP47Lq1.bmp"></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong><em>      硬件部分</em></strong><br>            <strong>该WIFI控制板,采用了ESP8266-12F的模块,除了模块上焊接的外设以外,ESP8266其余可扩展接口都已插针的形式引出,方便后续扩展外设使用。</strong><br><strong><em>     WIFI固件部分:</em></strong><br>          <strong>(1):基于Eclipse开发平台一套完整的C语言例程源码,十几个例程,涵盖了ESP8266核心开发的常用功能。</strong><br><strong>          常用</strong><strong>主要包括:</strong><br><strong>              WIFI工作在AP模式下:ESP8266作为Tcp Client 客户端模式通信,ESP8266作为Tcp Server服务器模式通信。实现点对点AP模式下                 WIFI通讯固件开发</strong><br><strong>              </strong><strong>WIFI工作在station模式下(添加到路由器中):ESP8266作为Tcp Client 客户端模式通信,ESP8266作为Tcp Server服务器模式通                 信,ESP8266作为UDP通信,以及8266常规外设的使用例程等。</strong><br><strong>       </strong><strong>(2):基于Arduino开发平台的物联网手机云平台实现温度、湿度、光照、远程继电器控制的工程源代码,集成MQTT协议。</strong><br>    <strong><em>  手机端APP及微信公众号</em></strong><br><strong>       手机端APP,微信公众号软件,支持android和apple手机以及电脑端监测和控制。</strong></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong>二:系统构架图</strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/p2xTOUoaZOHbPDJBrIg3teQY8DquanBytaXFYw9L.bmp"></strong></p> <div style="font-weight: 400;"> </div> <p style="font-weight: 400;"><strong>三:原理图</strong></p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/mfaJ8C5WHPq9CmoXLmOjwn74ZSsGZB9ElS247vhd.png"></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong>四:PCB线路板图及实物图</strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/LiWkmrnk9JEJavKVnMQhABsue0kmH9yiOVOGtTc9.png"></strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/ZXW0UZLq9jvF33tx33ZAlsFggxfZkDnUWGxMAXAa.bmp"></strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/jhYvci64VLPQADtpnIN7JVcsuDzm8yJCMn77jWDt.png"></strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/klE4O20tgR7kZOtMSJxAmj5o8IDbWasRdKON2jQT.bmp"></strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/mAhYi7j2TEDtZA2ypDyTdg9Rsz7OVz0HWz8jjnUq.bmp"></strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/fu2eCEz0mI5YWb3QcEyDhPz5RNNwG06ggM8VW8dr.png"></strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/nEIO4GEWirOlf7G6hbGONIo2j21fTL7QwFTMxGz9.png"></strong></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong>五:软件部分的描述 </strong></p> <p style="font-weight: 400;"><strong>    配备完整的开发环境资料,源码,视频教程等</strong></p> <p style="font-weight: 400;"> </p> <div style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/xtAsIsaAo4gpKPezZOR6aQ3yH4dtmi57OILSF7Q4.bmp"></div> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;">      基于SDK开发的Eclipse平台工程源码:</p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/HokNTlP6A1zOxJKgQuSOlGGzba3Jb0GMkwuqJLCT.bmp"></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;">     <strong>配套Arduino工程源码:</strong></p> <p style="font-weight: 400;">     该工程源码可以采集温湿度,光照强度,远程控制继电器开关,实现了MQTT协议接口,可以连接第三方www.tlink.io 云服务器平台。可以通过该源码深入学习物联网智能软硬件产品的开发,同时利用该源码也可以实现自己产品的商用,缩短研发周期,快速将自己的产品推向市场。</p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/1HsHzc5IxWVi7YFP6t3MEYjhjoiMKqFbhdfJafbf.bmp"></p> <p style="font-weight: 400;"> </p> <div><strong>       手机APP、微信、电脑端远程监控</strong></div> <p style="font-weight: 400;">          该wifi开发板支持MQTT协议,支持手机端App、微信、电脑端网页三种监控和控制方式。三种方式界面显示统           一,可通过任 何一种方式实现远程监控和控制</p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong>六:作品演示</strong></p> <p style="font-weight: 400;">      以下为手机端实际监控界面,手机截图展示:</p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/6FD0OfDIsphIoL5L3Sy57u6vuzV5nezmgTkAQEUV.bmp"></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;">  1:该物联网模块手机端实现的监控界面如下所以,可以显示当前温度、当前环境湿度、</p> <p style="font-weight: 400;">当前光照强度,手机实现远程开关控制,通过开关可以控制家里的用电设备。</p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/9lJpVhDABSbqAcMIRXVfUEJp7bN1CtqL03Cfx2VT.bmp"></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;">2:可以远程查看温度曲线图</p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/R0Ry4tsdvfVErqa1LXeuPB9fqSUoYEFt0eeIBwmT.bmp"></p> <p style="font-weight: 400;">3:可以查看环境湿度变化曲线图</p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/G8ZGZ6I122MToPsMfvCYkv5wiAcoqkVnMH0FrRRE.bmp"></p> <p style="font-weight: 400;">4:可以查看光照强度变化曲线图</p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/BUSONIbHxgnYQ0f0AA7ajHvPqyLOLwNRHtIn65rf.bmp"></p> <p style="font-weight: 400; text-align: left;" align="center">5:可以远程控制继电器接通关断,实现家电设备远程控制</p> <p style="font-weight: 400; text-align: left;" align="center"><img src="//image.lceda.cn/pullimage/zoKopcaQY36IrYpwHbLHdlSIOedrdTmF7nQgMxOn.bmp"></p> <p style="font-weight: 400; text-align: left;" align="center">6:控制中心</p> <p style="font-weight: 400; text-align: left;" align="center"><img src="//image.lceda.cn/pullimage/jOMJXTwFKSh1YeUtFuQ3NLggZX18VFsR5ZVySpu9.bmp"></p> <p style="font-weight: 400;" align="center"> </p> <p style="font-weight: 400; text-align: left;" align="center">7:可以添加触发器,触发器可选择微信、邮箱或短信。当达到触发条件时,</p> <p style="font-weight: 400; text-align: left;" align="center">会根据您的选择发送一条消息到手机端(微信、邮件或短信的方式)</p> <p style="font-weight: 400; text-align: left;" align="center"><img src="//image.lceda.cn/pullimage/L8xtVIgfu1cK5nRqCRKwCXVrkHO4bj1F7MwGKmQW.bmp"></p> <p style="font-weight: 400; text-align: left;" align="center"> 8:如果添加的触发器为温度值报警,则当温度超过设定值时,</p> <p style="font-weight: 400; text-align: left;" align="center">将会发送一条微信到手机端,如下所示:</p> <p style="font-weight: 400; text-align: left;" align="center"><img src="//image.lceda.cn/pullimage/85oLIcb31fT8uCkDnyGhDwpyqSpQieXSB3bnMKGD.bmp"></p> <p style="font-weight: 400;" align="center"> </p> <p style="font-weight: 400;" align="center"> </p> <p style="font-weight: 400;"><strong>六:总结</strong></p> <p style="font-weight: 400;"> 从事嵌入式软硬件开发已经将近10个年头,从板子的原理图到PCB设计,对于一个老兵来说,还是非常顺利的,PCB是在嘉立创打的样板,第一次打了十片,并都已手工焊接出成品,全部测试通过,大部分的元器件也是嘉立创平台采购。</p> <p style="font-weight: 400;">软件部分,工作量就非常大了,前期花了很多时间去研究ESP8266的固件开发,也走了不少弯路,主要原因为该芯片面市不久,很多资料当时还不完善,学习起来非常痛苦,经过了两个月的断断续续的学习后,算是把整套开发都玩熟了。也才开发了该套wifi套件。</p> <p style="font-weight: 400;">在此非常感谢嘉立创提供了这么好的PCB生产及元器件商城平台,给我们工程师产品设计提供了方便。平台提供的贴片业务也已经让公司的样板在使用,大大提高了效率,后续很多板子也准备在该平台贴片。</p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;">七:<strong><em>致谢:</em></strong></p> <p style="font-weight: 400;"><strong><em>非常感谢嘉立创平台主办的该次活动,希望该技术论坛慢慢发展壮大,给国内的工程师一个很好的技术交流,互助学习的平台。</em></strong></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;">#########################################<strong>我是分割线</strong>############################################</p> <p style="font-weight: 400;">    #########################################<strong>我是分割线</strong>############################################</p> <p style="font-weight: 400;"><strong>      基于该开发板,另外还开发了一套esp8266分别工作于station模式和AP模式下的串口WiFi透传固件(该固件已被多个公司,多款产品商用),</strong><strong>在此展示一下:</strong><br><strong>    <em>  该版本固件的优点:</em></strong></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;">           基于8266该块实现了一套系统级的串口转WIFI完美透传固件,该固件自主开发,主要为了实现任何有串口的设备通过该wifi模块实现无线联网功能。该        固件串口接收到的数据包原原本本的发到wifi端,wifi接收到的数据包,直接转发到串口端,实现了真正意义上的串口与wifi通信数据包透传,完美的兼容基于      串口通信的任何硬件产品,只要将该wifi模块接到任何有串口的产品上,便可轻松实现无线线通信,无须修改之前的通信协议,做到老产品在不需要任何修改      串口通信协议的情况下,实现联网功能,大大降低研发成本,快速实现物联网。</p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"> </p> <div style="font-weight: 400;">*******************工作模式******************</div> <p><span style="font-weight: 400;"><strong>一:模块作为station(模块添加到路由器)</strong></span></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong>       模块作为STA是一种最常用的组网方式,由一个路由器AP和许多STA组成,如下图。其特点是AP处于中心地位, STA之间的相互通信都通过AP转发完成。<br></strong></p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/1Txq20y06Uqd5efHBMbBgoBoXYKixvpS5j4A80zT.bmp"></p> <p style="font-weight: 400;"> </p> <p style="font-weight: 400;"><strong> 该模式下实现串口与wifi端的数据透传,如下演示:</strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/OkRLN1mlpmlFxRA64DGIM5uJGIwrfCAKY8zF1akW.bmp"></strong></p> <p style="font-weight: 400;"><strong>      </strong></p> <p style="font-weight: 400;"><strong>二:模块做为AP模式(手机电脑与wifi直连)</strong></p> <p style="font-weight: 400;"><strong>        模块作为AP模式,手机/PAD/电脑可以快速与该模块建立连接,通过HTTP可以登陆模块的内置网页进行参数设置<br></strong></p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/rv83oaIyOTH84mp24ueiLQPKBQ3e1kVLdujugAey.bmp"></p> <p style="font-weight: 400;"><strong>      </strong><strong>   该模式下内部集成HTTP通信协议,内嵌WEB网页,可以通过浏览器方便快捷的查看及设置该模块的相关配置参数</strong></p> <p style="font-weight: 400;"><img src="//image.lceda.cn/pullimage/pJfTmPs2TBYqmCEiJMGj19V6nte7VlJTGB1gz5vR.bmp"></p> <p style="font-weight: 400;"><strong>        管理员登陆界面,需要输入管理员账号及密码,进去后才能修改模块相关的配置参数<br></strong></p> <p style="font-weight: 400;"><strong><img src="//image.lceda.cn/pullimage/xuLSqy944TktwbQuI0T7Re6DxhpsWS5DlEu2pf03.bmp"></strong></p> <p style="font-weight: 400;"> </p> <div><strong>更多项目详情见链接:</strong><a href="http://club.szlcsc.com/article/details_654_1.html" target="_blank">http://club.szlcsc.com/article/details_654_1.html</a></div> <div><strong>本项目归立创社区“护航小牛人”所有</strong></div>

文档

BOM

暂无

附件

暂无

评论(0)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
goToTop
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow