版本协议

GPL 3.0

标签
标准版
#第六届立创电赛#多功能语音台灯

创建时间:3年前

描述

<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;">* 1、项目功能介绍</h3> <p></p><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:#95a5a6;font-size:14px;">    <span style="color:#000000;font-size:16px;">这个作品是一个<span style="text-decoration:underline;font-size:24px;"><strong>多功能语音的小夜灯</strong></span>,我们可以通过语音和台灯进行互动,可以让他开灯,关灯,调节亮度。控制面板上有2个<strong>红外发射管</strong>,因此也可以语音让其控制家电。USB插座可以插入任何USB供电设备,最大供电为<strong>5V/2A</strong>   <strong><span style="color:#e03e2d;">(尽量不要接近2A,实际大概最多1.5A!)</span></strong>。</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:16px;"><span style="color:#95a5a6;"><span style="color:#000000;">   小台灯内置一个<strong>900mAh</strong>的可充电锂电池,可以使用家里常用的手机<strong>typec充电器</strong>来进行充电,有了电池就可以随身携带,也不用有一根线限制着小台灯的摆位,让其随时随地出现在你身边。台灯的设计非常符合人性化,在没有唤醒小台灯时,他处于<strong>休眠</strong>状态,点阵屏不会亮表情,这就可以在睡觉时候常开着放在床边,随时呼唤。唤醒小台灯后,<strong><span style="text-decoration:underline;color:#e67e23;">他会像人类一样眨眼,做表情</span></strong>,这些为小台灯增添一点<strong>灵性</strong>。</span></span><span style="color:#95a5a6;"><span style="color:#000000;">面板上配置一个按钮,<strong><span style="text-decoration:underline;">单击切换灯光开关状态,双击显示电池剩余电量</span></strong>。除此之外,控制面板上还有一个<em>蓝色的充电指示灯</em>,当进行充电时会亮起,充电结束后会灭掉,这样可以方便观察到电池状况,方便使用。</span></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:16px;"><span style="color:#95a5a6;"><span style="color:#000000;">  小台灯外壳用纸皮制作(因为不会3D建模)。</span></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="color:#95a5a6;font-size:16px;"><span style="color:#000000;">  语音小台灯我叫他为<span style="font-size:24px;color:#e67e23;"><strong>小B</strong></span>,只需要呼喊小B,他就会亮表情与你互动。下面是<strong>小风扇模式</strong>和<strong>小夜灯模式</strong>的造型。</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;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/fJrhZEExRrQbH5n9d2n83MJiquIIaaCXZvTNPnPY.png" alt="" width="431" height="495"></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;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/9g9x7XpBc5icxyUuWzSv9gf11gzOVDAXpHkFR7rj.png" alt="" width="439" height="481"></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:24px;"><strong>语音指令如下</strong></span></p> <table style="border-collapse:collapse;width:97.3177%;height:63px;"><tr style="height:21px;"><td style="width:11.3022%;text-align:center;height:21px;" colspan="8"><strong>语音呼唤指令</strong></td> </tr><tr style="height:21px;"><td style="width:11.3022%;text-align:center;height:21px;"><span style="color:#e03e2d;font-size:18px;">小B</span></td> <td style="width:11.3022%;height:21px;text-align:center;">开灯</td> <td style="width:11.3022%;height:21px;text-align:center;">关灯</td> <td style="width:11.3022%;height:21px;text-align:center;">开风扇</td> <td style="width:11.3022%;height:21px;text-align:center;">关风扇</td> <td style="width:11.3022%;height:21px;text-align:center;">降低亮度</td> <td style="width:11.3022%;height:21px;text-align:center;">升高亮度</td> <td style="width:11.3022%;height:21px;text-align:center;">降低风速</td> </tr><tr style="height:21px;"><td style="width:11.3022%;height:21px;text-align:center;">升高风速</td> <td style="width:11.3022%;height:21px;text-align:center;">开电视</td> <td style="width:11.3022%;height:21px;text-align:center;">关电视</td> <td style="width:11.3022%;height:21px;text-align:center;">继续</td> <td style="width:11.3022%;height:21px;text-align:center;">暂停</td> <td style="width:11.3022%;height:21px;text-align:center;">返回</td> <td style="width:11.3022%;height:21px;text-align:center;">讲个故事</td> <td style="width:11.3022%;height:21px;text-align:center;">卖个萌</td> </tr><tr><td style="width:11.3022%;text-align:center;">电视降低音量</td> <td style="width:11.3022%;text-align:center;">电视调高音量</td> <td style="width:11.3022%;"> </td> <td style="width:11.3022%;"> </td> <td style="width:11.3022%;"> </td> <td style="width:11.3022%;"> </td> <td style="width:11.3022%;"> </td> <td style="width:11.3022%;"> </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;">  小B为唤醒词,其余是字面意思。 继续,暂停,返回是利用红外控制我家的天猫盒子,看视频的时候,可以语音控制视频暂停和继续。<span style="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;"> </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"><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:14px;">原创项目,首次公开</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;"> </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;">* 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;"><span style="color:#000000;font-size:16px;">GPL3.0</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;"> </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"><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;">  <span style="font-size:16px;color:#000000;">硬件部分非常简单,利用排针排母将两块板子拼合而成,分为以下几个模块。</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;"><strong><span style="color:#000000;font-size:16px;">  1、 ESP12F最小系统</span></strong></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:16px;">  这个是主控,电路也是固定的</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:16px;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/6Tm1BwLBp10Gj4HpqOj8NkC4yOZWoiKBJjopzKlE.png" alt="6Tm1BwLBp10Gj4HpqOj8NkC4yOZWoiKBJjopzKlE.png" width="266" height="242"></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;"><strong><span style="color:#000000;font-size:16px;">  2、 tp4056充电电路</span></strong></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:16px;">电路图中的R8使用的是3k,这个电阻控制的是充电电流的大小,因为tp4056的1A充电实在太烫,所以使用的是偏小的400mA的充电。</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 style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/AADk2yKNqwXDCYNDAFCLgNq5D8nnIxwGbfpMaUco.png" alt="AADk2yKNqwXDCYNDAFCLgNq5D8nnIxwGbfpMaUco.png" width="265" height="192"></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;"><strong>3、DCDC 5V升压,3.3V 线性稳压</strong></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;"><strong>4、 CH340电路</strong></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;">     和8266连接,方便烧录,外加一个typec口和一个mircro口,两种数据线均可以为单片机烧写程序。</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;"><strong>5、 NMOS驱动电路</strong></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;"><strong>     </strong>这个电路图中,C1和C3可以去掉,这个是调试用的焊盘。焊上去也不影响电路工作。</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;"><strong>  </strong><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/zDQ9KA64LQOq31s0eICPXKaA4tc1Hd44lMbRDA1m.png" alt="zDQ9KA64LQOq31s0eICPXKaA4tc1Hd44lMbRDA1m.png" width="295" height="265"></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;"><strong>6、 供电切换电路</strong></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沟道实现的,当有外部充电器输入时,供电方由电池转为usb。</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 style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/IGm7rMzHXok6ARfJpZUDDNAODwPsAJWfYzFlAqcG.png" alt="IGm7rMzHXok6ARfJpZUDDNAODwPsAJWfYzFlAqcG.png" width="426" height="261"></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> <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;"><strong>  硬件验证:</strong></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;"> <img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/JZr8XZ1eLo1DxLDowz0clzM0MeBmENFfPKTJ72Jr.jpeg" alt="" width="295" height="392"></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;"> </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"><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;"><span style="font-size:14px;">     <span style="font-size:16px;color:#000000;">软件部分还算是比较简单,因为使用的是8266来主控。软件部分主要分为下面几部分的任务。</span></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:16px;color:#000000;"><span style="color:#95a5a6;"><strong> <img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/ofRw5d1aKbinwNycjD7DaOJsDIH0fB2o9IDniOvF.png" alt="ofRw5d1aKbinwNycjD7DaOJsDIH0fB2o9IDniOvF.png"><br></strong></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:16px;color:#000000;"><span style="color:#95a5a6;"><strong><span style="color:#000000;">    1、ASRCheck()</span></strong></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;">           即是通过对语音模块串口数据的读取,来判断具体识别了哪条指令,进而发出什么响应的任务。这是主循环的重要函数,红外发射等操作都写在了对应的响应中。</span></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:16px;color:#000000;"><span style="color:#95a5a6;"><strong><span style="color:#000000;">   2、breath() sleep() LEDShow()</span></strong></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;">           前两个即是对点阵屏表情进行控制的任务函数,breath()通过millis()实现的定时器效果,让眨眼特效能更加真实,sleep()是一个进入休眠的表情管理函数,进入休眠是为了让这个小夜灯更有实用性,表情不可能一直亮着,不然就不叫小夜灯了。当语音模块发出离开指令时,小台灯就会进入休眠状态,表情变为睡眠状态,然后过2秒后点阵屏熄灭。最后LEDShow则是自己编写的点阵屏显示函数,更方便我的使用。</span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/MaesjD20Ic0Y1fbOPnjsauomkjozV19syYvJTZfq.png" alt="MaesjD20Ic0Y1fbOPnjsauomkjozV19syYvJTZfq.png"></span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;">           经过调试后,4秒眨眼一次,0.4秒睁眼的时间效果最佳,眨眼特性让他变成了一个有灵性的小台灯。</span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/juERrGLA8a4NrWkwkM3Mf7dbeVfIsvNeO8g2sBiQ.png" alt="juERrGLA8a4NrWkwkM3Mf7dbeVfIsvNeO8g2sBiQ.png" width="693" height="260"></span></span></span></p> <p><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/xFvAySUMSmG9rNxkdMugDEeICG4dQEyIIxqz6ahZ.png" alt="xFvAySUMSmG9rNxkdMugDEeICG4dQEyIIxqz6ahZ.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:center;"><span style="font-size:16px;color:#000000;"><span style="color:#95a5a6;"><strong><span style="color:#000000;">                    (具体效果可以看视频)</span></strong></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;"> </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:16px;color:#000000;"><span style="color:#95a5a6;"><strong><span style="color:#000000;">3、click() doubleclick()</span></strong></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;">           这两个分别是按键单击和按键双击的事件响应函数,使用Arduino的OneButton库可以轻松实现按键单击双击响应。</span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/utKZG38viUxANbQTiYKOtNmg7RTY0oeulOqvnYjb.png" alt="utKZG38viUxANbQTiYKOtNmg7RTY0oeulOqvnYjb.png"></span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;"><strong>4、checkbat()</strong></span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;">          这个函数是双击按键后调用的查看电量功能,很简单,就是用ADC检测电池电压,对电压进行处理,进而得到对应的电池图形,显示在点阵屏中。下图为满电情况。</span></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;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/3NZPGcp359zFF25ukOHkBf1RXMNpZAjEgMWVZZE7.png" alt="3NZPGcp359zFF25ukOHkBf1RXMNpZAjEgMWVZZE7.png" width="472" height="329"></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;"><strong>5、lightset()</strong></span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;">          这个函数是对灯光的 调光/亮灭进行管理的函数,也是在主循环的主要函数。我们使用的是pwm调光,因此使用</span></span></span>analogWrite即可进行调光,或亮灭操作。</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 style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/Racl1zgIEKj63QQATllBO3ywZH1q3FMrcuCTOiFn.png" alt="Racl1zgIEKj63QQATllBO3ywZH1q3FMrcuCTOiFn.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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;"><strong>6、主循环loop</strong></span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;"><strong>        </strong>因此有了上述等的函数,构成了下面的主循环,可以看到代码的层次清晰,可读性较好,这些代码很完美的将这个作品的功能全部实现了。</span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/Pze3NF0qxroC02jg9h0tzucsYzYLr7Gzte2mwT8c.png" alt="Pze3NF0qxroC02jg9h0tzucsYzYLr7Gzte2mwT8c.png" width="361" height="313"></span></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:16px;color:#000000;"><span style="color:#95a5a6;"><span style="color:#000000;">  <span style="color:#e67e23;"><span style="font-size:12px;">(</span><span style="font-size:12px;">唯一遗憾的是,这个小夜灯的功耗还算是比较大,静态电流190mA,只能续航5-6个小时,尽管关闭了8266的WIFI电路功能也需要耗电这么多的电流,同样语音模块的功耗也是有,因为我不会写两个模块的低功耗,因此后续可能可以研究一下,延长续航时间。)</span></span></span></span></span></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"><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 style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/q7nJ8MbpXEfotK2Shz7zKeBIOwXXQKxrhN5l4and.png" alt="q7nJ8MbpXEfotK2Shz7zKeBIOwXXQKxrhN5l4and.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;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/oPoxoHNwcLvN7OKw5xM466vnNvaFyLWuPOgr5Pg5.png" alt="oPoxoHNwcLvN7OKw5xM466vnNvaFyLWuPOgr5Pg5.png"></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 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;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/dlFogCZryW6Tc0DLuo4kXwhnSGxTDQT2sUeGcjWi.png" alt="dlFogCZryW6Tc0DLuo4kXwhnSGxTDQT2sUeGcjWi.png" width="524" height="554"></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 style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/HWlSsPr2LxUM2SxjiUY2mJOlrlXZT3wFRBNjmzn5.png" alt="HWlSsPr2LxUM2SxjiUY2mJOlrlXZT3wFRBNjmzn5.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;"> </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> <hr class="horizontal-splitline normal-bold-2"><p 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;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/t4hbldd0ta0Oq7OgzwJaJBHDUhwQFLnNlwc9IwJz.png" alt="" width="646" height="708"></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 style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/fyeOWnAJtIh5g7A5SSNt4b3qh9RhbP54AWk1A8Om.png" alt="" width="544" height="626"></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:center;">   <span style="color:#e03e2d;"><strong>(项目源码为工程附件中的Taideng_V2)</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;"> </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>
  • 唤醒-开关灯调光演示.mp4

  • 风扇模式演示.mp4

  • 驱动5W灯管调光演示.mp4

  • 红外关电视演示.mp4

  • 红外控音响演示.mp4

  • 按键功能-电量查看-休眠演示.mp4

  • 互动.mp4

