版本协议

GPL 3.0

标签
标准版
#第十届立创电赛#智能巡线目标随动小车

创建时间:3个月前

284 0

视频

  • 1.mp4

  • 2.mp4

描述

<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> <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;">  项目名称:基于STM32F407ZET6的智能目标随动系统</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> <ul> <li> <p class="ds-markdown-paragraph"><strong>首次公开</strong>:是</p> </li> <li> <p class="ds-markdown-paragraph"><strong>原创性</strong>:是(结合了开源技术但整体架构为原创设计)</p> </li> <li> <p class="ds-markdown-paragraph"><strong>获奖历史</strong>:无</p> </li> <li> <p class="ds-markdown-paragraph"><strong>答辩经历</strong>:无</p> </li> </ul> <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> <div> <p>    GPL-3.0 的核心在于<strong>开源</strong>,而非限制商业用途。用户可以自由地将软件用于商业目的,但必须遵守以下规则:</p> </div> <div> <ol class="b_dList"> <li> <p><strong>源码开放</strong>:分发时必须提供源代码,确保接收者能够自由修改和使用。</p> </li> <li> <p><strong>许可证传递性</strong>:任何基于 GPL 软件的修改版本也必须遵守 GPL 协议,确保自由的延续。</p> </li> <li> <p><strong>专利保护</strong>:贡献者自动授予专利许可,防止专利诉讼破坏开源生态。</p> </li> <li> <p><strong>破解允许</strong>:用户可以自由破解软件的技术限制</p> </li> </ol> </div> <p> </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;"><span style="font-size:18px;"><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;">MSPM0开发板</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;">STM32F407ZET6</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个370电机</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;">12路循迹模块</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;">   本项目设计并实现了一个高度集成、多控制器协同工作的自动循迹智能瞄准车该系统集成自动循迹移动与视觉识别自动瞄准功能于一体,展现了复杂的嵌入式系统设计、多机通信和视觉技术的综合应用。移动底盘由MSPM0G3507作为下位机核心,专门负责通过十二路红外循迹模块感知路径,并采用PID算法精准控制两个直流减速电机,实现小车沿预定轨迹的高稳定性、低功耗运动。视觉瞄准系统则由树莓派作为上位机,负责进行图像采集与目标识别;STM32F407ZET6 作为控制中枢,接收树莓派发送的目标坐标数据,并通过增量式PID算法实时控制一个二自由度步进电机云台,实现对动态或静态目标的精确跟踪与锁定,最终通过触发激光模块完成“瞄准”动作。该系统成功实现了“感知-决策-执行”的完整闭环,是嵌入式AI和机器人控制技术的典型实践,并突出了 MSPM0系列在电机控制与低功耗应用中的优势。</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:18px;"><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;"><span style="font-size:18px;"><strong><img src="//image.lceda.cn/pullimage/pTG2BdXfS8iOQqpDHNHxC1eXoEuLX4bAaH6Jr4zA.png" width="1194" height="837" alt="pTG2BdXfS8iOQqpDHNHxC1eXoEuLX4bAaH6Jr4zA.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;"><span style="font-size:18px;"><strong>硬件清单与注意事项:</strong></span></p> <table style="height:220px;width:72.2016%;"> <tr style="height:22px;"> <th style="height:22px;width:5.33615%;">模块</th> <th style="height:22px;width:29.1789%;">关键参数/型号</th> <th style="height:22px;width:62.3967%;">备注与注意事项</th> </tr> <tr style="height:22px;"> <td style="height:22px;width:5.33615%;">主控制器</td> <td style="height:22px;width:29.1789%;">STM32F407ZET6 (核心板)</td> <td style="height:22px;width:62.3967%;">资源丰富,性价比高。注意IO口的分配,避免冲突。</td> </tr> <tr style="height:22px;"> <td style="height:22px;width:5.33615%;">视觉模块</td> <td style="height:22px;width:29.1789%;">OpenCV</td> <td style="height:22px;width:62.3967%;">处理能力更强,帧率更高,识别更稳定。</td> </tr> <tr style="height:22px;"> <td style="height:22px;width:5.33615%;">激光模块</td> <td style="height:22px;width:29.1789%;">带驱动板的大功率激光头</td> <td style="height:22px;width:62.3967%;">安全第一! 必须连接继电器控制,切勿直视激光,操作时需佩戴防护眼镜。</td> </tr> <tr style="height:22px;"> <td style="height:22px;width:5.33615%;">显示模块</td> <td style="height:22px;width:29.1789%;">0.96寸 I2C OLED</td> <td style="height:22px;width:62.3967%;">I2C地址通常为0x3C或0x3D,需在代码中确认。</td> </tr> <tr style="height:22px;"> <td style="height:22px;width:5.33615%;">电源输入</td> <td style="height:22px;width:29.1789%;">12V 航模电池</td> <td style="height:22px;width:62.3967%;">保证容量足够,带载能力满足所有模块需求。</td> </tr> <tr style="height:22px;"> <td style="height:22px;width:5.33615%;">降压模块1</td> <td style="height:22px;width:29.1789%;">降压模块 (12V to 5V)</td> <td style="height:22px;width:62.3967%;">仅用于云台舵机,输出电流需大于两个步进电机堵转电流之和。</td> </tr> <tr style="height:22px;"> <td style="height:22px;width:5.33615%;">降压模块2</td> <td style="height:22px;width:29.1789%;"> <p>降压模块 (5V to 3.3V)</p> </td> <td style="height:22px;width:62.3967%;">为STM32、OpenCV、OLED等逻辑电路供电。</td> </tr> <tr style="height:22px;"> <td style="height:22px;width:5.33615%;">其他</td> <td style="height:22px;width:29.1789%;">LED、蜂鸣器、电阻、杜邦线、洞洞板/PCB</td> <td style="height:22px;width:62.3967%;">连接LED需串联限流电阻(220Ω-1kΩ)。</td> </tr> </table> <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;"><strong>系统流程图:</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><img src="//image.lceda.cn/pullimage/ZElHYL41Iqhtew5jnmueKuipIY9va8JWsIPzxnEl.png" width="496" height="576" alt="ZElHYL41Iqhtew5jnmueKuipIY9va8JWsIPzxnEl.png"></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;">graph TD<br>A[图像采集] --> B[目标检测]<br>B --> C[位置计算]<br>C --> D[PID控制]<br>D --> E[串口通信]<br>E --> F[电机驱动]<br>F --> G[云台运动]<br>H[用户界面] --> A<br>H --> G</p> <ol> <li> <p class="ds-markdown-paragraph"><strong>OpenCV处理模块</strong>(Python)</p> <ul> <li> <p class="ds-markdown-paragraph">图像采集与预处理</p> </li> <li> <p class="ds-markdown-paragraph">目标检测算法(目标靶心识别+颜色识别)</p> </li> <li> <p class="ds-markdown-paragraph">目标位置计算</p> </li> </ul> </li> <li> <p class="ds-markdown-paragraph"><strong>通信模块</strong>(Python+C)</p> <ul> <li> <p class="ds-markdown-paragraph">自定义串口协议设计</p> </li> <li> <p class="ds-markdown-paragraph">数据打包/解包</p> </li> </ul> </li> <li> <p class="ds-markdown-paragraph"><strong>电机控制模块</strong>(C)</p> <ul> <li> <p class="ds-markdown-paragraph">步进电机驱动</p> </li> <li> <p class="ds-markdown-paragraph">PID位置控制</p> </li> <li> <p class="ds-markdown-paragraph">运动轨迹规划</p> </li> </ul> </li> <li> <p class="ds-markdown-paragraph"><strong>用户界面模块</strong>(Python)</p> <ul> <li> <p class="ds-markdown-paragraph">实时视频显示</p> </li> <li> <p class="ds-markdown-paragraph">目标跟踪状态</p> </li> <li> <p class="ds-markdown-paragraph">系统控制面板</p> </li> </ul> </li> <li>部分代码</li> </ol> <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;">def detect_target(frame):  <br>    hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)<br>    mask = cv2.inRange(hsv, lower_black, upper_black)<br>    contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)<br>    <br>    if contours:<br>        c = max(contours, key=cv2.contourArea)<br>        ((x, y), radius) = cv2.minEnclosingCircle(c)<br>        if radius > 10:<br>            return (int(x), int(y)), 'color'<br>    <br>    return None, None</p> <h4>PID控制算法(STM32端)</h4> <p>typedef struct {<br>    float Kp, Ki, Kd;<br>    float integral;<br>    float prev_error;<br>} PIDController;</p> <p>float pid_update(PIDController* pid, float setpoint, float measurement) {<br>    float error = setpoint - measurement;<br>    <br>    // 比例项<br>    float P = pid->Kp * error;<br>    <br>    // 积分项(带抗饱和)<br>    pid->integral += error;<br>    if (pid->integral > INTEGRAL_LIMIT) pid->integral = INTEGRAL_LIMIT;<br>    else if (pid->integral integral = -INTEGRAL_LIMIT;<br>    float I = pid->Ki * pid->integral;<br>    <br>    // 微分项<br>    float D = pid->Kd * (error - pid->prev_error);<br>    pid->prev_error = error;<br>    <br>    return P + I + D;<br>}</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> <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;">Smart-Tracking-System/<br>├── opencv_processing/       # OpenCV处理程序<br>│   ├── main.py              # 主程序<br>│   ├── target_detection.py  # 目标检测算法<br>│   ├── serial_comm.py       # 串口通信模块<br>│   └── ui.py                # 用户界面<br>│<br>├── stm32_firmware/          # STM32固件<br>│   ├── Core/                # 核心文件<br>│   ├── Drivers/             # HAL驱动<br>│   ├── Stepper/             # 步进电机驱动<br>│   │   ├── stepper.c<br>│   │   └── stepper.h<br>│   ├── PID/                 # PID算法<br>│   │   ├── pid.c<br>│   │   └── pid.h<br>│   └── main.c               # 主程序<br>│<br>└── 3d_models/               # 云台3D模型<br>    ├── base.stl<br>    ├── x_axis.stl<br>    └── y_axis.stl</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;"><img src="//image.lceda.cn/pullimage/XPwKrjkRmEdRRVa7iihaCG53mh0qkCGersDJXcG5.png" alt="XPwKrjkRmEdRRVa7iihaCG53mh0qkCGersDJXcG5.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;"> </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清单。在<span style="text-decoration:underline;"><a href="https://lceda.cn/editor" target="_blank">嘉立创EDA</a> </span>生成/上传设计文件后,BOM将自动生成至项目详情;建议包括型号、品牌、名称、封装、采购渠道、用途等内容。具体内容和形式应以表达清楚项目构成为准。 </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;"><img src="//image.lceda.cn/pullimage/vsu6zDDTffZKfI4gRFIAlQev6NzotdvhdTE5L2zN.jpeg" alt="" width="1200" height="1200"></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/d1bbfd69f9404f56901a0e7b849b7245.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;"> </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/42551e8f2f2548cabc1c36626a42da94" target="_blank">前往查看更多详情 ></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>

