版本协议

GPL 3.0

专业版
#第九届立创电赛#低功耗温湿度传感器

创建时间:4个月前

77 0

描述

<p><div class="document"> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><em><span style="font-size: 18pt;"> 1、项目功能介绍</span></h3> <hr class="horizontal-splitline normal-bold-2" /> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt; color: #000000;"><strong><span style="color: #95a5a6;"><span style="font-size: 14pt;"><span style="color: #000000;">可显示温湿度数值,硬件电路设计了蜂鸣器</span></span><span style="color: #000000;">和按键电路,但按键和蜂鸣器,按键这块不是很稳定,因此没有去实现闹钟功能。</span></span></strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;"><strong>MCU在软件设计上使用停止模式,LED2(左上角)不焊,福禄克万用表实测唤醒一次的电流大概在1-2MA。</strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"></em>2、硬件部分</span></h3> <hr class="horizontal-splitline normal-bold-2" /> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;"><strong>原理图中增加了<span style="color: #2dc26b;">TP测试点</span>和<span style="color: #2dc26b;">串口</span>,可使用USB转TTL串口工具进行Debug。</strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;"><strong>有条件的小伙伴们可以使用示波器接上<span style="color: #2dc26b;">TP测试点</span>去查看I2C波形,下图是使用示波器抓取并解析的I2C波形。</strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;"><strong>我们在学习I2C SPI CAN等协议的过程中,会遇到数据如何发送 有无丢包 懂得原理但是代码不会写等问题。</strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;"><strong>因此使用示波器来查看数据包的收发过程 格式等,能更加深刻的理解这些协议。</strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;"><img src="//image.lceda.cn/oshwhub/d28d8ce77b854c6ebc98998a52ad48dc.jpg" alt="I2C协议数据" width="1906" height="1431" /></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;"><span style="color: #2dc26b;">TP测试点</span>可焊接导线使用示波器探头夹在导线上,不使用排针引出最主要的原因是杜邦线接在排针上容易松动造成接触不良,其次是板子没有设计这么大</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;">电路添加了蜂鸣器和按键电路,新增闹钟功能,但出现了按下左边按键却把右边按键也触发了(有几率触发),因此并不是特别稳定,MCU内部上拉,按键只有电容消抖并没加上拉,最后找了一圈也没有找到问题在哪,也欢迎复刻的大佬们指出问题所在!因此闹钟功能就没有实现,侧边按键设置为低功耗模式的唤醒按键。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;">传感器接口电路设计则参照SHT40的DataSheet,</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8; text-align: justify;"><img src="//image.lceda.cn/oshwhub/3e4a552b685e4abf9871df941e360a7c.png" /></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;">数码管驱动使用SN74HC595这款芯片,数码管在淘宝购买会比商城便宜一些</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8; text-align: justify;"><img src="//image.lceda.cn/oshwhub/ac6959512afe489193a2ee583d2975be.png" /></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8; text-align: justify;"><span style="font-size: 18pt; color: #e03e2d;">注意事项</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8; text-align: justify;"><span style="font-size: 18.6667px;">SN74HC595管脚密集不容易焊接,可采用锡膏+加热台的方式进行焊接。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height: 1.8;">&nbsp;</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 18pt;">*3、软件部分</span></strong></h3> <hr class="horizontal-splitline normal-bold-2" /> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;">MCU使用硬件I2C与SHT40进行通信,下图是伪代码(Datasheet),I2C接口收到数据后处理转成温度值。这里写的较为粗略,需要多查看数据手册。具体实现在附件中可进行下载。有任何疑问欢迎在评论区留言看到会回复。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/487712a21f854ea7a517d12cc7fbc6a9.png" /></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;">SHT40虽然使用的是I2C协议,但我们使用的指令较少也就读取温湿度数据,在应用的过程中主要使用第一条指令。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/3ad1e32b5c5748e18554d0c337da7bc3.png" /></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> </div></p>

文档

BOM

暂无

附件

附件名 下载
BOM.xlsx
STM32G030_U.zip

成员

评论(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