版本协议

CC-BY-NC-SA 3.0

标准版
#第六届立创电赛#ESP32两相四线混合式步进电机闭环驱动器

创建时间:3年前

描述

<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"><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;text-align:justify;"><span style="color:#000000;">步进电机因其定位精度高、造价较低、控制简单而在生产生活中被广泛应用</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;text-align:justify;"> </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;text-align:justify;"><span style="color:#000000;">闭环步进电机相较于开环步进电机具有一定的过载能力不会丢步,可以根据负载调节电流从而降低电机发热</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;text-align:justify;"> </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;text-align:justify;"><span style="color:#000000;">由于芯片价格飞涨,闭环步进电机控制器造价水涨船高,本设计提出了一种以国产芯片ESP32为主控的闭环步进电机控制器方案</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;text-align:justify;"> </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;text-align:justify;"><span style="color:#000000;">本设计以杨工的闭环步进电机驱动器为基础,硬件方面做了修改和重新设计,软件方面对代码进行了移植以及重构,并抽取出Grbl_ESP32的部分代码作为核心算法的运行框架</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;text-align:justify;"> </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;text-align:justify;"><span style="color:#000000;"><strong>特性:</strong></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;text-align:justify;"><span style="color:#000000;"><strong>1、EN/DIR/STEP接口控制,兼容3D打印机主板</strong></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;text-align:justify;"><span style="color:#000000;"><strong>2、串口/蓝牙/Telnet在线调参</strong></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;text-align:justify;"><span style="color:#000000;"><strong>3、3.3A峰值电流</strong></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;text-align:justify;"><span style="color:#000000;"><strong>4、位置闭环/位置开环模式可切换</strong></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;text-align:justify;"><span style="color:#000000;"><strong>5、过热保护</strong></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;text-align:justify;"><span style="color:#000000;"><strong>6、电压监测</strong></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;text-align:justify;"><span style="color:#000000;"><strong>7、实时数据反馈</strong></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;text-align:justify;"><span style="color:#000000;"><strong>典型应用:</strong></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;text-align:justify;"><span style="color:#000000;"><strong>1、3D打印机、激光雕刻机、平面绘图仪</strong></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;text-align:justify;"><span style="color:#000000;"><strong>2、机器人</strong></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;text-align:justify;"><span style="color:#000000;"><strong>3、电动滑台</strong></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;text-align:justify;"><span style="color:#000000;"><strong>4、智能窗帘</strong></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;text-align:justify;"><span style="color:#000000;"><strong>5、电动转盘</strong></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 style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/aj01nyuauIaMpA3oaM77ghiXP8JLW4ClB9JB9DSr.png" alt="aj01nyuauIaMpA3oaM77ghiXP8JLW4ClB9JB9DSr.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;text-align:center;">图1 arduiino风格引脚图</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:#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;"><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;"><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;"><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;"> </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;"><strong>开源协议: CC-BY-NC-SA 3.0</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> <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;">引用:<a href="/HyperCNC/yi-ti-hua-di-cheng-ben-gao-su-gao-jing-du-quan-bi-huan-bu-jin-dian-ji" target="_blank"><strong>#第四届立创大赛#HyperStepper一体化低成本高速高精度全闭环步进电机</strong></a> (开源协议:BSD)</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;">引用:<a href="https://github.com/bdring/Grbl_Esp32" target="_blank"><strong>Grbl_Esp32</strong></a>(开源协议:GPL-3.0)</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><a href="/Knight_Sin/bi-huan-bu-jin-dian-ji-kong-zhi-qi" target="_blank">【航顺训练营】闭环步进电机控制器</a></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;">自我引用:<strong><a href="/Knight_Sin/bi-huan-bu-jin-dian-ji-kong-zhi-qi_copy" target="_blank">ESP32闭环步进电机控制器</a></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;"><strong><span style="color:#000000;font-size:14px;">(1)驱动电路:</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;padding-left:40px;"><span style="color:#000000;"><span style="color:#000000;">本设计以两片A4950芯片作为驱动芯片,该芯片为全桥式DMOS PWM电机驱动,并且具有电流限制功能,依据此功能可实现恒流控制</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;padding-left:40px;"> </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;padding-left:40px;"><span style="color:#000000;"><span style="color:#000000;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/1ZW8O2q9X8nonUUj8RmtNqft44TryUgTca9SHMze.png" alt="1ZW8O2q9X8nonUUj8RmtNqft44TryUgTca9SHMze.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" style="line-height:1.8;padding-left:40px;text-align:center;"><span style="color:#000000;"><span style="color:#000000;">图2 A4950结构框图</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;padding-left:40px;text-align:center;"> </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;padding-left:40px;text-align:left;"><span style="color:#000000;"><span style="color:#000000;">通过调节Verf引脚电压即可改变恒输出电流的大小,Imax</span></span> = Verf/(10*Rsense),本设计中,将两只A4950的Verf引脚分别连接至ESP32的DAC输出引脚,使用0.1Ω的电流采样电阻,故最大输出3.3A电流</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;padding-left:40px;text-align:center;"> </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;padding-left:40px;text-align:left;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/6Fh8m2m2ZoQdXKOr2OTIqdYxsReg3mduYBffoALU.png" alt="6Fh8m2m2ZoQdXKOr2OTIqdYxsReg3mduYBffoALU.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;padding-left:40px;text-align:center;">图3 A4950电路图</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;padding-left:40px;text-align:center;"> </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:#000000;font-size:14px;">(2)BUCK降压电路&LDO降压电路:</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;padding-left:40px;"><span style="color:#000000;font-size:14px;">本设计中,控制系统电源由电机电源经BUCK电路降压至5V并通过LDO降压电路二次降压后得到</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;padding-left:40px;"><span style="color:#000000;font-size:14px;">本设计采用的BUCK芯片型号为JW5026,其耐压值高达40V,最大输出1A电流,其需要的外围元件数量少、滤波感感量要求低,故非常节约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;padding-left:40px;"><span style="color:#000000;font-size:14px;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/wfcENinDP8Hm1JNESqZIrHDqWjHH5I4UtSy4Pe7u.png" alt="wfcENinDP8Hm1JNESqZIrHDqWjHH5I4UtSy4Pe7u.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;padding-left:40px;text-align:center;"><span style="color:#000000;font-size:14px;">图4 BUCK降压电路</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;padding-left:40px;text-align:center;"> </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;padding-left:40px;text-align:left;"><span style="color:#000000;font-size:14px;">本设计使用的LDO型号为其最大输出电流可达900mA,非常适合为ESP32供电</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;padding-left:80px;text-align:left;"> </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;padding-left:80px;text-align:left;"><span style="color:#000000;font-size:14px;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/GfUvv43fbn7X5iWdGO6868cDtGcnWXyGLawA5irg.png" alt="GfUvv43fbn7X5iWdGO6868cDtGcnWXyGLawA5irg.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;padding-left:80px;text-align:center;"><span style="color:#000000;font-size:14px;">图5 LDO降压电路</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;padding-left:80px;text-align:left;"> </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;text-align:left;"><span style="color:#000000;font-size:14px;"><strong>(3)外部信号输入电路:</strong></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;text-align:left;padding-left:40px;"><span style="color:#000000;font-size:14px;">本设计将外部输入信号用光耦进行隔离,其中EN为低低速信号,故使用低速光耦,DIR/CLK信号为高速信号,故使用高速光耦</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;text-align:left;padding-left:40px;"><span style="color:#000000;font-size:14px;"><strong><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/uu8AFH9fLOTD4hcYlfqyZCj3PAkIU0PuKloyDNcf.png" alt="uu8AFH9fLOTD4hcYlfqyZCj3PAkIU0PuKloyDNcf.png"></strong></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;padding-left:40px;text-align:center;"><span style="color:#000000;font-size:14px;">图6 外部输入信号电路</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;padding-left:40px;text-align:center;"> </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;text-align:left;"><span style="color:#000000;font-size:14px;"><strong>(4)MCU最小系统:</strong></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;text-align:justify;padding-left:40px;"><span style="color:#000000;font-size:14px;">本设计使用ESP32-PICO-D4作为主控,其集成了晶振/SPI FLASH/RF滤波电路/退耦电容等,所需外围元器件非常少</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;text-align:justify;padding-left:40px;"><span style="color:#000000;font-size:14px;">本设计预留了一个GH1.25 6pin接口作为程序烧录接口以及串口通信接口</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;text-align:justify;padding-left:40px;"> </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;text-align:left;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/zQT5xxP6KiLRCbhvXalJcicDXOESWrnDl7FMtGsQ.png" alt="zQT5xxP6KiLRCbhvXalJcicDXOESWrnDl7FMtGsQ.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;text-align:center;">图7 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;text-align:center;"> </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;text-align:left;"><span style="color:#000000;font-size:14px;"><strong>(5)编码器电路:</strong></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;text-align:left;padding-left:40px;"><span style="color:#000000;font-size:14px;">本设计使用国产14bit高精度绝对值磁编码器MT6816,可以选择使用其SPI接口或ABI接口(暂未支持),其安装在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;text-align:left;padding-left:40px;"><span style="color:#000000;font-size:14px;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/jBmBQQC49hOdByxXc3rwooD79ZHtRnirmKeIUc08.png" alt="jBmBQQC49hOdByxXc3rwooD79ZHtRnirmKeIUc08.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;padding-left:40px;text-align:center;"><span style="color:#000000;font-size:14px;">图8 编码器电路</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;text-align:left;"> </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;text-align:left;"><strong><span style="color:#000000;font-size:14px;">(6)电机电源电压采样电路&驱动IC温度采样电路:</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;text-align:left;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/GO60ZPLMACKfAm4i1A5QhIt7M7eHdFTM5ZZ9Qr05.png" alt="GO60ZPLMACKfAm4i1A5QhIt7M7eHdFTM5ZZ9Qr05.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;text-align:left;"> </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;text-align:center;"><span style="color:#000000;font-size:14px;">图9 电机电源电压采样电路&驱动IC温度采样电路</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;text-align:center;"> </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;text-align:left;"><strong><span style="color:#000000;font-size:14px;">(7)</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;text-align:left;padding-left:40px;">本设计在电机电源上使用了一枚SS54防止步进电机处于发电状态时产生的电能导致系统错误启动,并使用了一枚SMBJ30CA用于防止步进电机处于回馈制动状态或者发电状态时产生的电压烧毁A4950,还使用了大容量的MLCC进行行储能以将其其运行时电机电源的电压纹波</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;text-align:center;"><img src="//image.lceda.cn/pullimage/dNE4lIeGu1e4O6rYSvEG7fv2ImcjTcfekDmGLzXh.png" alt="dNE4lIeGu1e4O6rYSvEG7fv2ImcjTcfekDmGLzXh.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;text-align:center;">图10 电机电源滤波电路</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;"> </h3> <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;">代码:<a href="https://gitee.com/STM32G474RET6/xbdrive" target="_blank">https://gitee.com/STM32G474RET6/xbdrive</a>(尚不完善)</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;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/KOAOuPJbQTaiclfOyfYau7GasVuhDA9rXWgvIDtv.png" alt="KOAOuPJbQTaiclfOyfYau7GasVuhDA9rXWgvIDtv.png"></h3> <p style="text-align:center;"> </p> <p style="text-align:center;">图11 代码截图</p> <p style="text-align:center;"> </p> <p style="padding-left:40px;text-align:left;"><img src="//image.lceda.cn/pullimage/yI7z1Fhed3pu6bLGZnIQcHyfQzZnIjzUf2Nrp8jd.png" alt="yI7z1Fhed3pu6bLGZnIQcHyfQzZnIjzUf2Nrp8jd.png"></p> <p style="padding-left:40px;text-align:left;"> </p> <p style="padding-left:40px;text-align:left;">                 图12 系统框架</p> <p style="text-align:left;padding-left:40px;"> </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;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/w8qMSCwFg8TSj1pRPYTkgJ2evsICZiSDSLzC5iXr.png" alt="w8qMSCwFg8TSj1pRPYTkgJ2evsICZiSDSLzC5iXr.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;text-align:center;"> </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;text-align:center;">图13 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> <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 style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/zJEoOCwBbeDARXgAz5xxukrCZ7ZhofZyX57MKWKh.png" alt="zJEoOCwBbeDARXgAz5xxukrCZ7ZhofZyX57MKWKh.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;text-align:center;">图14 背面图片</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> <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>
  • 立创电赛:《ESP32两相四线混合式步进电机闭环驱动器》-矛盾聚合体-part1.mp4

  • 立创电赛:《ESP32两相四线混合式步进电机闭环驱动器》-矛盾聚合体-part2.mp4

  • 立创电赛:《ESP32两相四线混合式步进电机闭环驱动器》-矛盾聚合体-part3.mp4

