描述
<p><h1 style="line-height: 1.1;" title="#第九届立创电赛#温湿度检测仪训练营7606698A-0711"><span style="color: #b96ad9;"><sup>#第九届立创电赛#——温湿度检测仪训练营</sup></span></h1>
<h2 style="line-height: 1.1;"><span style="color: #3598db;">1、项目简介</span></h2>
<h3 style="line-height: 1.1;"><span style="font-size: 14pt; color: #2dc26b;">简易温湿度检测仪的主要作用是实时、准确地测量并显示当前环境的温度和湿度,帮助人们了解并监控环境状况,从而根据需要做出相应的环境调整。</span></h3>
<h3 class="lake-content" style="line-height: 1.1;"><span class="ne-text">桌面温湿度仪项目使用</span><span style="font-size: 14pt; color: #b96ad9;"><strong><span class="ne-text">STM32G030K6T6</span></strong></span><span class="ne-text">芯片作为主控芯片</span></h3>
<p style="line-height: 1.1;"><span class="ne-text"><img src="//image.lceda.cn/oshwhub/a2dc9e6c99d842d697b3aeea171337b1.png" alt="" width="800" height="487" /></span></p>
<p style="line-height: 1.1;"><span style="font-size: 12pt;"><em>STM32G030x6/x8主流微控制器基于工作频率可达<span style="color: #b96ad9;"><strong>64 MHz</strong></span>的<span style="color: #b96ad9;"><strong>高性能Arm<sup>®</sup> Cortex<sup>®</sup>-M0+ 32位RISC内核</strong></span>。该系列微控制器具有<span style="color: #2dc26b;"><strong>高集成度,适合消费、工业和家电领域的各类应用</strong></span>,也能充分满足物联网, 解决方案的需求。</em></span></p>
<p style="line-height: 1.1;"><span style="font-size: 12pt;"><em>这些器件集成了存储器保护单元 (MPU)、高速嵌入式存储器(8 KB SRAM和高达64 KB带读写保护功能的Flash程序存储器)、DMA、丰富的系统功能、增强型I/O与外设。它们提供了多个标准通信接口(2个I<sup>2</sup>C、2个SPI/1个I<sup>2</sup>S和2个USART)、一个最多19通道的12位ADC (2.5 Msps)、低功耗RTC、高级控制PWM定时器、四个通用16位定时器、两个看门狗定时器和一个SysTick系统定时器。</em></span></p>
<p style="line-height: 1.1;"><span style="font-size: 12pt;"><em>可在-40 °C至85 °C的环境温度和2.0 V至3.6 V的电源电压下工作。经过优化的动态功耗与省电模式相结合,<span style="color: #e03e2d;"><strong><span style="text-decoration: underline;">可轻松实现低功耗应用设计</span></strong></span>。</em></span></p>
<p style="line-height: 1.1;"><span style="color: #b96ad9;"><strong><span style="font-size: 12pt;"><em>VBAT直接电池输入允许保持向RTC和备份寄存器供电。</em></span></strong></span></p>
<p style="line-height: 1.1;"><span style="color: #b96ad9;"><strong><span style="font-size: 12pt;"><em><img src="//image.lceda.cn/oshwhub/6f59f393706f47f5a281331538415777.png" alt="" width="801" height="483" /></em></span></strong></span></p>
<h2 style="line-height: 1.1;"><span style="color: #3598db;">2、项目设计</span></h2>
<h3><span style="font-size: 14pt; color: #2dc26b;"><strong>2.1 原理图设计</strong></span></h3>
<p><span style="font-size: 12pt; color: #2dc26b;"><strong><span style="color: #000000;">本次设计使用的传感器来自</span><span style="font-size: 14pt;"><a title="Sensirion(瑞士盛思锐)" href="<a href="https://list.szlcsc.com/brand_page/506.html" target="_blank">https://list.szlcsc.com/brand_page/506.html</a>" target="_blank" rel="noopener">Sensirion(瑞士盛思锐) </a><span style="font-size: 12pt; color: #000000;">的SHT40这款温湿度传感器模块</span></span></strong></span></p>
<p><span style="font-size: 12pt; color: #2dc26b;"><strong><span style="font-size: 14pt;"><span style="font-size: 12pt; color: #000000;"><img src="//image.lceda.cn/oshwhub/1f196d1e0468447294089500fff84488.png" alt="" width="800" height="523" /></span></span></strong></span></p>
<h4 data-v-09deb568=""><span style="color: #b96ad9;"><em><span style="font-size: 12pt;">±1.8% / max. ±3.5% RH 数字温湿度传感器</span></em></span></h4>
<div data-v-0e8eeac6="" data-v-09deb568="">
<p><em><span style="font-size: 12pt;">符合行业验证的Sensirion温湿度传感器SHT40,拥有极佳性价比。其采用胶带和卷装包装,搭配标准SMD组装工艺,非常适用于大批量应用。</span></em></p>
<p><em><span style="font-size: 12pt;">SHT40基于全新优化的CMOSens®芯片,具有较低的功耗和优化的精度规格。扩展的供电电压范围从<span style="color: #b96ad9;"><strong>1.08 V到3.6 V</strong></span>,使其<span style="color: #b96ad9;"><strong>非常适合于移动和电池驱动的应用</strong></span>。<span style="color: #2dc26b;"><strong>其尺寸小,并带有坚固的DFN外壳,能够集成到具有挑战性的设计中,同时满足可靠性高的要求</strong></span>,这一点已通过<span style="text-decoration: underline;"><strong><span style="color: #e03e2d; text-decoration: underline;">JEDEC JESD47资格认证</span></strong></span>。此外,SHT40符合RESET®和WELL Building Standard™等健康建筑相关标准。</span></em></p>
<div>
<h3 id="vuxEK" data-lake-index-type="2"><span style="font-size: 14pt; color: #2dc26b;">电路分析</span></h3>
<p id="ua82507aa"><span style="font-size: 12pt;"><em>桌面温湿度仪上使用一个SHT40温湿度传感器模块用于检测温湿度,<span style="color: #b96ad9;"><strong>SHT40采用IIC进行通信</strong></span>,模块上R8、R9是IIC通信的上拉电阻,起到“线与”的作用,<strong><span style="color: #b96ad9;">支持挂载多个设备</span></strong>。</em></span></p>
<p><span style="font-size: 12pt;"><em><img src="//image.lceda.cn/oshwhub/3188268424a14323908984b71689f84b.png" alt="" width="800" height="605" /></em></span></p>
<div class="lake-content">
<h2 id="riFcR" data-lake-index-type="2"><span class="ne-text" style="color: #2dc26b; font-size: 14pt;">IIC介绍</span></h2>
<p id="uec30c564"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">IIC是一种两线式双向同步串行总线协议,双向的意思是指通信双方均可发送与接受数据;同步是指通信双方具有相同的时钟脉冲(SCL线)。</span></em></strong></span></p>
<p id="u46615239"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">在IIC中把设备分为主设备与从设备,一般来说,谁控制时钟线谁就是主设备;</span></em></strong></span></p>
<p id="u13d4f639"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">IIC设备均有一个器件地址,在多个设备通信时,根据器件地址来进行辨别;</span></em></strong></span></p>
<p id="u873b7b3a"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">IIC是半双工通信,同一时间内仅支持单向通信(只有一根数据线);</span></em></strong></span></p>
<p id="ue23c6a1c"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">单片机的IIC引脚通常设置为开漏输出,通过外部的上拉电阻来输出高电平,这样做的好处是防止多个设备通信时,信号混乱。</span></em></strong></span></p>
<p id="ubc3f08d2"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">在整个IIC通信过程中,主要包含以下几个过程;</span></em></strong></span></p>
<ul>
<li id="u8c6dc0df" data-lake-index-type="0"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">主机开始时序;</span></em></strong></span></li>
<li id="u021084e3" data-lake-index-type="0"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">主机发送地址时序;</span></em></strong></span></li>
<li id="uca9395b3" data-lake-index-type="0"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">主机等待从机应答时序;</span></em></strong></span></li>
<li id="u816d6856" data-lake-index-type="0"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">主机发送读/写数据时序;</span></em></strong></span></li>
<li id="ue3aabf3a" data-lake-index-type="0"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">主机等待从机应答时序;</span></em></strong></span></li>
<li id="u7f1d0ceb" data-lake-index-type="0"><span style="color: #b96ad9;"><strong><em><span style="font-size: 12pt;">停止时序;</span></em></strong></span></li>
</ul>
</div>
</div>
</div>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>主控电路</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/a52973a49d8c4cffb6f65f60f62d1b7a.png" alt="" width="800" height="318" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>晶振电路</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/a5539047279e4e309c0182dfe1a02095.png" alt="" width="800" height="314" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>三态输出8位移位寄存器</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/7a6c6f70bc1b423a88096a8207c0fdcd.png" alt="" width="800" height="121" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>SWD下载调试接口</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/0f8d498b61744711bc2cb47a65e237cd.png" alt="" width="800" height="438" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>共阴极3位数码管(<span style="color: #000000;">显示温度及湿度</span>)</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/5e50e06054144dae9cd663fb9de6163a.png" alt="" width="800" height="254" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>两节5号电池盒+防反接保护</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/0e0a97c0bfa54280bd775a2c7e2c4e53.png" alt="" width="800" height="282" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>唤醒按键</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/3cde14dda50b4988a988270709310abd.png" alt="" width="800" height="350" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>测试LED</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/36ccecc414574563a9376fc56844b80e.png" alt="" width="800" height="311" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>固定孔</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/16c2e4730dc84545b5030cbc230f15a6.png" alt="" width="800" height="347" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>2.2 PCB设计</strong></span></p>
<p><span style="font-size: 14pt; color: #000000;"><strong><span style="color: #b96ad9;">设计PCB</span>可到<span style="color: #fbaeed;">B站</span>——<a href="<a href="https://space.bilibili.com/430536057/channel/collectiondetail?sid=232449%22><span" target="_blank">https://space.bilibili.com/430536057/channel/collectiondetail?sid=232449"><span</a> style="color: #3598db;"><em>立创EDA官方账号学习</em></span></a></strong></span></p>
<p><span style="color: #3598db;"><span style="font-size: 18.6667px;"><strong><em>讲解非常详细(白嫖怪日常——<span style="text-decoration: line-through; color: #fbaeed;">已进阶成投币版,狗头保命</span>)</em></strong></span></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/5a343ab02d774af3986c57cdaa78fb0e.png" alt="" width="800" height="442" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>PCB顶层设计</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/050de97e2ed14df1ba29ae6d6d55056c.png" alt="" width="800" height="415" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>PCB底层设计</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/e35ab2f2dffc4b8694edefcce8230d4c.png" alt="" width="800" height="426" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>3D预览效果(<span style="color: #000000;">黑色阻焊</span><span style="color: #b96ad9;">配</span><span style="color: #f1c40f;">沉金工艺</span><span style="color: #b96ad9;">嘎嘎好看</span>)</strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/2b794bf8168c43f2873012655b13c637.png" alt="" width="800" height="459" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong><img src="//image.lceda.cn/oshwhub/cc6c337de7f74e5393ac680328375d13.gif" width="800" height="525" /></strong></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>2.3 3D外壳设计(<span style="color: #3598db;">先简易设计——打好定位孔,方便快捷,再导入UG中进行二次设计</span>)</strong></span></p>
<p><span style="color: #b96ad9;"><em><strong><span style="font-size: 12pt;">嘉立创EDA专业版支持简单的 3D 外壳设计,方便用户快速绘制和制造一个简单的外壳。</span></strong></em></span></p>
<p><span style="color: #e03e2d;"><em><strong><span style="font-size: 12pt;">如果在嘉立创EDA设计的简单 3D 外壳不满足需要,可以导出 3D 外壳时,选择导出 STEP 或者 OBJ 格式,在其他专业 3D 设计工具进行继续设计。</span></strong></em></span></p>
<p><span style="color: #2dc26b; font-size: 14pt;"><strong>简易设计</strong></span></p>
<p><span style="color: #2dc26b; font-size: 14pt;"><em><strong><img src="//image.lceda.cn/oshwhub/8577dd0522214bb8b264ed4b9b0f8433.gif" width="816" height="500" /></strong></em></span></p>
<p><span style="color: #2dc26b; font-size: 14pt;"><strong>二次设计(<span style="color: #b96ad9;">加了个下盖,可夹紧PCB,可加装磁铁实现磁吸后盖,便于更换电池</span>)</strong></span></p>
<p><span style="color: #2dc26b; font-size: 14pt;"><strong>3D打印可到<span style="color: #b96ad9;">嘉立创</span>旗下——<a href="<a href="https://www.jlc-3dp.cn/%22><span" target="_blank">https://www.jlc-3dp.cn/"><span</a> style="color: #3598db;">三维猴</span></a>进行模型打印(3D外壳已分享到附件当中)</strong></span></p>
<p><img src="//image.lceda.cn/oshwhub/e3a4226008bc4bb5b5913bca516eb7b2.png" width="829" height="916" /></p>
<p> </p>
<p><span style="color: #b96ad9;"><em><strong><span style="font-size: 18pt;">自行可购买</span></strong></em></span></p>
<p><span style="font-size: 14pt; color: #2dc26b;"><strong>3.实物展示(<span style="color: #000000;">小米的</span><span style="color: #3598db;">彩<span style="color: #f1c40f;">虹</span></span><span style="color: #b96ad9;">电</span><span style="color: #fbaeed;">池</span><span style="color: #000000;">真的是绝配</span>)</strong></span></p>
<p> </p>
<p><img src="//image.lceda.cn/oshwhub/3ef869216c7b43fab26b22d21c2bf6c5.jpg" alt="" width="800" height="450" /></p>
<p><img src="//image.lceda.cn/oshwhub/a7e5e607971b4377bec3c8e42ad82efc.jpg" alt="" width="800" height="450" /></p>
<p><img src="//image.lceda.cn/oshwhub/4234e1c16d4740a0aef27b00ae3e0e0a.jpg" width="802" height="779" /></p>
<h1><span style="font-size: 36pt;"><em><strong><span style="color: #e03e2d;">终于完成温湿度检测仪了</span></strong></em></span></h1>
<h1><span style="font-size: 36pt;">最后由衷的感谢<span style="color: #b96ad9;">嘉立创</span>&<span style="color: #3598db;">盛思锐</span>的大力支持!!!</span></h1>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p></p>
评论(0)