版本协议

Public Domain

专业版
#第九届立创电赛#STM32温湿度检测仪

创建时间:4个月前

98 0

描述

<p><h3 style="line-height: 1.8;"><em> 1、项目功能介绍</h3> <hr /> <p style="line-height: 1.8;">温湿度检测的主要目的是监测和记录环境中的温度和湿度数据,以确保环境条件的稳定性和适宜性,这对于许多行业都至关重要。</p> <p style="line-height: 1.8;">本项目以STM32G030K6为MCU,用盛思锐(sensirion)的高精度SHT40-AD1B温湿度传感器还检测环境的温湿度值,以跟踪检测环境条件的稳定性和适宜性。具有以下特点:</p> <p style="line-height: 1.8;">1、采用常用三元锂电池供电,方便整体集成和充电,也能维持检测仪的长久供电显示;</p> <p style="line-height: 1.8;">2、板载集成了盛思锐(sensirion)的高精度SHT40-AD1B-R2/R3温湿度传感器,接触更加稳定,以确保数据的准确精确。</p> <p style="line-height: 1.8;">3、引出SWD刷机调试接口,方便刷入程序固件。</p> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/1eb6ea9b168b45faacf79594b7375443.jpg" alt="" width="1529" height="812" /></p> <p style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;"><img src="//image.lceda.cn/oshwhub/a2bf05af23d84eb2b7148efc54d6e10b.jpg" alt="" width="1503" height="775" /></span></p> <h3 style="line-height: 1.8;"></em>2、项目属性</h3> <hr /> <p>该项目为&ldquo;#第九届立创电赛#STM32温湿度检测仪&rdquo;项目,个人设计它有以下目的:</p> <p>1、学习提高立创EDA专业版的设计水平;</p> <p>2、系统学习STM32程序代码的开发步骤,为以后开发STM32项目积累经验;</p> <p>3、与其它爱好者一起学习交流,更快更准确地了解更新鲜的电子发展技术资讯。</p> <h3 style="line-height: 1.8;">&nbsp;</h3> <h3 style="line-height: 1.8;"><em> 3、开源协议</h3> <hr /> <p style="line-height: 1.8;"><strong class="ql-size-13">GPL 3.0</strong></p> <h3 style="line-height: 1.8;">&nbsp;</h3> <h3 style="line-height: 1.8;"></em>4、硬件部分</h3> <hr /> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/4c5546b0cf2b4011b404c0d95a3822e6.png" alt="" width="870" height="820" /></p> <h3 style="line-height: 1.8;"><em>5、软件部分</h3> <hr /> <div>int main(void)</div> <div>{</div> <div>&nbsp; /</em> USER CODE BEGIN 1 <em>/</div> <div>float temperature = 0;</div> <div>float humidity = 0;</div> <div>&nbsp; /</em> USER CODE END 1 <em>/</div> <div>&nbsp;</div> <div>&nbsp; /</em> MCU Configuration--------------------------------------------------------<em>/</div> <div>&nbsp;</div> <div>&nbsp; /</em> Reset of all peripherals, Initializes the Flash interface and the Systick. <em>/</div> <div>&nbsp; HAL_Init();</div> <div>&nbsp;</div> <div>&nbsp; /</em> USER CODE BEGIN Init <em>/</div> <div>&nbsp;</div> <div>&nbsp; /</em> USER CODE END Init <em>/</div> <div>&nbsp;</div> <div>&nbsp; /</em> Configure the system clock <em>/</div> <div>&nbsp; SystemClock_Config();</div> <div>&nbsp;</div> <div>&nbsp; /</em> USER CODE BEGIN SysInit <em>/</div> <div>HAL_DeInit();</div> <div>&nbsp; /</em> USER CODE END SysInit <em>/</div> <div>&nbsp;</div> <div>&nbsp; /</em> Initialize all configured peripherals <em>/</div> <div>&nbsp; MX_GPIO_Init();</div> <div>&nbsp; MX_ADC1_Init();</div> <div>&nbsp; MX_I2C1_Init();</div> <div>&nbsp; MX_TIM14_Init();</div> <div>&nbsp; /</em> USER CODE BEGIN 2 <em>/</div> <div>HAL_Delay(100);</div> <div>&nbsp; SN74HC595_Send_Data(SN_DIG,0xFF); //关闭数码管显示</div> <div>&nbsp; SN74HC595_Send_Data(SN_LED1,0x00);</div> <div>&nbsp; SN74HC595_Send_Data(SN_LED2,0x00);</div> <div>&nbsp;</div> <div>&nbsp; /</em> USER CODE END 2 <em>/</div> <div>HAL_SuspendTick();//暂停滴答定时器,防止通过滴答定时器中断唤醒</div> <div>HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI); /</em> 执行WFI指令, 进入睡眠模式 <em>/</div> <div>&nbsp; /</em> Infinite loop <em>/</div> <div>&nbsp; /</em> USER CODE BEGIN WHILE <em>/</div> <div>&nbsp; while (1)</div> <div>&nbsp; {</div> <div>&nbsp; &nbsp; /</em> USER CODE END WHILE <em>/</div> <div>&nbsp;</div> <div>&nbsp; &nbsp; /</em> USER CODE BEGIN 3 <em>/</div> <div>if(device_paramter.KeyStatus == KEY_SHAKE_STATE)</div> <div>{</div> <div>HAL_Delay(10);</div> <div>if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_5) == GPIO_PIN_RESET)</div> <div>{</div> <div>while(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_5) == GPIO_PIN_RESET);</div> <div>&nbsp;</div> <div>SHT40_Read_RHData(&amp;temperature,&amp;humidity);//读取温湿度</div> <div>device_paramter.Temp = temperature </em> 10;//放大温湿度</div> <div>device_paramter.Humi = humidity <em> 10;</div> <div>HAL_TIM_Base_Start_IT(&amp;htim14);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//开始定时器,显示两次数据&nbsp;</div> <div>device_paramter.sleepStatus = 0;//清除休眠标志</div> <div>device_paramter.KeyStatus = KEY_NO_PRESS;//清除按下标志</div> <div>}</div> <div>}</div> <div>else if(device_paramter.sleepStatus == 1)//显示结束,进入休眠</div> <div>{</div> <div>HAL_SuspendTick();//暂停滴答定时器,防止通过滴答定时器中断唤醒</div> <div>HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI); /</em> 执行WFI指令, 进入睡眠模式 <em>/</div> <div>}</div> <div>&nbsp; }</div> <div>&nbsp; /</em> USER CODE END 3 <em>/</div> <div>}</div> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"></em>6、BOM清单</h3> <hr /> <table width="1386"> <tbody> <tr> <td width="36">No.</td> <td width="76">Quantity</td> <td width="164">Comment</td> <td width="138">Designator</td> <td width="297">Footprint</td> <td width="84">Value</td> <td width="164">Manufacturer Part</td> <td width="231">Manufacturer</td> <td width="120">Supplier Part</td> <td width="76">Supplier</td> </tr> <tr> <td>1</td> <td>4</td> <td>1uF</td> <td>C22,C23,C24,C25</td> <td>C0805</td> <td>1uF</td> <td>CL21B105KBFNNNE</td> <td>SAMSUNG(三星)</td> <td>C28323</td> <td>LCSC</td> </tr> <tr> <td>2</td> <td>4</td> <td>100nF</td> <td>C26,C27,C30,C31</td> <td>C0805</td> <td>100nF</td> <td>CC0805KRX7R9BB104</td> <td>YAGEO(国巨)</td> <td>C49678</td> <td>LCSC</td> </tr> <tr> <td>3</td> <td>2</td> <td>18pF</td> <td>C28,C29</td> <td>C0805</td> <td>18pF</td> <td>0805CG180J500NT</td> <td>FH(风华)</td> <td>C1797</td> <td>LCSC</td> </tr> <tr> <td>4</td> <td>1</td> <td>ZX-XH2.54-2PZZ</td> <td>CN1</td> <td>CONN-TH_2P-P2.50_HX25003-2A</td> <td>&nbsp;</td> <td>ZX-XH2.54-2PZZ</td> <td>Megastar(兆星)</td> <td>C7429632</td> <td>LCSC</td> </tr> <tr> <td>5</td> <td>1</td> <td>X6511WV-04H-C60D30</td> <td>H2</td> <td>HDR-TH_4P-P2.54-V-M</td> <td>&nbsp;</td> <td>X6511WV-04H-C60D30</td> <td>XKB Connection(中国星坤)</td> <td>C706876</td> <td>LCSC</td> </tr> <tr> <td>6</td> <td>1</td> <td>L0805</td> <td>L1</td> <td>L0805</td> <td>L0805</td> <td>L0805</td> <td>PROD(谱罗德)</td> <td>C22462042</td> <td>LCSC</td> </tr> <tr> <td>7</td> <td>2</td> <td>SP420361N</td> <td>LED1,LED2</td> <td>LED-SEG-TH_SP420361N</td> <td>&nbsp;</td> <td>SP420361N</td> <td>ARKLED(方舟)</td> <td>C98927</td> <td>LCSC</td> </tr> <tr> <td>8</td> <td>2</td> <td>XL-2012UGC</td> <td>LED3,LED4</td> <td>LED0805-RD_GREEN</td> <td>&nbsp;</td> <td>XL-2012UGC</td> <td>XINGLIGHT(成兴光)</td> <td>C965815</td> <td>LCSC</td> </tr> <tr> <td>9</td> <td>1</td> <td>WST3401</td> <td>Q1</td> <td>SOT-23-3_L2.9-W1.6-P1.90-LS2.8-BR</td> <td>&nbsp;</td> <td>WST3401</td> <td>WINSOK(微硕)</td> <td>C105162</td> <td>LCSC</td> </tr> <tr> <td>10</td> <td>4</td> <td>4.7k&Omega;</td> <td>R8,R9,R11,R13</td> <td>R0805</td> <td>4.7k&Omega;</td> <td>0805W8F4701T5E</td> <td>UNI-ROYAL(厚声)</td> <td>C17673</td> <td>LCSC</td> </tr> <tr> <td>11</td> <td>1</td> <td>10k&Omega;</td> <td>R12</td> <td>R0805</td> <td>10k&Omega;</td> <td>0805W8F1002T5E</td> <td>UNI-ROYAL(厚声)</td> <td>C17414</td> <td>LCSC</td> </tr> <tr> <td>12</td> <td>2</td> <td>10k&Omega;</td> <td>R14,R15</td> <td>R0805</td> <td>10k&Omega;</td> <td>RT0805BRD0710KL</td> <td>YAGEO(国巨)</td> <td>C110775</td> <td>LCSC</td> </tr> <tr> <td>13</td> <td>1</td> <td>TS-1010-C-A</td> <td>SW2</td> <td>KEY-SMD_TX-1010-X-X</td> <td>&nbsp;</td> <td>TS-1010-C-A</td> <td>XKB Connectivity(中国星坤)</td> <td>C692458</td> <td>LCSC</td> </tr> <tr> <td>14</td> <td>1</td> <td>SHT40-AD1B-R2</td> <td>U2</td> <td>DFN-4_L1.5-W1.5-P0.8-TL-EP</td> <td>&nbsp;</td> <td>SHT40-AD1B-R2</td> <td>Sensirion(瑞士盛思锐)</td> <td>C2909890</td> <td>LCSC</td> </tr> <tr> <td>15</td> <td>3</td> <td>SN74HC595PWR</td> <td>U4,U5,U6</td> <td>TSSOP-16_L5.0-W4.4-P0.65-LS6.4-BL</td> <td>&nbsp;</td> <td>SN74HC595PWR</td> <td>TI(德州仪器)</td> <td>C273642</td> <td>LCSC</td> </tr> <tr> <td>16</td> <td>1</td> <td>STM32G030K6T6</td> <td>U8</td> <td>LQFP-32_L7.0-W7.0-P0.80-LS9.0-BL</td> <td>&nbsp;</td> <td>STM32G030K6T6</td> <td>ST(意法半导体)</td> <td>C529331</td> <td>LCSC</td> </tr> <tr> <td>17</td> <td>1</td> <td>HT7333-A</td> <td>U9</td> <td>SOT-89-3_L4.5-W2.5-P1.50-LS4.2-BR</td> <td>&nbsp;</td> <td>HT7333-A</td> <td>UMW(友台半导体)</td> <td>C347191</td> <td>LCSC</td> </tr> <tr> <td>18</td> <td>1</td> <td>32.768kHz</td> <td>X2</td> <td>CRYSTAL-SMD_L3.2-W1.5-1</td> <td>32.768kHz</td> <td>XKXGI-SUA-32.768K</td> <td>YXC(扬兴晶振)</td> <td>C5213671</td> <td>LCSC</td> </tr> </tbody> </table> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"><em>7、大赛LOGO验证</h3> <hr /> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/3fe317ac4fa84065b8193b6049ab1cf2.png" alt="" width="652" height="1081" /></p> <p style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;">请上传包含大赛logo的项目图片,logo以丝印形式印刷在PCB上面。</span></p> <p style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;">点击zip下载大赛logo标识! <span style="text-decoration: underline;"><a href="<a href="https://image.lceda.cn/easyedaResource/images/d1bbfd69f9404f56901a0e7b849b7245.rar" target="_blank">https://image.lceda.cn/easyedaResource/images/d1bbfd69f9404f56901a0e7b849b7245.rar</a>" target="_blank" rel="noreferrer noopener">(大赛标识).zip</a></span></span></p> <p style="line-height: 1.8;">&nbsp;</p> <h3 style="line-height: 1.8;"></em> 8、演示您的项目并录制成视频上传</h3> <hr /> <p style="line-height: 1.8;">请查看附件</p></p>

文档

BOM

暂无

附件

附件名 下载
000.mp4
BOM_Board1_stm32-th-detector.xlsx
stm32-th-detector.rar

成员

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