版本协议

Public Domain

标签
专业版
#第十届立创电赛#立创开发板AI训练营-6124945A

创建时间:2个月前

60 0

描述

<div> <p style="line-height:1.8;"> </p> <div> <h1>一、项目介绍</h1> <div><hr></div> <div> <div> <div style="background-color:#fff5eb;border-color:#fed4a4;"> <div>问天气?问时间?问病情? 基于 SF32LB52 的小智 AI 对话机器人,带着整个互联网的知识,解决你的疑难杂问。</div> </div> </div> </div> <div>基于 立创开源蓝牙模组 制作的简易AI对话机器人,实现AI实时语音对话。它能够听懂你的情绪,解答你的疑惑,也能分享你的快乐。</div> <h2>尺寸便携精致</h2> <div><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/nX8HsCQG94BNEWbmKf9fGgpvaDtJKWXXWvrpzZow.jpeg" alt="" width="1200" height="658"></div> <div> </div> <div> </div> <div> </div> <div style="text-align:center;"><strong><img src="//image.lceda.cn/pullimage/n7rkIKdnUPkkAxJQSbi5MoxN2P9A26NUlmEPjRBl.jpeg" alt="" width="1200" height="660"></strong></div> <div style="text-align:center;"><strong>PCB焊接实物图</strong></div> <div style="text-align:center;"><strong><img src="//image.lceda.cn/pullimage/yjIcLX7yHl4WhJvQ7Edwe7ta5I4TKYQOBoXVrmat.jpeg" alt="" width="1200" height="900"></strong></div> <div style="text-align:center;"><strong>模块组装实物图</strong></div> <div> </div> <h2>软件全开源,烧录即可体验</h2> <div>软件开源地址:https://github.com/78/xiaozhi-sf32</div> <h1>二、硬件电路分析</h1> <div><hr></div> <div> </div> <h2><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/HdHRi3aQDPVKZpDaF0LX3ppyfwY1Dy7SRmDeCdeE.png" alt="" width="1178" height="835"></h2> <h2 style="text-align:center;"><strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">完整原理图</strong></h2> <h2><strong>电源部分</strong></h2> <div> <p><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/lrFYy5amgv7w2zUVqAnt5ArTYXUM1KP0fc1dsiis.png" alt="" width="483" height="291"></p> <p style="text-align:center;"><strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">电源部分的电路</strong></p> </div> <h2><strong>主控部分</strong></h2> <div style="text-align:center;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/2j5cB2wFs1kv3x4ORnalfhkTN9vfVD5dyWhpxLkW.png" alt="" width="407" height="480"> <p> </p> <strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">主控部分的电路</strong></div> <div>主控用的是 [立创·开源SF32LB52模组](<u>https://item.szlcsc.com/45024582.html</u>),一款蓝牙低功耗芯片,频率 <strong>240MHz</strong>,集成 8MB PSRAM 和 16MB Flash,支持锂电池直接供电。BLE 连接功耗(1S间隔)仅需 7μA,BT连接功耗(1S间隔)仅需 10μA,BLE + BT 双连接功耗比同行单BT连接功耗还能降低 60%。</div> <div>模组支持 BT PAN 功能可以直接连接手机上网,相比 WIFI 功耗更低,更加适合电池场景,带屏连接功耗仅 <strong>30mA</strong>。</div> <div>在本项目中,直接让电池电源直连模组的电源输入引脚 VSYS。这里需要注意<span style="color:#d83931;"><code>该模组电压范围要求 3.7V~4.7V</code></span>。3.3V 和 5V 供电都不行。</div> <div>模组的 VDD33_VOUT2 是由软件控制输出的,需要芯片正常启动后才有输出3V3。</div> <h2><strong>音频功放部分</strong></h2> <p><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/Zkk4OIi8P6RvRzbUPXjCF93ka7U3qm6Ofxhjadr2.png" alt="" width="1035" height="348"></p> <div> <p style="text-align:center;"><strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">音频功放部分的电路</strong></p> </div> <div> <div> <div style="background-color:#f0fbef;border-color:#b7edb1;"> <div><strong>声音大小控制</strong></div> <div>通过实际测试发现,项目原理图中的 R7 和 R8 电阻跟声音大小成线性关系,两个电阻越大,声音越小;两个电阻越小,声音越大。但是声音的大小始终不会超过喇叭的实际可输出声音大小。毕竟该芯片只有 1W 的功放输出。 W 数越大,功率越高,耗电越大,声音越响。</div> </div> </div> </div> <div> <div> <div style="background-color:#f0fbef;border-color:#b7edb1;"> <div><strong>噪声控制</strong></div> <div>通过实际测试发现,项目原理图中的 C2 和 C5 电容跟噪声消除有关,具体如何调整数值达到理想效果参考该芯片的数据手册说明。这里简洁为一句话:高频噪声放小电容滤除,低频噪声放大电容滤除。</div> </div> </div> </div> <h2><strong>麦克风部分</strong></h2> <div> <p><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/mXe929t3zoRPmyjAHPYkUemBKSF39PMfxrKxI8ay.png" alt="" width="586" height="372"></p> <p style="text-align:center;"><strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">麦克风部分的电路</strong></p> </div> <div>麦克风咪头(通常为驻极体话筒)的核心是一个<strong>可振动</strong>的极板(振膜)与固定背极板组成的电容。</div> <div>当声音振动波作用在振膜上时,会导致其与背极板的距离动态变化,从而改变电容值。当有声音时,器件内部电容发生变化,这一变化会引发电容两端的电荷移动,产生微弱的交流电信号(模拟信号)。</div> <div>但是虽然麦克风内部的驻极体材料自带永久电荷(无需外部供电维持电场),即使没有电源输入,麦克风也能够使用,但是为了确保麦克风能够正常稳定的工作,通常是需要提供一个基准电压(通常2~5V),使内部电容处于预充电状态,确保声音引起的电容变化能转换为有效电流信号。</div> <div>在原理图中,R3 电阻的作用就是给麦克风的正极输入一个基准电压MIC_BIAS,这个电压是由模组控制输出的,由模组控制则可以在要用时才输出,不用时关闭,实现低功耗。R3 的电阻值为 10K,测试效果能够接受,过低则采集的音频信号弱,过高则易引入噪声。</div> <div>在原理图中,U4 电容的作用就是对采集的信号进行滤波,滤除高频噪声,大多是滤除滋滋滋的声音或者声音沙哑问题。</div> <h2><strong>屏幕显示部分</strong></h2> <p><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/L0qDZvPjtjzk1Jx6qVagGMHpimuA0pUxYSIzEGKE.png" alt="" width="434" height="311"></p> <div> <p style="text-align:center;"><strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">屏幕显示部分的电路</strong></p> </div> <div>屏幕显示使用的是 1.69寸TFT屏幕,采购自 <a href="https://item.taobao.com/item.htm?id=694205959541" target="_blank">金逸晨1.69寸TFT液晶屏ST7789小屏240x280显示器LCD圆角屏SPI彩屏</a>,</div> <div>屏幕通过SPI协议控制,供电 3.3V。</div> <div>这里SPI的通信控制信号引脚,可以使用主控的硬件SPI外设,实现更高的通信速率,更快的屏幕刷新。但是使用主控的硬件SPI外设,则需要选择特定的引脚。</div> <div><strong>模组与屏幕的连接</strong></div> <div> <table style="border:none;border-collapse:collapse;table-layout:fixed;width:500px;"> <tr style="height:39px;"> <th style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;font-weight:500;background-color:#f2f3f5;text-align:left;" colspan="1" rowspan="1"> <div style="text-align:left;">模组</div> </th> <th style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;font-weight:500;background-color:#f2f3f5;text-align:left;" colspan="1" rowspan="1"> <div style="text-align:left;">1.69寸TFT屏幕</div> </th> <th style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;font-weight:500;background-color:#f2f3f5;text-align:left;" colspan="1" rowspan="1"> <div style="text-align:left;">说明</div> </th> </tr> <tr style="height:39px;"> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">GND</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">GND</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:left;">屏幕电源地</div> </td> </tr> <tr style="height:39px;"> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">VDD33_VOUT2</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">VCC</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:left;">屏幕电源输入</div> </td> </tr> <tr style="height:39px;"> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">PA04</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">DO(SCL)</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:left;">屏幕通信时钟引脚</div> </td> </tr> <tr style="height:39px;"> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">PA05</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">D1(SDA)</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:left;">屏幕通信数据引脚</div> </td> </tr> <tr style="height:39px;"> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">PA00</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">RES</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:left;">屏幕屏幕复位引脚</div> </td> </tr> <tr style="height:39px;"> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">PA06</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">D/C</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:left;">屏幕读写功能引脚</div> </td> </tr> <tr style="height:39px;"> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">PA03</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">CS</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:left;">屏幕通信片选引脚</div> </td> </tr> <tr style="height:39px;"> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">PA42</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:center;">BLK</div> </td> <td style="border:1px solid #dee0e3;font-size:10pt;padding:8px;vertical-align:top;" colspan="1" rowspan="1"> <div style="text-align:left;">屏幕背光控制引脚,高电平屏幕背光亮</div> </td> </tr> </table> </div> <div><strong>模组的引脚复用表</strong></div> <div> </div> <h2><strong>按键部分</strong></h2> <p><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/e7zhYV4Q3ivMAG2mCMYmPMEebT1L6dsVESKrOm5b.png" alt="" width="622" height="254"></p> <div> <p style="text-align:center;"><strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">按键部分的电路</strong></p> </div> <div>每一个项目基本都需要有人机交互部分,本项目通过按键进行控制,U2 PA34_KEY 是唤醒键 + 语音输入键,按下 U2 按键可以让主控从低功耗睡眠状态唤醒,当主控正在工作时,按下按键进行语音输入。</div> <div>U1按键目前待定用途,设计出来备用。</div> <h2><strong>指示灯部分</strong></h2> <p><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/Xdnv88ikvZs79sxutwd1sUyB1BE5tLtcy2PNmCMM.png" alt="" width="597" height="165"></p> <div> </div> <div style="text-align:center;"><strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">指示灯部分的电路</strong></div> <div>用于指示模组状态。通过模组IO控制。IO输出低电平LED灯亮,IO输出高电平LED灯灭。</div> <h2><strong>下载部分</strong></h2> <p><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/IE9fZrOxTNQ8WJ0dKoR5CmUayCHofusODOz8mJZl.png" alt="" width="596" height="239"></p> <div> <p style="text-align:center;"><strong style="font-size:13.3333px;text-align:center;background-color:#f2f3f5;">串口下载部分的电路</strong></p> </div> <div>模组的下载是通过串口进行下载的,必须使用 PA18 和 PA19 引脚下载。</div> <div>本项目直接使用 <a href="https://item.szlcsc.com/51679391.html?fromZone=s_s__%2522CH340X%2522&spm=sc.gbn.xh2.zy.t___sc.hm.hd.ss&lcsc_vid=QVhbAlYAFlcKVQIAFQBcBFNSElNbUgFTTlNXXgZVTwIxVlNTRlVbV1dUQ1BXVDtW" target="_blank">CH340X 模块</a>的接口作为下载器。实测能够正常下载和串口调试通信。</div> <div> </div> </div> </div>

文档

BOM

暂无

附件

附件名 下载
IA小智V1.0.stl

评论(1)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
立创电赛 回复
<p>立创电赛:记得上传验证视频哦~</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