版本协议

GPL 3.0

标签
专业版
#第九届立创电赛#抗扰直线小车

创建时间:1个月前

88 1

视频

描述

<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;">本项目旨在利用STM32单片机及MPU6050陀螺仪实现一款能够自主走直线的小车。通过传感器反馈数据,结合PID控制算法,使小车在复杂环境中能够稳定、精确地沿直线路径行驶。</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;">首次公开,原创</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;">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;"> </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;"><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="mb-2 whitespace-pre-wrap">基于STM32单片机和MPU6050陀螺仪的走直线小车的硬件部分可以分为几个主要部分:电源模块、STM32单片机模块、MPU6050模块和电机驱动模块。以下是具体的硬件设计思路:</p> <h3><span style="font-size: 16px;">4.1 电源模块</span></h3> <ul> <li>电池: 选择合适的电池(如锂电池、镍氢电池等)为小车供电。。</li> <li>稳压模块: 使用适当的稳压模块(mini360)将电池电压转换为3.3V或5V,以供STM32和MPU6050使用。</li> </ul> <h3><span style="font-size: 16px;">4.2 单片机模块</span></h3> <ul> <li>选择stm32单片机: 这款单片机性价比高,资源丰富。</li> <li>电路连接: 将电源模块连接到单片机的VCC和GND引脚上。同时,确保所有I/O引脚可以正常工作。</li> </ul> <h3><span style="font-size: 16px;">4.3 MPU6050陀螺仪模块</span></h3> <ul> <li>连接方式: MPU6050模块通常使用I2C总线与STM32通信。将MPU6050的SDA(数据线)和SCL(时钟线)分别连接到STM32的I2C接口(如PB7和PB6),同时连接电源(VCC)和地(GND)。</li> <li>引脚连接: <ul> <li>VCC → 5V</li> <li>GND → GND</li> <li>SDA → STM32的I2C SDA引脚</li> <li>SCL → STM32的I2C SCL引脚</li> </ul> </li> </ul> <h3><span style="font-size: 16px;">4.4 电机驱动模块</span></h3> <ul> <li><span style="font-size: 16px;">电机选择: 选择直流电机,通常使用直流电机以便于控制。</span></li> <li><span style="font-size: 16px;">电机驱动板: 使用电机驱动模块tb6612来控制电机的转动。通过PWM控制电机的速度,通过数字信号控制电机的正反转。</span></li> <li><span style="font-size: 16px;">连接方式:</span> <ul> <li><span style="font-size: 16px;">将电机驱动模块的输入引脚连接到STM32的I/O引脚(用于控制电机的转动方向和速度)。</span></li> <li><span style="font-size: 16px;">将电机连接到电机驱动模块的输出引脚。</span></li> </ul> </li> </ul> <h3><span style="font-size: 16px;">4.5 其他配件</span></h3> <ul> <li><span style="font-size: 16px;">车架</span></li> <li><span style="font-size: 16px;">轮胎和底盘</span></li> </ul> <h3><span style="font-size: 16px;">4.6 原理图示意</span></h3> <p><span style="font-size: 16px;"><img src="//image.lceda.cn/pullimage/175Zjqrcd3SZXDWj8MC16N4ot8VgdPSlwrviwpBx.png" alt="" width="426" height="277"></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;">*5、软件部分</h3> <hr class="horizontal-splitline normal-bold-2"> <h3><span style="font-size: 16px;">1. 系统初始化</span></h3> <ul> <li><span style="font-size: 16px;">初始化STM32系统时钟、GPIO、PWM等。</span></li> <li><span style="font-size: 16px;">配置I2C总线以与MPU6050进行通信。</span><span style="font-size: 16px;"><img src="//image.lceda.cn/pullimage/mTcivcCvcLfKnu6Jmi6MgOdQYcJyWKcQMYGcZwqi.png" alt="" width="289" height="187"></span></li> </ul> <h3><span style="font-size: 16px;">2. MPU6050的初始化</span></h3> <ul> <li><span style="font-size: 16px;">配置MPU6050的寄存器,通常需要设置陀螺仪和加速度计的范围,以及选择工作模式。</span></li> </ul> <h3><span style="font-size: 16px;">3. 数据读取</span></h3> <ul> <li><span style="font-size: 16px;">从MPU6050读取加速度计和陀螺仪的数据。这通常涉及到I2C读写操作。</span></li> <li><span style="font-size: 16px;">解析读取的数据,将原始数据转换为合适的单位(如g和°/s)。</span></li> </ul> <h3><span style="font-size: 16px;">5. 控制算法</span></h3> <ul> <li><span style="font-size: 16px;">使用PID控制器或简单的比例控制来根据倾斜角度调整电机的速度,以实现直线行驶。</span></li> <li><span style="font-size: 16px;">修改PWM信号以调整小车的运动。<img src="//image.lceda.cn/pullimage/ZRyNqIDWcoWJxZvm73FvYt9XxZWJkRTWpeViAcpz.png" alt="" width="320" height="201"></span></li> </ul> <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;"><img src="//image.lceda.cn/pullimage/ShKWmWBUWPqah35RT5hZk4Gzny0l1vrpgU69irDz.png" alt="" width="705" height="229"></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 src="//image.lceda.cn/pullimage/t6FF7UinR5wIGsuVpxwdGLb6UTaJPt0m9nXo7R5t.png" alt="" width="300" height="253"></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/de460543d4cf4dacb5f0326612455578" 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>

文档

BOM

暂无

附件

附件名 下载
源码.zip
BOM_Board1_schematic1_2024-10-24.xlsx

成员

评论(0)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
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