文档

PCB_#第十届立创电赛#智能巡线目标随动小车

25电赛步进/Board1/Schematic1/1_P1.schdoc

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part
1 100nF C1,C3,C13,C14,C21,C22,C29,C30,C31,C32,C33,C34,C35 C0805 13
2 10nF C2,C4 C0805 2
3 100uF C9,C10 CAP-TH_BD8.0-P5.00-D0.6-FD 2 CD110226M2G0816VFL HRK(鸿瑞凯) LCSC
4 220uF C11,C19,C27,C28 CAP-SMD_BD8.0-L8.3-W8.3-LS9.1-FD 4 VT1V221M-CRF10 RS(容硕) LCSC C5124000
5 10uF C12,C20 CAP-SMD_BD4.0-L4.3-W4.3-LS5.3-FD 2 VT1E100M-CRC54 RS(容硕) LCSC C5123980
6 XH2.54-4AW CN1,CN2 CONN-TH_XH2.54-4AW 2 XH2.54-4AW BOOMELE LCSC C21273
7 SS54B D1 SMB_L4.6-W3.6-LS5.3-RD 1 SS54B 宏嘉诚 LCSC C18199181
8 PH-00205 H1,H2 HDR-TH_40P-P2.54-V-M-R2-C20-S2.54 2 PH-00205 Liansheng(连盛) LCSC C2685142
9 NO H3,H4,H7,H8,H9,H10,H11,H12,H13,OLED1,U19 HDR-TH_3P-P2.54-V-M 11 C2937625
10 双排针2*3P 脚距2.54mm 贴片 H5,H6 HDR-SMD_6P-P2.54-V-M-R2-C3-S2.54-LS7.4 2 双排针2*3P 脚距2.54mm 贴片 BOOMELE(博穆精密) LCSC C77761
11 天空星 MK1 ___ 1
12 2.2kΩ R1,R2,R3,R4,R5,R6,R7,R8 R0603 8 0603WAF1002T5E UNI-ROYAL(厚声) LCSC
13 SS-12D10L5 SW2 SW-TH_SS-12D10L5 1 SS-12D10L5 XKB Connectivity(中国星坤) LCSC C319012
14 AMS1117-3.3 U7,U13 SOT-223-3_L6.5-W3.4-P2.30-LS7.0-BR 2 AMS1117-3.3 AMS LCSC C6186
15 LM2596S U10 LM2596S-5V 1
16 XT60 U11 CONN-TH_XT60 1 XT60 AMASS(艾迈斯) LCSC C98733
17 A4988 U17,U18 DIP-16_L20.3-W15.2-P2.54_LS12.7_A4988 2 A4988 LCSC C9900168373
18 HX TS5215A 160gf U20,U21,U22,U23 SW-SMD_4P-L5.2-W5.2-P3.70-LS6.4 4 HX TS5215A 160gf hanxia(韩下) LCSC C5340182

附件

附件名 下载
BOM_Board1_Schematic1_2025-10-16.xlsx
源码.zip

评论(3)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
立创电赛 回复
<p>记得上传logo实物图哦~</p>
立创电赛 回复
<p>没有看到工程文件哦<img src="//image.lceda.cn/pullimage/3gJ7ZGst7MBiZI1rEvthgWso06VgJKCcQ430CzJ6.webp" alt="图片" /></p>
xiaobai161 回复
<p>@lcds好的,处理完毕</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