描述
<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;"> </p>
<p>这是一个使用DHT11,4位数码管,瑞萨ARM,CH343P构建的桌面电子时钟的项目。它可以显示当前的时间,日期,温度和湿度,并且可以通过按键进行设置和调整。同时,重新设计了锂电池供电电路,使用IP5306-CK和IP3005-A进行锂电池供电。</p>
<p> </p>
<ul>
<li>通过DHT11传感器获取当前的温度和湿度,并显示在数码管上</li>
<li>通过瑞萨ARM控制器获取当前的时间和日期,并显示在数码管上</li>
<li>通过CH343P芯片实现与电脑的串口通信,可以通过TYPE-C接口直接进行烧录</li>
<li>通过四个按键实现对时钟的控制,包括切换显示模式,调整时间和日期,设置闹钟等</li>
<li>通过使用IP5306-CK和IP3005-A进行锂电池供电。</li>
<li>通过OpenSCAD编辑3D外壳,实现完美贴合上下壳。(见附件)</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;">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;"> </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;">本项目为第八届立创电赛期间参加的2023年嘉立创EDA暑期训练项目的成果。为作者第一次进行电子设计,如有问题,请多指教。</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;"> </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;">项目采用 MIT 协议开源。<span style="color:#95a5a6;"><em><span style="font-size:12px;">(不过都是比较基础的东西)</span></em></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;">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;"> </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;">该项目在基本的示例项目上添加了CH343P作为串口通信元件,从而能够直接使用原有设计的供电Type C口进行串口通信,从而实现固件的烧录及相关功能。</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 src="//image.lceda.cn/pullimage/PcswlTJqjGik5gROLvaXZnBld83SF3WhuFH7ETk1.png" alt="PcswlTJqjGik5gROLvaXZnBld83SF3WhuFH7ETk1.png" width="537" height="186"></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;">本项目使用最为广泛使用的锂电池IC IP5306和IP3005A设计了充电电路和供电电路。不过需要注意的时,由于单片机电量消耗不大,推荐使用IP5306的遍体——IP5306-CK进行设计,该变体不会因为电流过小而自动休眠,保持常开供电,适合MCU应用供电。</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 src="//image.lceda.cn/pullimage/OCiKvVB73HDEThqRBScWCvwnKmaqJozxi85Ik3d6.png" alt="OCiKvVB73HDEThqRBScWCvwnKmaqJozxi85Ik3d6.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>
<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;">瑞萨ARM提供的电容式触摸引脚在原理图上标识的是使用一个1P的2.54直插插针,在实物设计上使用了一个弹簧来作为触摸电极。相关电容触摸的调优和测试将在软件部分进行进一步的介绍。</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 src="//image.lceda.cn/pullimage/C00wsGvUmt31eRDyQra0hOtjVDgm3MlO78RepQTz.png" alt="C00wsGvUmt31eRDyQra0hOtjVDgm3MlO78RepQTz.png" width="336" height="183"></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="color:#95a5a6;"><em><span style="font-size:12px;">(<span style="text-decoration:line-through;">对了本期训练营的螺丝尺寸前后使用的不一致,如果需要复刻一定要记得调整</span>。全新版本已经全部修正啦!!)</span></em></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 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;"> </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;">系统使用瑞萨R7FA2E1A72DFL作为主控芯片,软件方面使用e2 studio作为主要开发软件,主要代码也基本和本次训练营所讲解、培训使用的代码相同,不过由于笔者没有jlink作为调试器,所以开发过程中的调试主要依靠串口进行输出。在整体调试流程中,由于没有jlink,最为困难的点是电容式触摸的调优和测试。下面将就这一点进行叙述。</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;">在使用串口进行调优时,按照课程教程,首先在“瑞萨视图>Renesas QE”中选择“CapTouch Workflow(QE)”打开工作流,选择对应的项目、并参考教程配置好电容式按钮。</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 src="//image.lceda.cn/pullimage/2nhWnFE5Civyw9jOy9kTkDjmlbuznw2nT7PkW8hb.png" alt="" width="420" height="262"><img src="//image.lceda.cn/pullimage/HvHKeehB1cVys1vAWpK03Ol8MsPTZ4DB1bWu0eRh.png" alt="" width="421" height="372"></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;">然后,直接选择“Start Tuning(Serial)”并点击“Output Files”,生成测试程序</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 src="//image.lceda.cn/pullimage/YlpfDOn6KiWpQskvJAV4flv7mr4raMb69ro7ZK9t.png" alt="" width="343" height="167"></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;">此时有两种可以选择的方案:1、直接参考“qe_touch_sample.c”,撰写主程序;2、在程序的主循环中声明并调用“qe_touch_sample.c”中的“void qe_touch_main(void)”,也可以实现这一步的工作。</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;">同时,需要在配置中调整原有串口配置,将之前配置的串口配置到touch堆栈上,并且选择Touch堆栈,在属性界面中将“Support for QE Tuning using”切换为“Enabled”。</p>
<table style="border-collapse:collapse;width:96.8658%;height:136px;">
<tr style="height:136px;">
<td style="width:33.1842%;height:136px;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/97FP4nooH975tF6sfeSKe9GSXvmc8NrZ0oX5cOji.png" alt="" width="374" height="174"></td>
<td style="width:63.7674%;height:136px;"><img style="color:#333333;font-size:14px;margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/mwBrsbmCqmSn51ZuINQabl2wWQZLuwWCmI0ND7pC.png" alt="" width="499" height="122"></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;">完成以上工作后,保存项目配置、编译并烧写固件。然后选择对应的固件并开始调优,后续调优便与使用jlink进行调优一致。</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;">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;"> </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="text-decoration:line-through;">部分元件截图,完整BOM表见附件</span>。BOM表已更新,请以目前显示的BOM表为准。</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 src="//image.lceda.cn/pullimage/rzwdinav1v6gi6hgJdkl58e1GnVVWQPJehAmmylz.png" alt="" width="700" height="366"></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 style="line-height:1.8;"> </p>
<p style="line-height:1.8;"> </p>
<table style="border-collapse:collapse;width:97.8042%;">
<tr>
<td style="width:48.7411%;"><img src="//image.lceda.cn/pullimage/QaL9XhCB6vZzFtJsQDQXlXjlElrae2GCGI0g7tqq.png" alt="QaL9XhCB6vZzFtJsQDQXlXjlElrae2GCGI0g7tqq.png" width="504" height="301"></td>
<td style="width:48.7411%;"><img src="//image.lceda.cn/pullimage/5V3OkOI8EcFrjWDRnLta83WufrBisYrafwlFd3hs.png" alt="5V3OkOI8EcFrjWDRnLta83WufrBisYrafwlFd3hs.png" width="367" height="307"></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>
<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;">相关演示视频见附件。</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;">9、复刻建议</h3>
<hr class="horizontal-splitline normal-bold-2">
<p> </p>
<ol>
<li>请格外注意ip3005 2.2uf的电容,容值不当会在放电时出现明显啸叫;</li>
<li>CH343P封装较小,焊接推荐使用加热台焊接;</li>
<li>相关3D外壳文件(.stl)和3D外壳调整文件(.scad)已经上传在附件中,使用OpenSCAD修正时需要注意先在编辑器里下载3D外壳并放在合适的目录下。</li>
<li>3D外壳推荐下单时不粗磨,原因是粗磨可能导致上下壳体外表面贴合程度不高,建议自己拿到手后合起来一起打磨侧面,效果更好。</li>
<li>3D外壳修正可能略有误差,可以适当调整。</li>
</ol>
</div>
-
立创电赛:《桌面时钟》-时间设定.mp4
-
立创电赛:《桌面时钟》-功能切换(时间温度及湿度).mp4
-
立创电赛:《桌面时钟》-闹钟设定及蜂鸣器.mp4
评论(3)