文档

台灯原理图

台灯PCB

显示面板

显示面板原理图

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part
1 2.54-2P WT BAT1 CONN-SMD_2.54-2PWT 1
2 104 C1,C6,C30,C37,C40 C0603 5
3 100uF C2 CAP-SMD_BD5.0-L5.3-W5.3-FD 1
4 10uF C3 C0805 1
5 100nF C4 C0805 1
6 10uF C5,C11,C25,C26,C42 C0603 5
7 104 C41,C43 C0603 2
8 22uF C44,C45 C0603 2
9 CH340C CH340C SOP-16_L10.0-W3.9-P1.27-LS6.0-BL 1
10 1.25T-2AW_C722634 CN1 CONN-TH_1.25T-2AW 1
11 SS24G_C364270 D1,D2,D3 SMA_L4.3-W2.6-LS5.0-RD 3
12 SMAJ6.0CA_C693488 D4 SMA_L4.4-W2.6-LS5.0-BI 1
13 ESD5Z7.0T1G_C406243 D5,D6 SOD-523_L1.2-W0.8-LS1.6-RD 2
14 ESD5Z3.3C D7,D8 SOD-523_L1.2-W0.8-LS1.6-BI 2
15 ESP-12F(ESP8266MOD) ESP12F WIFIM-SMD_ESP-12F-ESP8266MOD 1
16 HDR-F-2.54_1x16 H4 HDR-F-2.54_1X16 1
17 HDR-M-2.54_1x2 J1,J2 HDR-M-2.54_1X2 2
18 HDR-M-2.54_1x4 J3 HDR-M-2.54_1X4 1
19 HDR-M-2.54_2x2 J4 HDR-M-2.54_2X2 1
20 4.7uH L2 IND-SMD_L7.0-W6.6 1
21 LED-0603_B LED1 LED0603_BLUE 1
22 MICROQTJ MICRO MICRO-USB-SMD_MICROQTJ 1
23 S8050-J3Y Q1,Q2 SOT-23 2
24 NCE3401AY Q4 SOT-23_L2.9-W1.3-P1.90-LS2.4-BR 1
25 10K R1,R2 0603 2
26 10k R3,R9,R12,R18 0603_R_JX 4
27 100K R4 R0603 1
28 324K R5 R0603 1
29 10K R6,R7 R0603 2
30 3k R8 R0603 1
31 88.7k R11 R0603 1
32 4.7K R13 R0805 1
33 12k R17 R0603 1
34 470 R19,R20 R0603 2
35 10K R22 0603_R_JX 1
36 TS-1185EC-C-A-B RESET SW-SMD_4P-L3.7-W3.0-P1.50-LS4.7-A 1
37 SS-12D06L5 SW1 SW-TH_3P-P4.70_L11.1-W12.7 1
38 TP4056X TP4056 SOP-8-PP_L4.9-W3.9-P1.27-LS6.0-BL-EP 1
39 TYPE-C16PIN TYPEC USB-C-SMD_TYPE-C16PIN-加长 1
40 AMS1117-3.3 U1 SOT-223-3_L6.5-W3.4-P2.30-LS7.0-BR 1
41 ME2159AM6G U2 SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BR 1
42 CI-C22GS02S U3 SMD-17_L20.0-W1.80-CI-C22GS02S 1
43 10uF C1,C2 C0805 2
44 104 C3,C4 C0805 2
45 104 C7 C0603 1
46 10uF C8 C0603 1
47 HDR-M-2.54_1x16 J1 HDR-M-2.54_1X16 1
48 LED-TH-5mm_R LED1 LED-TH_BD5.0_RED 1
49 SLD1388DRA1GD LED2 LED-TH_SLD1388DRA1GD 1
50 TS-1102S-C-K-B ON/OFF1 KEY-SMD_4P-L6.0-W6.0-P4.50-LS8.6 1
51 S8050 Q1 SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR 1
52 AO3400A_C344010 Q3 SOT-23_L2.9-W1.3-P1.90-LS2.4-BR 1
53 10 R1 R0603 1
54 100 R3,R14 R0603 2
55 10k R4,R15 R0603 2
56 10k R21,R23 0603_R_JX 2
57 IR333C-A U1,U2 LED-TH_BD5.0-P2.54-FD 2
58 MAX7219M U4 SOP-24_L15.2-W7.8-P1.27-LS10.6-BL 1
59 AF90CBJ USB3 USB-A-TH_AF90CBJ 1

