版本协议

Public Domain

标签
专业版
#第十届立创电赛#温湿光显器

创建时间:1个月前

58 1

视频

描述

<div class="document"> <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;">* 1、项目功能介绍</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;">本项目是一款智能温湿度监测与状态反馈系统,旨在通过实时感知环境温湿度,解决日常生活 / 办公场景中对环境状态(冷热、干湿)的直观判断需求。系统采用温湿度传感器采集环境数据,通过显示屏实时展示温度(℃)和湿度(%)数值,并根据预设阈值自动判断环境状态(如温度>26℃判定为 “热”,≤26℃判定为 “冷”;湿度>50% 判定为 “潮湿”,≤50% 判定为 “干燥”)。同时,系统通过不同 LED 的闪烁或常亮状态对应反馈环境状态(如热状态时黄色 LED 闪烁,潮湿状态时红色 LED 闪烁),增强环境状态的可视化提醒。</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;"> </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;"> </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;">*2、项目属性</h3> <hr class="horizontal-splitline normal-bold-2"> <ul class="auto-hide-last-sibling-br"> <li>项目为首次公开,未在其他平台或比赛中发布过;</li> <li>项目核心硬件设计、软件逻辑及状态判断算法均为原创,基于通用模块(如 DHT11、STM32)进行二次开发与功能整合;</li> <li>项目未在其他比赛中获奖,未参与学校答辩。</li> </ul> <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;"> </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;">* 3、开源协议</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;">GPL3.0开源协议</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;"> </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;">*4、硬件部分</h3> <hr class="horizontal-splitline normal-bold-2"> <h4 class="header-vfC6AV auto-hide-last-sibling-br">核心原理</h4> <div class="auto-hide-last-sibling-br paragraph-JOTKXA paragraph-element br-paragraph-space">系统以 STM32F103C8T6 单片机为控制核心,通过 DHT11 温湿度传感器采集环境数据,经单片机处理后,在 OLED 显示屏上输出数值与状态信息,并控制 LED 执行相应动作。</div> <h4 class="header-vfC6AV auto-hide-last-sibling-br">硬件组成及连接</h4> <ul class="auto-hide-last-sibling-br"> <li><strong>主控模块</strong>:STM32F103C8T6(最小系统板),负责数据处理、逻辑判断及外设控制;</li> <li><strong>传感器模块</strong>:DHT11,通过单总线与 STM32 的 GPIO 引脚连接(如 PA0),采集温湿度数据;</li> <li><strong>显示模块</strong>:OLED 显示屏(I2C 接口),与 STM32 的 I2C 引脚(如 PB6、PB7)连接,显示数值及状态;</li> <li><strong>指示模块</strong>:2 路 LED(如黄色 LED 接 PA1,红色 LED 接 PA3),分别对应温度、湿度状态;</li> <li><strong>电源模块</strong>:5V 外接电源,为传感器供电,同时经 3.3V 稳压芯片为 STM32 和 OLED 供电。</li> </ul> <h4 class="header-vfC6AV auto-hide-last-sibling-br">调试与测试方法</h4> <ul class="auto-hide-last-sibling-br"> <li>硬件调试:使用万用表检测各模块供电电压是否正常,用示波器观察 DHT11 数据总线波形,确认通信是否稳定;</li> <li>功能测试:在不同环境(如室内、通风处、加湿器旁)放置设备,对比标准温湿度计,验证采集数据的准确性;通过改变环境状态(如加热、加湿),观察 LED 闪烁逻辑启停是否符合预设规则。</li> </ul> <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;"> </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;">*5、软件部分</h3> <hr class="horizontal-splitline normal-bold-2"> <h4 class="header-vfC6AV auto-hide-last-sibling-br">程序流程图</h4> <ol class="auto-hide-last-sibling-br"> <li>系统初始化:初始化时钟、延时函数、UART、OLED、DHT11、LED ;</li> <li>传感器数据读取:周期性(1 秒 / 次)通过 DHT11 读取温度(temp)和湿度(humi);</li> <li>数据显示:在 OLED 固定位置显示 “温度:XX℃”“湿度:XX%”;</li> <li>状态判断与反馈: <ul class="auto-hide-last-sibling-br"> <li>温度>26℃:OLED 显示 “Warm”,黄灯 LED 闪烁;≤26℃:显示 “Cool”,黄灯 LED 灭;</li> <li>湿度>50%:OLED 显示 “Humid”,红灯 LED 闪烁;≤50%:显示 “Dry”,红灯LED 灭;</li> </ul> </li> </ol> <h4 class="header-vfC6AV auto-hide-last-sibling-br">核心算法</h4> <ul class="auto-hide-last-sibling-br"> <li>LED 闪烁逻辑:通过延时函数(delay_ms)控制 GPIO 引脚高低电平交替,实现固定频率(如 1Hz)闪烁;</li> <li>阈值判断:采用简单条件分支语句(if-else)实现状态划分,阈值可通过代码灵活修改。</li> </ul> <h4 class="header-vfC6AV auto-hide-last-sibling-br">源码结构</h4> <ul class="auto-hide-last-sibling-br"> <li><code>main.c</code>:主函数,实现初始化、数据循环处理及逻辑判断;</li> <li><code>dht11.c</code>:DHT11 驱动,包含初始化和数据读取函数;</li> <li><code>oled.c</code>:OLED 显示驱动,实现字符、数字、字符串显示;</li> <li><code>led.c</code>:LED 控制函数,包含闪烁(LED_Spark)和开关控制;</li> </ul> <h4 class="header-vfC6AV auto-hide-last-sibling-br">环境与烧录</h4> <ul class="auto-hide-last-sibling-br"> <li>编译环境:Keil MDK5,基于 STM32F10x 标准库;</li> <li>烧录方法:通过 ST-Link 连接 STM32 的 SWD 接口,将编译生成的.hex 文件烧录至芯片。</li> </ul> <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;"> </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;">*6、BOM清单</h3> <hr class="horizontal-splitline normal-bold-2"> <table style="width:1100pt;" width="1470"> <tr style="height:14pt;"> <td style="height:14pt;width:110pt;" width="147" height="19">No.</td> <td style="width:110pt;" width="147">Quantity</td> <td style="width:110pt;" width="147">Comment</td> <td style="width:110pt;" width="147">Designator</td> <td style="width:110pt;" width="147">Footprint</td> <td style="width:110pt;" width="147">Value</td> <td style="width:110pt;" width="147">Manufacturer Part</td> <td style="width:110pt;" width="147">Manufacturer</td> <td style="width:110pt;" width="147">Supplier Part</td> <td style="width:110pt;" width="147">Supplier</td> </tr> <tr style="height:14pt;"> <td style="height:14pt;" height="19">1</td> <td align="right">2</td> <td>XL-302SURD</td> <td>LED1,LED2</td> <td>LED-TH_BD3.8-P2.54-RD</td> <td> </td> <td>XL-302SURD</td> <td>XINGLIGHT(成兴光)</td> <td>C2895470</td> <td>LCSC</td> </tr> <tr style="height:14pt;"> <td style="height:14pt;" height="19">2</td> <td align="right">1</td> <td>5k</td> <td>R1</td> <td>R0603</td> <td>5k</td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr style="height:14pt;"> <td style="height:14pt;" height="19">3</td> <td align="right">1</td> <td>HS96L03W2C03</td> <td>U3</td> <td>OLED-TH_L27.8-W27.2-P2.54_C9900033791</td> <td> </td> <td>HS96L03W2C03</td> <td>HS(汉昇)</td> <td>C5248080</td> <td>LCSC</td> </tr> <tr style="height:14pt;"> <td style="height:14pt;" height="19">4</td> <td align="right">1</td> <td>DHT11</td> <td>U4</td> <td>SENSOR-TH_DHT11</td> <td> </td> <td>DHT11</td> <td>广州奥松</td> <td>C117051</td> <td>LCSC</td> </tr> <tr style="height:14pt;"> <td style="height:14pt;" height="19">5</td> <td align="right">1</td> <td>LCKFB-DKX-STM32F103C8T6</td> <td>U5</td> <td>CONN-TH_L53.3-W22.9_STM32F103C8T6-CARD</td> <td> </td> <td>LCKFB-DKX-STM32F103C8T6</td> <td>立创开发板</td> <td>C22396880</td> <td>LCSC</td> </tr> </table> <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;"> </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;"> </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;">*7、大赛LOGO验证</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;"><img src="//image.lceda.cn/pullimage/7uc6o29T5J4ZlvI2LrHI34WK7mtLjYevwPmFQBoL.png" alt="" width="691" height="740"></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;">* 8、演示您的项目并录制成视频上传</h3> <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;"> </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;"> </p> </div>

文档

BOM

暂无

附件

暂无

评论(1)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
tuu_u 回复
<p>[emojis:强][emojis:强][emojis:强]</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