文档

Main SCH

Programmer

Pinboard

Main

pinboard

Programmer

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part
1 1u/50V C1,C3,C7,C8,C9,C10,C11 C0603_SMALL 7
2 100n C2,C5,C12 C0603_SMALL 3
3 47u/10V C4 C1206_SMALL 1
4 4.7u/50V C6 C1206_SMALL 1
5 X8821WR-06S-N0SN CN1 CONN-TH_6P-P2.50_X8821WR-06S-N2SN 1
6 1.25T-6P-WT CN2 CONN-SMD_6P-P1.25_1.25T-6P-WT 1
7 AN9520-245 L1 ANT-SMD_L9.5-W2.1 1
8 4.7uH L2 IND-SMD_L2.5-W2.0 1
9 LED-0603_R LED1 LED0603_VIOLET_SMALL 1
10 LED-0603_B LED2 LED0603_BLUE_SMALL 1
11 22uF MC1,MC2,MC3,MC4,MC5,MC6,MC7,MC8 C1210 8
12 SS54 MD1 SMB_L4.6-W3.6-LS5.3-R-RD 1
13 SMBJ30CA MD2 SMB_L4.6-W3.6-LS5.3-BI 1
14 0R10 MR1,MR2 R1206 2
15 A4950 MU1,MU2 HSOP-8_L5.0-W4.0-P1.27-LS6.2-TL-EP 2
16 0R R1,R10,R11,R14 R0603_SMALL 4
17 10k R2,R3,R6,R7 R0603_SMALL 4
18 52.3k R4 R0603_SMALL 1
19 100k R5 R0603_SMALL 1
20 1k R8,R9,R12,R13,R15,R17,R18 R0603_SMALL 7
21 390 R16,R19,R20 R0603_SMALL 3
22 10k RT1 R0603_SMALL 1
23 TS-1088R-02026 SW1,SW2 SW-SMD_L3.9-W3.0-P4.45 2
24 ESP32-PICO-D4 U1 QFN-48_L7.0-W7.0-P0.50-BL-EP5.1 1
25 JW5026 U2 SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BR 1
26 XC6210B332MR U3 SOT-23-5_L3.0-W1.7-P0.95-LS2.8-BR 1
27 MT6816CT-AKD U4 SOP-8_L5.0-W4.0-P1.27-LS6.2-BL 1
28 EL3H7(B)(TA)-G U5 SOP-4_L4.4-W2.8-P1.27-LS7.0-TL 1
29 TLP2168(TP,F) U6 SO-8_L4.9-W3.9-P1.27-LS5.9-BL 1
30 100n C13 C0603_SMALL 1
31 10u/16V C14 C0603_SMALL 1
32 1u/50V C15,C16 C0603_SMALL 2
33 1.25T-6P-WT CN3 CONN-SMD_6P-P1.25_1.25T-6P-WT 1
34 S8050 Q1,Q2 SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR 2
35 10k R21,R22 R0603_SMALL 2
36 CH340K U7 ESOP-10_L4.9-W3.9-P1.00-LS6.2-BL-EP 1
37 XC6210B332MR U8 SOT-23-5_L3.0-W1.7-P0.95-LS2.8-BR 1
38 TYPE-C-31-M-12 USBC1 USB-C_SMD-TYPE-C-31-M-12 1
39 A2501WV-6P CN4 CONN-TH_A2501WV-6P 1
40 HDR-M-2.54_1x8 J1,J2 HDR-M-2.54_1X8 2
41 SS8550 Q3,Q4,Q5 SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR 3
42 1k R23,R24,R25 R0603_SMALL 3

