标准版
#第七届立创电赛#带有hub的USB功率计(带有上位机软件)

创建时间:2年前

描述

<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;"><span style="font-size:24px;">这是一款USB功率计,并且带有hub可以连接蓝牙鼠标与键盘的USB,板载CH340芯片通过HUB与计算机USB连接,搭配Labview编写的上位机软件可以实现电压、电流、功耗的实时监测,在调试其他硬件时可以很容易的得到硬件的功耗情况与功耗水平。<img src="//image.lceda.cn/pullimage/kEKx7O1kyctyl9Ur2nusmfus3zFwfXsPKqgEZcA4.png" alt="kEKx7O1kyctyl9Ur2nusmfus3zFwfXsPKqgEZcA4.png"></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;">*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="font-size:24px;">立创训练营纯原创项目</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:#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;"><span style="font-size:24px;">采用国民技术N32G430系列芯片作为主控,负责采样电压与电流、进行简单功耗运算并驱动OLED(0.96)。</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:24px;">电流采样部分采用INA199芯片,采样电阻为40mΩ(由于我经常做的项目功耗不大,更需要关注小电流、低功耗的情况因此采用了较大的采样电阻),最大可实现1.6A电流的采样,若想达到更大的电流可更换采样电阻。</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:24px;">功率计带有SL2.1Ahub芯片,该芯片可以提供USB1转4路,其中一路连接板载的CH340用于串口通讯以及程序下载,其他三路引出可搭载外设进行数据传输。(采样的电流是三路的电流总和)</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:24px;">采用立创eda标准版进行PCB设计(会尽快转到专业版的~) PCB成品见下图</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 src="//image.lceda.cn/pullimage/vLfqcIzbZr7ZRvyZdwku5yRHD9pwhkF2x3UbNiiz.jpeg" alt="vLfqcIzbZr7ZRvyZdwku5yRHD9pwhkF2x3UbNiiz.jpeg"></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;">利用立创eda专业版进行外壳设计,三维猴进行3D外壳打印,效果灰常不错</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 src="//image.lceda.cn/pullimage/11Yg5DapGzSi2ELpmJz2dr1p9DZleW2vMf9OLYud.png" alt="11Yg5DapGzSi2ELpmJz2dr1p9DZleW2vMf9OLYud.png"><img src="//image.lceda.cn/pullimage/hjDDjIWwTAeihXuENBNyfjIf3NwhZSmkeqXvru9N.png" alt="hjDDjIWwTAeihXuENBNyfjIf3NwhZSmkeqXvru9N.png"><img src="//image.lceda.cn/pullimage/Nr9vgFKnjdksLrJXnCfpYUF3tOQd10Pjh5IfNEUh.png" alt="Nr9vgFKnjdksLrJXnCfpYUF3tOQd10Pjh5IfNEUh.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;">*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:#0d0101;"><span style="font-size:24px;">软件部分采用Keil5进行编程,主要参考了国民技术的官方立创,具体有:</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:#0d0101;"><span style="font-size:24px;">1.使能定时器产生1s定时,每隔1sRGB蓝灯闪烁表示程序正在运行,并利用串口向电脑发送一次数据</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:#0d0101;"><span style="font-size:24px;">2. 使能串口printf打印函数</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:#0d0101;"><span style="font-size:24px;">3. 每间隔1s,对电流与电压进行相乘得到功率累加得到mWh的数据</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:#0d0101;"><span style="font-size:24px;">上位机软件采用LabVIEW编写,主要是串口信息读取与功耗作图。</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:#0d0101;"><span style="font-size:24px;"><img src="//image.lceda.cn/pullimage/nL1dvhGpk4BwvZ1N6RSXRXGfb6Ap0sFRCgekd1rF.png" alt="nL1dvhGpk4BwvZ1N6RSXRXGfb6Ap0sFRCgekd1rF.png"></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 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;"><span style="font-size:24px;"><img src="//image.lceda.cn/pullimage/DFA3u6ZVG6On3xpMcu7lrfY3vLAV5oFp0X3Z3C1K.png" alt="DFA3u6ZVG6On3xpMcu7lrfY3vLAV5oFp0X3Z3C1K.png"></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:24px;">芯片都是在立创买的啦,ch340、sl2.1a、n32g430一共10块拿下,oled淘宝十元差不多,外壳五块阻容以及接口算5块,一共三十元轻松拿下</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;">*7、大赛LOGO验证</h3> <hr class="horizontal-splitline normal-bold-2"><p style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/d53IOZ57baGhDsgxcKpgjYgN4Sz34E4gSbmDngNJ.png" alt="d53IOZ57baGhDsgxcKpgjYgN4Sz34E4gSbmDngNJ.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/AwM1EmpiwloLgQg9EQXFHezPGmRK52sflT2hbLyg.png" alt="AwM1EmpiwloLgQg9EQXFHezPGmRK52sflT2hbLyg.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;">* 8、演示您的项目并录制成视频上传</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;">视频有点大,上传有点慢可以移步B站:<a href="https://www.bilibili.com/video/BV1eG411479K?spm_id_from=333.999.0.0" target="_blank">立创&国民技术训练营_带有USB hub的功率计_哔哩哔哩_bilibili</a></p> </div>

