版本协议

CC-BY-NC-SA 3.0

专业版
#第七届立创电赛#充电协议功率测试仪

创建时间: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> <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="color:#95a5a6;font-size:14px;">关注充电头网后,发现他们使用Power-Z的一系列产品对充电设备进行评测。正巧这期训练营的案例是USB电流表,就有了仿制一款充电协议检测器的想法。</span></p> </div> <div class="document"> </div> <div class="document">协议检测</div> <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;">目前有关快充的社区方案多为供电设备,如充电宝、桌面电源,受电设备品类不多且支持协议单一,因此若要实现快充协议检测,无法仅依靠一颗协议芯片,部分协议需要软件实现。全协议需用到USB-C的DP、DM、CC引脚进行握手通讯,因此不可采用6P的USB-C接口,需要USB-C 16P接口。</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;">充电协议监测引脚为DP与DN,根据Power-Z文档,有如下表格:</p> <table style="border-collapse:collapse;width:97.8042%;height:110px;"><tr style="height:22px;"><td style="width:15.3548%;height:22px;"><strong class="ql-size-10">D+(DP)</strong></td> <td style="width:15.3548%;height:22px;"><strong class="ql-size-10">D-(DM)</strong></td> <td style="width:15.3548%;height:22px;"><strong class="ql-size-10">协议</strong></td> <td style="width:15.3548%;height:22px;"><strong class="ql-size-10">D+(DP)</strong></td> <td style="width:15.3548%;height:22px;"><strong class="ql-size-10">D-(DM)</strong></td> <td style="width:15.3548%;height:22px;"><strong class="ql-size-10">协议</strong></td> </tr><tr style="height:22px;"><td style="width:15.3548%;height:22px;">2.7V</td> <td style="width:15.3548%;height:22px;">2.7V</td> <td style="width:15.3548%;height:22px;">APPLE 2.4A</td> <td style="width:15.3548%;height:22px;">0.6V</td> <td style="width:15.3548%;height:22px;">0.6V</td> <td style="width:15.3548%;height:22px;">QC2.0 12V</td> </tr><tr style="height:22px;"><td style="width:15.3548%;height:22px;">1.2V</td> <td style="width:15.3548%;height:22px;">1.2V</td> <td style="width:15.3548%;height:22px;">SAMSUNG 2.0A</td> <td style="width:15.3548%;height:22px;">0.6V</td> <td style="width:15.3548%;height:22px;">3.3V</td> <td style="width:15.3548%;height:22px;">QC3.0</td> </tr><tr style="height:22px;"><td style="width:15.3548%;height:22px;">0.6V</td> <td style="width:15.3548%;height:22px;">0.0V</td> <td style="width:15.3548%;height:22px;">QC2.0 5V FCP AFC 9V</td> <td style="width:15.3548%;height:22px;">3.3V</td> <td style="width:15.3548%;height:22px;">0.6V</td> <td style="width:15.3548%;height:22px;">QC2.0 9V</td> </tr><tr style="height:22px;"><td style="width:15.3548%;height:22px;">0.0V</td> <td style="width:15.3548%;height:22px;">0.0V</td> <td style="width:15.3548%;height:22px;"> <p>DCP1.5A SDP 0.5A</p> <p>USB2.0 HS</p> </td> <td style="width:15.3548%;height:22px;">3.3V</td> <td style="width:15.3548%;height:22px;">0.0V</td> <td style="width:15.3548%;height:22px;">USB2.0 FS</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;">现阶段目标是实现QC/PD双协议检测,当前两种协议标准最高至QC4与PD3.1。</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;">PD协议分为“固定档位”与“可编程档位”,协商握手较复杂,使用一颗USB-PD控制芯片实现。USB-C与USB-A不同的是,USB-A在默认情况下输出为5V,而USB-C在无设备识别的情况下输出0V,因此USB-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;"> </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> <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;"><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> <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> <ol style="line-height:1.8;"><li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">拥抱开源,赋予项目无限价值。建议项目核心功能开源80%以上;</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">若某一部分功能不可替代且删掉之后项目无法解决对应的问题,则这一部分实现的功能就是项目的核心功能;比如设计了一台电子负载且设计了一款上位机软件监控功率变化,则电子负载为核心功能,上位机软件为辅助功能;比如电子负载中使用了一款隔离485模块与上位机通信,则此485模块实现的通讯功能为辅助功能;</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">项目应选择适合自己的<span style="text-decoration:underline;"><a href="/posts/98fdb2accd754af7b51990790db3b47a" target="_blank">开源协议</a></span>,若项目引用其他开源项目,应注明来源并遵循原作者的开源协议规定;原创项目推荐使用GPL3.0开源协议;</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">直接引用开源项目的原电路或原代码实现的功能不可作为自己项目的核心功能、使用市场上通用模块直接实现的功能不可作为自己项目的核心功能。</span></li> </ol><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;"><span style="color:#000000;font-size:14px;">设置一个独立USB-C口引出,旁边提供多等级电压源,不与主设备相连用于测试DP、DN配置下的QC等电压触发</span><span style="color:#000000;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> <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:#000000;font-size:14px;">PD协议触发使用FUSB302B芯片,该芯片有WLCSP9与WQFN14两种封装,WLCSP9封装可与<a title="RT1715WSC(C2976586)" href="https://item.szlcsc.com/3383493.html" target="_blank">RT1715WSC(C2976586)</a> Pin-to-Pin 替换。</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:#000000;font-size:14px;">FUSB302B最高支持PD2.0协议,而RT1715WSC可握手PD3.0协议(无<strong>Fast Role Swap</strong> (FRS))功能</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:#000000;font-size:14px;">协议芯片地址为0x44,0x45,当前进度可读取芯片的型号、版本号、步进。</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> <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:#000000;font-size:14px;">电压电流检测由INA219芯片完成,与MCU通过I2C通信。INA219在电路设计上配置I2C地址为0x40,写地址0x80,读地址0x81。</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:#000000;font-size:14px;">初始化配置寄存器地址0x00,在main函数中初始化并配置;工程使用了BUS电压读取与采样电压读取,经计算后分别得到USB的电压与电流。</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> <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:#000000;">软件使用Keil5开发,涉及I2C等相关代码</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="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> <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;">注:项目涉及的BOM清单。这个位置请上传BOM的截图。清单详情请以PDF的格式上传到附件中。建议包括型号、品牌、名称、封装、采购渠道、用途等内容。具体内容和形式应以表达清楚项目构成为准。</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;">*7、大赛LOGO验证</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;"><span style="color:#95a5a6;font-size:14px;">请上传包含大赛logo的项目图片,logo以丝印形式印刷在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;"><span style="color:#95a5a6;font-size:14px;">点击zip下载大赛logo标识! <span style="text-decoration:underline;"><a href="https://image.lceda.cn/easyedaResource/images/%E7%AB%8B%E5%88%9B%E7%94%B5%E8%B5%9B%E6%A0%87%E8%AF%86.rar" target="_blank">(大赛标识).zip</a></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;"> </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;"><span style="color:#95a5a6;font-size:14px;">视频要求:请横屏拍摄,分辨率不低于1280×720,格式Mp4/Mov,单个视频大小限100M内;</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:#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> <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:14px;">更多详情:<a href="/posts/06c94d90c2c447dfbd9ed7339ff4a5b1" target="_blank">https://diy.szlcsc.com/posts/d76d9cb41705430e9a54e7a5feed07a5</a></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> </div>

文档

BOM

暂无

附件

附件名 下载
VID_20220824_003723.mp4

成员

评论(3)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
立创电赛 回复
<p>项目进度如何啦·····</p>
Antonio 回复
<p>基本功能完成了,在完善细节</p>
c20160526 回复
<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