附件

附件名 下载
BOM_#第六届立创电赛#语音台灯_2021-07-20.csv
项目原理图(含控制面板、主板).pdf
唤醒-开关灯调光演示.mp4
风扇模式演示.mp4
驱动5W灯管调光演示.mp4
红外关电视演示.mp4
红外控音响演示.mp4
按键功能-电量查看-休眠演示.mp4
互动.mp4
Taideng_V2.zip

成员

评论(27)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
MOLUN 回复
<p>创意不错</p>
Alexwen 回复
<p>谢谢😁</p>
智定义物联网 回复
<p>有开源程序吗</p>
Alexwen 回复
<p>程序现在还有些不足的地方,以后修改了再发。</p>
AHJY 回复
<p>这玩意根据创意不错呀,那么快就完成了,大佬就是不一样</p>
AHJY 回复
<p>想抄一下语音模块和8266间串口通信的源码,现在一片空白,不知如何去读取,方便的话可私发<a href="mailto:644772107@qq.com" target="_blank">644772107@qq.com</a></p>
Alexwen 回复
<p>好的</p>
Alexwen 回复
<p>我加你好友,方便说。</p>
Because of you 回复
<p>大佬能让我看下你的源码吗??我真的好头痛,看代码看的一脸茫然啊</p>
Xiaole.Tao 回复
<p>你的语音固件是自己合成的吗?user.bin怎么弄出来呀?</p>
Alexwen 回复
<p>我是8266做的主控,固件是按照视频流程烧进去的</p>
Xiaole.Tao 回复
<p>我是说CI1122里的固件,在固件合成工具里,有user.bin,你是从eclipse里编译出来的吗?</p>
Luo_YYQ 回复
<p>喇叭有推荐的吗</p>
Alexwen 回复
<p>4Ω 2W的带空腔,立创商城有</p>
嘉立创EDA-小橘 回复
<p>哈哈哈哈,小B,为啥我叫不出口/捂脸笑</p>
Alexwen 回复
<p>因为我做过一个叫小A的,这就叫小B了哈哈哈</p>
Alexwen 回复
<p>你好,程序已发了</p>
Alexwen 回复
<p>对</p>
zxy_zxy 回复
<p>好厉害୧(๑•̀◡•́๑)૭</p>
xdx001 回复
<p>我编译不出来这是咋回事作者大大</p>
Alexwen 回复
<p><span style="color:rgb(51,51,51);">你看看是不是没有下载那些库,我这个用的库还是挺多的</span></p>
xdx001 回复
<p>要用到哪些库能不能留个联系方式</p>
Alexwen 回复
<p>不好意思啊,很久没看,我QQ:2598655870 你加下</p>
maii--hao 回复
<p>你好大佬!我按照你的USB驱动来做,驱动不了。接上USB灯后不能亮是怎么回事</p>
a1039836047 回复
<p>点个赞</p>
woshinilaodou 回复
<p>您好大佬,我想问一下为什么我的CH340自动下载电路无法把IO0拉低进入下载模式?硬件方面和您给的图纸一样,不知道是不是软件方面的操作有错误导致的,这是arduino上传的时候底部的错误提示</p><p><img title="点击查看大图" src="//image.lceda.cn/pullimage/rqYLGov0O2z8TXaHURAduFwS9auyFqgq6wk0OcmC.webp" alt="rqYLGov0O2z8TXaHURAduFwS9auyFqgq6wk0OcmC.webp"></p>
qqxiaobing 回复
<p>user.bin能分享一下吗</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