标准版
#第六届立创电赛#离线语音桌面小助手

创建时间:3年前

2475 3

描述

<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">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">    本项目采用启英泰伦离线语音模组和ESP8266模组制作,能够作为桌面语音小助手,实时控制RGB灯、台灯、风扇,并且能够显示温湿度。</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">2、项目属性</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">    本项目包括电源电路,显示电路,复位电路,传感器电路等。其中RGB灯由启英泰伦离线语音模组直接控制,其他传感器及其小设备由ESP8266控制,ESP8266与语音模组通过串口连接,ESP8266被语音模组控制。</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">3、开源协议</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">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"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">4、硬件部分</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">原理图</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt"><img src="//image.lceda.cn/pullimage/H5sljLvyLmmnYyvrLWGWhImqbxYjvknluhYWAeRQ.png" alt="" width="1110" height="685"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">PCB</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt"><img src="//image.lceda.cn/pullimage/qcRW4fQ3szL9114HkZDaozsRspchsJdOOn0wgCIL.png" alt="" width="710" height="412"></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"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">5、软件部分</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">启英泰伦语音模组采用eclipse开发,部分代码如图所示:</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"><img src="//image.lceda.cn/pullimage/0IoHAAvIzcq0aujZmbOJiucCxlQBO7dUfM0uiZBG.png" alt="" width="981" height="322"></p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt"><img src="//image.lceda.cn/pullimage/46vnWsJ5O13rNVjlJ8g4cQxd527QKsfNUGQL0xEQ.png" alt="" width="875" height="720"></h3> <p>ESP8266由arduino开发源码如下:</p> <p><span style="background-color:#f8cac6;">#include <Arduino.h></span><br><span style="background-color:#f8cac6;">#include <U8g2lib.h></span><br><span style="background-color:#f8cac6;">#include <Wire.h></span><br><span style="background-color:#f8cac6;">#include<SimpleDHT.h></span><br><span style="background-color:#f8cac6;">U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0,14,2,U8X8_PIN_NONE);</span><br><span style="background-color:#f8cac6;">int pinDHT11=4;</span><br><span style="background-color:#f8cac6;">int led1=15;</span><br><span style="background-color:#f8cac6;">int led2=12;</span><br><span style="background-color:#f8cac6;">int led3=13;</span><br><span style="background-color:#f8cac6;">int m=5;</span><br><span style="background-color:#f8cac6;">SimpleDHT11 dht11(pinDHT11);</span></p> <p><br><span style="background-color:#f8cac6;">void setup() {</span><br><span style="background-color:#f8cac6;">  // put your setup code here, to run once:</span><br><span style="background-color:#f8cac6;">   pinMode(led1,OUTPUT);</span><br><span style="background-color:#f8cac6;">   pinMode(led2,OUTPUT);</span><br><span style="background-color:#f8cac6;">   pinMode(led3,OUTPUT);</span><br><span style="background-color:#f8cac6;">   pinMode(m,OUTPUT);</span><br><span style="background-color:#f8cac6;">   digitalWrite(m,0);</span><br><span style="background-color:#f8cac6;">   digitalWrite(led1,0);</span><br><span style="background-color:#f8cac6;">   digitalWrite(led2,0);</span><br><span style="background-color:#f8cac6;">   digitalWrite(led3,0);</span><br><span style="background-color:#f8cac6;">   Serial.begin(115200);</span><br><span style="background-color:#f8cac6;">   u8g2.begin();</span><br><span style="background-color:#f8cac6;">   u8g2.enableUTF8Print();</span><br><span style="background-color:#f8cac6;">}</span><br><span style="background-color:#f8cac6;">int a=0;</span><br><span style="background-color:#f8cac6;">void loop() {</span><br><span style="background-color:#f8cac6;">  // put your main code here, to run repeatedly:</span><br><span style="background-color:#f8cac6;"> </span><br><span style="background-color:#f8cac6;">     if(Serial.available())</span><br><span style="background-color:#f8cac6;">     {</span><br><span style="background-color:#f8cac6;">      a=Serial.read();</span><br><span style="background-color:#f8cac6;">      switch(a)</span><br><span style="background-color:#f8cac6;">      {</span><br><span style="background-color:#f8cac6;">        case 65://打开台灯</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">          digitalWrite(led1,1);</span><br><span style="background-color:#f8cac6;">          digitalWrite(led2,1);</span><br><span style="background-color:#f8cac6;">          digitalWrite(led3,0);</span><br><span style="background-color:#f8cac6;">          break;</span><br><span style="background-color:#f8cac6;">        }</span><br><span style="background-color:#f8cac6;">        </span><br><span style="background-color:#f8cac6;">        case 66://关闭台灯</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">          digitalWrite(led1,0);</span><br><span style="background-color:#f8cac6;">          digitalWrite(led2,0);</span><br><span style="background-color:#f8cac6;">          digitalWrite(led3,0);</span><br><span style="background-color:#f8cac6;">          break; </span><br><span style="background-color:#f8cac6;">        }     </span><br><span style="background-color:#f8cac6;">         </span><br><span style="background-color:#f8cac6;">        case 67://亮度加</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">          digitalWrite(led1,1);</span><br><span style="background-color:#f8cac6;">          digitalWrite(led2,1);</span><br><span style="background-color:#f8cac6;">          digitalWrite(led3,1);</span><br><span style="background-color:#f8cac6;">          break; </span><br><span style="background-color:#f8cac6;">        }      </span><br><span style="background-color:#f8cac6;">        </span><br><span style="background-color:#f8cac6;">        case 68://亮度减</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">          digitalWrite(led1,1);</span><br><span style="background-color:#f8cac6;">          digitalWrite(led2,0);</span><br><span style="background-color:#f8cac6;">          digitalWrite(led3,0);</span><br><span style="background-color:#f8cac6;">          break; </span><br><span style="background-color:#f8cac6;">        }     </span><br><span style="background-color:#f8cac6;">         </span><br><span style="background-color:#f8cac6;">        case 69://打开风扇</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">          digitalWrite(m,1);</span><br><span style="background-color:#f8cac6;">          break;   </span><br><span style="background-color:#f8cac6;">        }    </span><br><span style="background-color:#f8cac6;">        </span><br><span style="background-color:#f8cac6;">        case 70://关闭风扇</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">          digitalWrite(m,0);</span><br><span style="background-color:#f8cac6;">          break; </span><br><span style="background-color:#f8cac6;">        }  </span><br><span style="background-color:#f8cac6;">            </span><br><span style="background-color:#f8cac6;">        case 71://显示温度</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">           byte temperature=0;</span><br><span style="background-color:#f8cac6;">           byte humidity=0;</span><br><span style="background-color:#f8cac6;">           dht11.read(&temperature, &humidity, NULL);</span><br><span style="background-color:#f8cac6;">           u8g2.setFont(u8g2_font_unifont_t_chinese2);    //设置字体</span><br><span style="background-color:#f8cac6;">           u8g2.firstPage();</span><br><span style="background-color:#f8cac6;">          do {</span><br><span style="background-color:#f8cac6;">              u8g2.setCursor(0,20);</span><br><span style="background-color:#f8cac6;">              u8g2.print("temperature:");   // Chinese "Hello World" </span><br><span style="background-color:#f8cac6;">              u8g2.print(int(temperature));</span><br><span style="background-color:#f8cac6;">             } while ( u8g2.nextPage() );</span><br><span style="background-color:#f8cac6;">          break;   </span><br><span style="background-color:#f8cac6;">        } </span><br><span style="background-color:#f8cac6;">           </span><br><span style="background-color:#f8cac6;">        case 72://显示湿度</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">           byte temperature=0;</span><br><span style="background-color:#f8cac6;">           byte humidity=0;</span><br><span style="background-color:#f8cac6;">           dht11.read(&temperature, &humidity, NULL);</span><br><span style="background-color:#f8cac6;">           u8g2.setFont(u8g2_font_unifont_t_chinese2);    //设置字体</span><br><span style="background-color:#f8cac6;">           u8g2.firstPage();</span><br><span style="background-color:#f8cac6;">          do {</span><br><span style="background-color:#f8cac6;">              u8g2.setCursor(0,20);</span><br><span style="background-color:#f8cac6;">              u8g2.print("temperature:");   // Chinese "Hello World" </span><br><span style="background-color:#f8cac6;">              u8g2.print(int(temperature));</span><br><span style="background-color:#f8cac6;">              u8g2.setCursor(0,40);</span><br><span style="background-color:#f8cac6;">              u8g2.print("humidity:");   // Chinese "Hello World"</span><br><span style="background-color:#f8cac6;">              u8g2.print(int(humidity));</span><br><span style="background-color:#f8cac6;">              u8g2.print("%");</span><br><span style="background-color:#f8cac6;">             } while ( u8g2.nextPage() );</span><br><span style="background-color:#f8cac6;">          break;      </span><br><span style="background-color:#f8cac6;">        } </span><br><span style="background-color:#f8cac6;">        </span><br><span style="background-color:#f8cac6;">        case 75://关闭显示</span><br><span style="background-color:#f8cac6;">        {</span><br><span style="background-color:#f8cac6;">          u8g2.clear();</span><br><span style="background-color:#f8cac6;">          break;   </span><br><span style="background-color:#f8cac6;">        }           </span><br><span style="background-color:#f8cac6;">       }</span><br><span style="background-color:#f8cac6;">     }</span><br><span style="background-color:#f8cac6;">}</span></p>
  • 其他功能演示.mp4

  • RGB演示.mp4