文档

Sheet_1

PCB_#第七届立创电赛#usb功率计

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part
1 HDR-M-2.54_1x2 A-TEST1 HDR-M-2.54_1X2 1
2 0.04 BR1 R2512 1
3 0.1u C1,C2,C3,C4,C5,C6,C7,C8,C12,C15,C16,C17,C18,C19,C20,C21,C22 C0603 17
4 2.2u C9,C10,C11 C0805 3
5 22u C13,C14,C24 C0805 3
6 4.7u C23 C0603 1
7 1N4148WS-C112663 D1 SOD-323_L1.8-W1.3-LS2.5-RD 1
8 BSMD1206-200-12V F1 F1206 1
9 X6511FV-04-C85D32 H1 HDR-TH_4P-P2.54-V-F 1
10 XL-3528RGBW-HM LED1 LED-SMD_4P-L3.2-W2.8-LS3.5-BL-CW 1
11 LED-0603_G LED2,LED3 LED0603_GREEN 2
12 10k R1,R2 R0603 2
13 22 R3,R4 R0603 2
14 1k R5,R6,R7,R10 R0603 4
15 5k R9 R0603 1
16 TS-1109S-C-A SW1,SW4 SW-SMD_4P-L4.5-W4.5-P3.00-LS7.0 2
17 TS-1185EC-C-D-B SW2 SW-SMD_4P-L3.7-W3.0-P1.50-LS4.7 1
18 SK-3296S-01-L1 SW3 SW-SMD_3P-P1.50_L2.7-W6.6 1
19 SL2.1A U1 SOP-16_L10.0-W3.9-P1.27-LS6.0-BL 1
20 INA214AIDCKR U2 SC-70-6_L2.2-W1.3-P0.65-LS2.2-BR 1
21 26MHZ晶振3225_C9900001865 U3 CRYSTAL-SMD_4P-L3.2-W2.5-BL 1
22 AMS1117-ADJS U4 SOT-89-3_L4.5-W2.5-P1.50-LS4.1-BL 1
23 N32G430C8L7 U5 LQFP-48_L7.0-W7.0-P0.50-LS9.0-BL 1
24 CH340N_C2977777 U6 SOP-8_L4.9-W3.9-P1.27-LS6.0-BL 1
25 U263-163N-4GS1735 U7 USB-C-SMD_U263-163N-4GS1735 1
26 U221-041N-1WR69-F5 USB1,USB2,USB4 USB-A-TH_U221-041N-1WR69-S-5 3
27 U254-051N-4BH806 USB3 MICRO-USB-SMD_U254-051N-4BH806 1

附件

附件名 下载
usb电压表.vi
N32G430C8L7-USBMeter.zip
cce0d677389191c792e861ef19fbce2a.mp4

评论(21)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
andylauren 回复
<p>这个得奖了吧</p>
zhaoshaox 回复
<p>666</p>
bruss 回复
<p>群除我佬(ง •̀_•́)ง加油</p>
SJ_USER 回复
<p>666</p>
少不入川 回复
<p>666</p>
RogerHD 回复
<p>6</p>
clysgs 回复
<p>学习 学习</p>
玻尔能级 回复
<p>功能强大</p>
HLzw233 回复
<p>有点东西(doge)</p>
xc777 回复
<p>666</p>
Green_Hand 回复
<p>精致</p>
立创电赛 回复
<p>logo验证需要实物图哦</p>
TuZXXX 回复
<p>巨佬,可以发下下外壳文件不:)</p>
养乐多 回复
<p>外壳文件、程序源文件、串口下载工具以及上位机Vi都放到微云里面啦https://share.weiyun.com/UbZ5PjA9<br><br/>上位机Vi只能用LabView打开,安装包太大了就没传,有需要的可以私信</p>
fenglan 回复
<p>你好,请问下载时Boot需要接到3.3V吗</p>
养乐多 回复
<p>是的,BOOT拉高然后rst</p>
eyekey 回复
<p>不错不错</p>
邓子言 回复
<p>可以发一下编译好的固件吗?谢谢</p>
邓子言 回复
<p>楼主你好,如果想达最高支持3A电流检测的话,采样电阻40毫欧换成多少合适呢?谢谢</p>
养乐多 回复
<p>INA199用的放大倍数是50,保证放大后的电压不超过单片机的量程就好,对于3A电流可以换成10毫欧</p>
邓子言 回复
<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