描述
<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>
评论(3)