版本协议

Public Domain

专业版
#第九届立创电赛#环境检测时钟 and 称

创建时间:5个月前

描述

<p><h1 style="line-height: 1.8;"><span style="color: #e03e2d;">视频链接:<a style="color: #e03e2d;" title="环境检测时钟 and 秤 V1.0" href="<a href="https://www.bilibili.com/video/BV1SAvre1Eah/?vd_source=bafd717f25f19c640ae97599d2643912%22>https://www.bilibili.com/video/BV1SAvre1Eah/?vd_source=bafd717f25f19c640ae97599d2643912&lt;/a>&lt;/span>&lt;/h1" target="_blank">https://www.bilibili.com/video/BV1SAvre1Eah/?vd_source=bafd717f25f19c640ae97599d2643912">https://www.bilibili.com/video/BV1SAvre1Eah/?vd_source=bafd717f25f19c640ae97599d2643912&lt;/a>&lt;/span>&lt;/h1</a>> <h3 style="line-height: 1.8;"><span style="color: #3598db;">不出意外的话会有V2.0版本:<a href="<a href="https://oshwhub.com/keha/intelligent-control%22>https://oshwhub.com/keha/intelligent-control&lt;/a>%EF%BC%88%E5%85%88%E6%8A%8A%E9%93%BE%E6%8E%A5%E6%94%BE%E4%B8%8A%EF%BC%8C%E8%A6%81%E6%98%AF%E9%B8%BD%E4%BA%86%E5%B0%B1%E6%B2%A1%E4%BA%86%EF%BC%89&lt;/span>&lt;/h3" target="_blank">https://oshwhub.com/keha/intelligent-control">https://oshwhub.com/keha/intelligent-control&lt;/a>(先把链接放上,要是鸽了就没了)&lt;/span>&lt;/h3</a>> <h1 style="line-height: 1.8;">实物图</h1> <h3 style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/Qf5EKeHvFp2dgtbutZsG4SmoG1MbnX25fogf4tK9.png" alt="" width="1098" height="622" /></h3> <h3 style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/tkClaiAaRyDHbFq0q7CEBNW7zA8oQ1mhIqHxa1De.png" alt="" width="1098" height="636" /></h3> <p><img src="//image.lceda.cn/pullimage/94geVlf1jieAVYkN9bg7dKTCsRG2CNqEDBLU1cp9.png" alt="" width="1098" height="661" /></p> <p><img src="//image.lceda.cn/pullimage/IvUC4vxHcQarPn27r5tkbGOIoj6kx1GzcscCzjGQ.png" alt="" width="1098" height="908" /></p> <p>&nbsp;</p> <h1 style="line-height: 1.8;">1、项目功能介绍</h1> <h2><span style="color: #b96ad9;">(FreeRTOS实时操作系统)</span></h2> <h2 style="line-height: 1.8;"><span style="color: #b96ad9;">1. 温湿度检测SHT40</span></h2> <h2 style="line-height: 1.8;"><span style="color: #b96ad9;">2. 空气检测SGP30,CO2浓度,TVOC</span></h2> <h2 style="line-height: 1.8;"><span style="color: #b96ad9;">3. 光照强度检测TEMT6000,照度范围:1-1000lux</span></h2> <h2 style="line-height: 1.8;"><span style="color: #b96ad9;">4. 电子秤HX711,量程5KG(可以使用其他量程的称)</span></h2> <h2 style="line-height: 1.8;"><span style="color: #b96ad9;">5. 时钟显示,根据设定时间和温度改变图标,可通过串口修改时间,无需修改代码</span></h2> <h2><span style="color: #b96ad9;">6. 电池供电,带充电保护,防止电池过充和过放,并且自动控制充电电流,当电量不足时会有充电提示</span></h2> <h3 style="line-height: 1.8;"><span style="color: #2dc26b;">传感器检测界面:(SGP30初始化需要一定时间,HX711如果没接上会一直提示Ready,若切换了界面则不显示)</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/df5cbb7abbf24d539434fe727902e459.png" width="251" height="236" /><img src="//image.lceda.cn/oshwhub/355ca2110ff84d8c92cbb94e0b0ab24e.png" /></p> <h3 style="line-height: 1.8;"><span style="color: #2dc26b;">时间显示:显示时间,并根据白天黑夜变换图片(太阳月亮,代码设置)。根据温度会显示,火热,凉爽,冰冷三种状态(温度自定义)。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/8e171f8eeb624ecfbc0f02014ac157cc.png" width="258" height="239" /><img src="//image.lceda.cn/oshwhub/96d4c42392a84be7bea701079f61871a.png" width="256" height="238" /><img src="//image.lceda.cn/oshwhub/c49fd63d234a443a89533400b375323e.png" width="266" height="237" /></p> <h3 style="line-height: 1.8;"><span style="color: #2dc26b;">电池电量检测:若使用电池供电,电量不足时会提示请充电。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/83c6d94b411d4061a6dd6dabee82a716.png" width="265" height="257" /></p> <h3 style="line-height: 1.8;"><span style="color: #2dc26b;">通过串口即可更改RTC时间,无需修改代码。串口数据包格式如图:<span style="color: #b96ad9;"> @2000.01.02.03.04.05.06(加回车换行)</span> 。若设置时间格式错误会有相应提示,时间设置错误也会提示。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/18d00b6e1413444db30760ef4ae847a5.png" /></p> <h1 style="line-height: 1.8;">&nbsp;</h1> <h1 style="line-height: 1.8;">2、硬件部分</h1> <h2 style="line-height: 1.8;"><span style="color: #2dc26b;">1. 主控选择STM32G070CBT6,本来使用STM32G030C8T6,但由于使用Freertos和储存LCD图片,Flash和SDRAM不足,所以换成了STM32G070CBT6。</span></h2> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/0CV7pYPLGq2jNeaQebhWSoHJXMti0i2rpU9pkMjt.png" alt="" width="618" height="658" /></p> <h2 style="line-height: 1.8;"><span style="color: #2dc26b;">2. 电源输入部分:带充电保护,防止电池过充和过放,并且自动控制充电电流,更好的保护电池。type-c母座。</span></h2> <h3 style="line-height: 1.2;"><span style="color: #2dc26b;">最大充电电流:1000mA</span></h3> <h3 style="line-height: 1.2;"><span style="color: #2dc26b;">充电截止电压:4.2V</span></h3> <h3 style="line-height: 1.2;"><span style="color: #2dc26b;">电池过放保护电压:2.4V</span></h3> <h3 style="line-height: 1.2;"><span style="color: #2dc26b;">最大输出电流:2A &nbsp; (建议1A内使用)</span></h3> <h3 style="line-height: 1.2;"><span style="color: #2dc26b;">输出电压:4~12V &nbsp; &nbsp; &nbsp;(可改成更高输出)</span></h3> <h2 style="line-height: 1.2;"><span style="color: #2dc26b;">type-c接电源输入端,蓝灯亮起、红灯快速闪烁,表明有电源接入。</span><span style="color: #2dc26b;">电池充电,红灯常亮。</span><span style="color: #2dc26b;">充满电后蓝灯亮起。</span></h2> <h2 style="line-height: 1.2;"><span style="color: #2dc26b;">当输充电输入端接入电源时,从电源输入端获得电流,如果没有接电源,从电池获得电流,电池电压低于2.4V时,自动关闭输出。</span></h2> <h2><span style="color: #e03e2d; background-color: #fbeeb8;">注意事项:</span></h2> <h2><span style="color: #e03e2d; background-color: #fbeeb8;">第一次接入电池时,可能无电压输出,需要在电源输入端上电激活保护电路。当使用手机充电器供电时,必须要能输出1A以上,否则可能会不能正常充电。</span></h2> <h2><span style="color: #e03e2d; background-color: #fbeeb8;">该电路升压后输出电压可调,焊接时最好先焊接电源部分,并将升压后的输出电压调节至5V,再焊接其他电路(焊接好其他电路先调输出电压为5V,最后才焊AMS1117 3.3V)。</span></h2> <h2><span style="color: #e03e2d; background-color: #fbeeb8;">注意区分电池正负极。</span></h2> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/c745c1e321fc44eb8fdf5dccab7366db.png" /></p> <h2 style="line-height: 1.8;">&nbsp;<span style="color: #2dc26b;">3.&nbsp; 传感器及其他电路</span></h2> <h3 style="line-height: 1.8;"><span style="color: #2dc26b;">串口模块可用于修改时间或打印调试。</span></h3> <p style="line-height: 1.8;">&nbsp;<img src="//image.lceda.cn/oshwhub/018c855660f448109fb4d9365fe867d4.png" /></p> <h2 style="line-height: 1.8;"><span style="color: #2dc26b;">SHT40</span></h2> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/eunTj3bjzINpaTQw91olgsRwfz0rDmTdhf9pDm1m.png" alt="" /></p> <h2 style="line-height: 1.8;"><span style="color: #2dc26b;">SGP30</span></h2> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/HjDGLowN2GIfCP11Hrj9Rpcvr3htxKsxUckO0Nn8.png" alt="" /></p> <h2 style="line-height: 1.8;"><span style="color: #2dc26b;">TEMT6000</span></h2> <h3 style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/4EbdS7xSFiOpaNs3dIhPFUkLlew4oJAO6Zt7s0Sl.png" alt="" /></h3> <h2 title="HX711模块+5KG压力传感器套装 称重传感器 电子秤模块 zigbee代码"><span style="color: #2dc26b;">HX711模块+5KG压力传感器套装 称重传感器</span></h2> <p><img src="//image.lceda.cn/pullimage/9QBxSSBy3szZWsHq7d7BT0dCJzun3M9BDE6hNojl.png" alt="" /></p> <h2 title="黄保凯中景园1.3寸ips TFT显示屏ips液晶屏1.3寸st7789 ips显示屏"><span style="color: #2dc26b;">1.3寸ips TFT显示屏ips液晶屏1.3寸st7789 ips显示屏</span></h2> <p><img src="//image.lceda.cn/pullimage/gKOW1vMIT5OxbFuHjuLcJGmgQ5n9AVF6p87vQ6sl.png" alt="" /></p> <h2 style="line-height: 1.8;"><span style="color: #e03e2d;">单节电池盒本身是插件的,需要小小的改变一下,把负极插脚掰弯成贴片</span></h2> <p><span style="color: #e03e2d;"><img src="//image.lceda.cn/pullimage/KQOxU1YLFsfru7Zt0F3j5zIuY9UzUGNGgznkHBes.png" alt="" /></span></p> <h1 style="line-height: 1.8;">&nbsp;</h1> <h1 style="line-height: 1.8;">3、软件部分</h1> <h2 style="line-height: 1.8;"><span style="color: #2dc26b;">代码已上传附件,注释非常多且详细,入门freertos的基础程序。</span></h2> <ul> <li> <h3><strong><span style="color: #e03e2d;">主程序基本都在app_freertos.c文件</span></strong></h3> </li> <li> <h3><strong><span style="color: #e03e2d;">LCD,SHT40,SGP30,HX711驱动程序在BSP</span></strong></h3> </li> <li> <h3><strong><span style="color: #e03e2d;">光照强度和电池检测ADC相关部分,在adc.c文件</span></strong></h3> </li> <li> <h3><strong><span style="color: #e03e2d;">修改时间的串口数据包处理在stm32gxx_it.c文件</span></strong></h3> </li> </ul> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/2Agt01TmeVN2TZzFrKDz259tMR8ZLJkABn0J2oaQ.png" alt="" /></p> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"><span style="color: #3598db;">任务1:优先级相对较低,温湿度检测及显示。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/Ai6Cio1HaSRt5dfu6swIZgtYpnW18Kv8ZOkSPz3Y.png" alt="" /></p> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"><span style="color: #3598db;">任务2:优先级相对较低,CO2, TVOC浓度检测及显示(SGP30上电后需要初始化一段时间)。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/AQx9zjLKVi331ndfkPPHdzVgkxbI4pLAbL17SslG.png" alt="" /></p> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"><span style="color: #3598db;">任务3:优先级相对较低,光照强度和电池电量检测及显示<span style="color: #b96ad9;">(光照强度转换在资料里有详细介绍)</span>。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/wir0ijdXkrOakHYIw75LRL7iw4CprrQpg7GCg9Zf.png" alt="" /></p> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"><span style="color: #3598db;">任务4:优先级相对较低,称重测量及显示。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/XzEnJIwV1fgSOpipxCb7RUMUqsdK1VfgpLQOHNyY.png" alt="" /></p> <h3 style="line-height: 1.8;"><span style="color: #b96ad9;">称重模块需要校准,详细内查看文档资料&gt;HX711。</span></h3> <p><span style="color: #b96ad9;"><img src="//image.lceda.cn/pullimage/WGYeTaklq7mu2LLECEe34RDXYkZjtpupVcX8tLMw.png" alt="" /></span></p> <p>&nbsp;</p> <p>&nbsp;</p> <h3 style="line-height: 1.8;"><span style="color: #3598db;">任务5:优先级相对较中等,显示时间及每秒更新一次显示时间,显示图标会根据时间和温度变化而改变。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/IhS65OQw7nDV2tssAC5M5RtLKguAY8jp4kg3k6rE.png" alt="" /></p> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"><span style="color: #3598db;">任务6:优先级相对较高,检测是否有按键按下(外部中断)。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/eDdTnUAxNUA6w6IuyClNjqk3rXL7DsCDaFzvQSTr.png" alt="" /></p> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/owJZn687vtOnWWEY1PCdjelzLWgaqRaHJeUW6lKF.png" alt="" /></p> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"><span style="color: #3598db;">任务7:优先级相对最高,但需要被通知后才会执行,检测到电池电量不足,提示请充电。</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/gTo0n1ykW2akTVGSl1lhJDjrCj0Lydw33TQnlouo.png" alt="" /></p> <h1 style="line-height: 1.8;">4、参考资料</h1> <h3><span style="color: #3598db;">附件资料</span></h3> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/kqDuNQQMWj89zCLZKzewQSRhmBhH8p5DyEfOsCFU.png" alt="" /></p> <p style="line-height: 1.8;">&nbsp;</p> <p style="line-height: 1.8;">&nbsp;</p></p>

文档

BOM

暂无

附件

附件名 下载
环境检测时钟and称资料.7z
STM32G070CBT6环境检测时钟and秤.7z
重量测量.mp4

成员

评论(4)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
2343de 回复
<p>大佬是进阶区吧,你做得像产品,我做的像垃圾玩具[emojis:流泪]</p>
keha 回复
<p>我感觉这就是个玩具[emojis:糗大了]</p>
立创电赛 回复
<p>没有看到电赛的logo哦~</p>
keha 回复
<p>@lcds这两个不都是吗[emojis:疑问]<img src="//image.lceda.cn/pullimage/DEXpW0bWyEGOMO0nBIHLh1OV9S8H7vlqKUOFRFcQ.webp" alt="图片"></p>
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