附件

附件名 下载
BOM_ESP32两相四线混合式步进电机闭环驱动器.pdf
立创电赛:《ESP32两相四线混合式步进电机闭环驱动器》-矛盾聚合体-part1.mp4
立创电赛:《ESP32两相四线混合式步进电机闭环驱动器》-矛盾聚合体-part2.mp4
立创电赛:《ESP32两相四线混合式步进电机闭环驱动器》-矛盾聚合体-part3.mp4

评论(30)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
_ToBeNumber1_ 回复
<p><span class="colour" style="color:rgb(51,51,51);">楼主,你好,想请教一下,你的arduiino风格引脚图是怎么画的啊</span></p>
矛盾聚合体 回复
<p>3D模型转化成DXF图纸,然后再在adobe illustrator中进行上色</p>
Aa_Qk 回复
<p>闭环步进驱动器和伺服驱动器 内部算法是有什么不同</p>
矛盾聚合体 回复
<p>这个算是简单的伺服,只有位置环</p>
_ToBeNumber1_ 回复
<p>感谢,感谢</p>
jimmy 回复
<p>楼主你好,目前这个项目软硬件已经完善了吗?想复现学习一下。</p>
矛盾聚合体 回复
<p>硬件已经验证过了,软件目前属于基本功能能用的程度</p>
adgemon 回复
<p>等你更新</p>
lhx0125 回复
<p><span style="color:rgb(51,51,51);">楼主你好!我想问一下     这个的声音大吗   视频里面听不太清楚   或者有没有  没有背景音乐的电机中速转动的声音的视频链接</span></p>
qq784861269 回复
<p>请问这个固件发布在哪里?</p>
矛盾聚合体 回复
<p><span style="color:rgb(51,51,51);">代码:</span><a href="https://gitee.com/STM32G474RET6/xbdrive" target="_blank">https://gitee.com/STM32G474RET6/xbdrive</a><span style="color:rgb(51,51,51);">(尚不完善)pico分支</span></p>
mazhiliang 回复
<p>H桥芯片推荐换为 <strong>AT8236</strong>,其导通电阻仅为200mΩ,发热比A4950少一半多。电路完全一样,只是供电降为了 5.5-36V,对应用场景几乎没造成影响,但发热体验好很多。</p>
矛盾聚合体 回复
<p>感谢推荐!</p>
Rico_O 回复
<p>大家有搞成功的吗?看着好难的样子?</p>
Jocab_B 回复
<p>请问大佬,这个可以细分吗</p>
sls303 回复
<p>打板出来,焊接时发现BOM里多出好多元器件</p>
liukunpeng123 回复
<p>请问一下这个可以驱动两相四线制的步进电机吗?</p>
矛盾聚合体 回复
<p>@liukunpeng123 你好, 当然可以的, 但是只能驱动电流比较小的电机, 比如大部分35/42步进</p>
momo01 回复
<p>造价不低啊</p>
whangqq 回复
<p>有的元器件最低只能买100颗 板制药一两颗</p>
lisowang 回复
<p>软件不完善是什么意思,能正常使用吗?还是缺少了一些很重要的功能?[emojis:发呆]</p>
mrxiaodong 回复
<p>R15烧录的时候不能焊接,GPIO12拉高会导致烧录不成功。</p>
Awen 回复
<p>你这个主板是四层的吧。</p>
YeseQAQ 回复
<p>程序能直接用到57步进电机上面么?我手头雕刻机用的57步进电机。</p>
Printf1 回复
<p>大佬杨工是哪个</p>
WT666 回复
<p>有编译好的固件嘛</p>
goodboy66639 回复
<p>请问你的esp32步进电机驱动器为啥不能下载程序</p>
矛盾聚合体 回复
<p>你好, 大概是硬件问题, 比如LGA的封装容易虚焊所以ESP32没焊接好, 建议检查下焊接</p>
goodboy66639 回复
<p>请问你是怎么下载程序的,摁住boot?,我检查了好几次焊接也不行,只焊接了最小系统部分也是不行[emojis:流泪]</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