文档

Sheet_1

PCB_2021-07-16_19-55-43

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part
1 100uF C1 CAP-D6.3×F2.5 1
2 10u C2 C0805 1
3 0.1u C3 C0805 1
4 10uf C4,C5 C0402 2
5 0.1uf C6 C0402 1
6 XH-2AW CN1,CN2 CONN-TH_2P-P2.50_XH-2AW 2
7 SMAJ6.0CA D1 SMA_L4.4-W2.6-LS5.0-BI 1
8 LESD8H6.3T5G D2,D3 SOD-882_L1.0-W0.6-RD 2
9 LESD8D3.3CT5G D4,D5 SOD-882_L1.0-W0.6-BI 2
10 HDR-F-2.54_1x3 H1 HDR-F-2.54_1X3 1
11 HDR-M-2.54_1x4 J1,J2 HDR-M-2.54_1X4 2
12 LED-0603_B LED1 LED0603_BLUE 1
13 TC3535RGBE07-3CJH-E01 LED2 LED-SMD_6P-L3.5-W3.5-BL 1
14 LED-0603_R LED3 LED0603_RED 1
15 67-21S/HK3C-H5050M31N42936Z6/2T LED4,LED5,LED6 LED-SMD_L3.5-W2.8-RD 3
16 GMI9745P-32DB MIC1 MIC-TH_BD9.7-P2.54-D0.8-L-FD 1
17 SI2302_C305429 Q1,Q2,Q3 SOT-23_L2.9-W1.3-P1.90-LS2.4-BR 3
18 4.7k R1,R2,R3 R0805 3
19 3k R4,R5 R0805 2
20 100 R6,R8,R10 R0805 3
21 10K R7,R9,R11 R0805 3
22 10k R12,R13,R14,R15,R16,R17 R0402 6
23 MSK12C02 SW1 SW-TH_MSK12C02 1
24 K2-1820UA-A4SW-06 SW2,SW3 KEY-SMD_L4.0-W3.7-P4.0-LS4.3 2
25 K2-1187SQ-C4SW SW4 KEY-SMD_4P-L5.2-W5.2-P3.70-LS6.4 1
26 KF1002-02P-R3-FLG-ON-02B SW5 SW-TH_4P-L6.6-W10.8-P2.54-S7.62-BL 1
27 CI-C22GS02S U1 SMD-17_L20.0-W1.80-CI-C22GS02S 1
28 BL1117-33CX_JX U2 SOT223_JX 1
29 ESP-12F(ESP8266MOD) U3 WIFIM-SMD_ESP-12F-ESP8266MOD 1
30 OLED U4 OLED-9.6-4P 1
31 L9110S_C725793 U5 SOP-8_L5.0-W4.0-P1.27-LS6.0-BL 1
32 U-F-M5DD-Y-1 USB1 MICRO-USB-SMD_U-F-M5DD-Y-1 1

附件

附件名 下载
Schematic_#第六届立创电赛#离线语音桌面小助手_2021-07-18_18-34-27.pdf
BOM_#第六届立创电赛#离线语音桌面小助手_2021-07-18_18-34-40.csv
其他功能演示.mp4
RGB演示.mp4
sketch_jul27a3.ino
sample_1122.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