版本协议

GPL 3.0

标签
专业版
#第七届立创电赛#2022暑期训练营 USB电能采集表

创建时间:2年前

2202 1

描述

<div class="document"> <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><span style="color:#0093e6;">请在报名阶段填写 ↓</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;"> </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> <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;">1.能够测量电压(MAX<=6V),电流(MAX<=5A) (5V/5A输入带负载测试10分钟,USB口附近差不多有60多度),能够测量功率,电能计量,电能存储,电能历史查询</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;">2.在普通版本的基础上添加了两个按键:START和HISTORY,用于进入不同的界面</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;">  可以在该界面看到实时电压电流和功率,长按START进入电能测量界面,长按HISTORY可以翻转屏幕。单击START或者HISTORY可以切换电压或者电流波形显示界面。</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;">  在测量电压电流界面,长按START进入电能测量界面,可以看到当前的电压,电流,电能,以及电能计量的时间,还有电流方向。在进入电能测量界面后,单击START,此时时间开始计时,接下来每单击一次HISTORY,便会将当前的电压,电流,电能,运行时间记录下来,最多记录8次(最多单击8次),超过八次会覆盖第一次数据(以此类推),长按START退出电能计量界面。</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;">  在测量电压电流界面,单击HISTORY按键,进入历史电能查询界面,此时界面上显示为记录的电压,电流,电能,记录的时间,以及记录页(总共8页),单击START,向右切换记录页,单击HISTORY,向左切换记录页。长按START,清除记录的所有电能数据,长按HISTORY退出历史电能查询界面,回到电压电流检测界面。</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;">3.历史电能存储</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;">   在第2节中介绍如何通过按键进行电能存储,删除。没用EEPROM,用的是芯片内部FLASH模拟EEPROM的存储功能。</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;">4.波形绘制</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;">   能够对电压,电流,功率进行波形绘制(不准确,因为屏幕Y轴只有32个点,不能细分很多)。</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:#95a5a6;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> <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 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><span style="color:#0093e6;">请在竞赛阶段填写 ↓</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;"> </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 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;">1.ADC采样</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;"> 开了两个通道,因为一个采电压,一个采集电流,没有开启连续转换模式,我是用定时器每10MS触发一次采样,采20个点(非连续),做一个滤波处理,所以计量数据差不多是1S刷新5次。</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;">2.按键长按短按</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;">3.电能相关数据存储</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;">    用了一个二维数组data[8][4],第一维度代表存储页数,总共八页(可以改成更多,但是我觉得没必要),第二维度代表数据:电压,电流,电能,时间。在长按START退出的时候,会把数据存到FLASH里,用了一个for循环把这个二维数组的数据存进去,下次开机再读出来。</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/KjKoST6mJOADTWCZwaJSoEJKq7KxRNpHxUH3qntM.png" alt="KjKoST6mJOADTWCZwaJSoEJKq7KxRNpHxUH3qntM.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 src="//image.lceda.cn/pullimage/lXDBxyH8qIMU7yUpgM1b9Q680atx2H5VgSLBfLXu.png" alt="lXDBxyH8qIMU7yUpgM1b9Q680atx2H5VgSLBfLXu.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 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;"> </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/P16kQjxBXFQGRU1LGiDLjvtbYxLcGYvjuMPQuSWM.jpeg" alt="" width="1000" height="450"></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;">5V/5A灌进去看看</p> <p style="line-height:1.8;">实测</p> <p style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/LWJb3iz2Wc0oX6l24zW0kywM1QJyg5jdaTN7Htzm.jpeg" alt="" width="1200" height="1200"></p> <p style="line-height:1.8;">电子负载</p> <p style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/VWL52euBWuTIWiXAIGtrIx31b6x4c7fiLK9bwjgP.jpeg" alt="" width="1200" height="705"></p> <p style="line-height:1.8;"><span style="font-size:18px;">通了10分钟,鼓起勇气摸了一下,能接受</span></p> <p style="line-height:1.8;"><span style="font-size:24px;">如果要用的话,使用范围尽量控制在5V2A以内吧,毕竟长时间,USB扛不住。</span></p> <p style="line-height:1.8;"> </p> <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> </div>

文档

BOM

暂无

附件

附件名 下载
USB_Pow_Meter.hex
演示视频.mp4

评论(3)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
立创电赛 回复
<p><span class="colour" style="color: rgb(85, 85, 85);">项目进度怎么样啦,板子上记得打立创电赛logo哦</span></p>
check_out 回复
<p>啊,板上没打耶,但是我UI做了,视频演示的时候会有的</p>
立创电赛 回复
<p>@check_out 立创电赛需要板子上有logo哦</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