news 2026/5/1 8:39:05

【dz-1155】基于单片机的智能循迹避障小车

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-1155】基于单片机的智能循迹避障小车

摘要

在智能移动设备研发与实践应用领域,具备自主循迹与避障能力的小车系统具有重要的研究价值与应用前景,可广泛应用于自动化运输、教学实验、环境探测等场景。传统的小车控制多依赖人工远程操控或简单的预设程序,不仅灵活性差、应对复杂环境的能力弱,还存在响应不及时、操作繁琐等问题,难以满足智能化、自主化的应用需求。​

基于 STM32F103C8T6 单片机的智能循迹避障小车系统,整合了 2 个 TCRT5000 循迹模块、超声波模块、SG90 舵机、OLED 显示屏、ECB02 蓝牙模块及小车驱动执行组件,实现了小车的自主循迹、智能避障及多样化控制。系统核心功能包括:通过 2 个 TCRT5000 循迹模块,精准识别路线并控制小车按设定路线行走;在循迹模式下,借助超声波模块实时检测前方障碍物,一旦检测到障碍物便立即停止运行,直至障碍物离开后再恢复运行;在避障模式下,当检测到前方有障碍物时,SG90 舵机带动超声波模块左转,若左边无障碍物则小车左转,若检测到左边有障碍物则舵机带动超声波模块右转,若右边无障碍物则小车右转,若检测到右边也有障碍物则小车后退;通过 OLED 显示屏实时显示检测到的距离等参数;利用 ECB02 模块将检测数据传输至手机端,同时支持通过手机控制小车的运行方向(前进、后退、左转、右转)及模式切换。​

该系统的实现,有效提升了小车运行的自主性与智能化水平,增强了其对复杂环境的适应能力,为相关智能移动设备的研发与教学实践提供了直观且可靠的参考方案,具有较高的实用价值与推广意义。​

关键词:STM32F103C8T6;智能小车;循迹避障;传感器;蓝牙通信;自主控制

ABSTRACT

In the field of research and practical application of intelligent mobile devices, a trolley system with autonomous tracking and obstacle-avoiding capabilities has important research value and application prospects, and can be widely used in scenarios such as automated transportation, teaching experiments, and environmental detection. Traditional trolley control mostly relies on manual remote control or simple preset programs, which not only have poor flexibility and weak ability to deal with complex environments, but also have problems such as delayed response and cumbersome operation, making it difficult to meet the intelligent and autonomous application needs.​

The intelligent tracking and obstacle-avoiding trolley system based on the STM32F103C8T6 microcontroller integrates 2 TCRT5000 tracking modules, an ultrasonic module, an SG90 servo, an OLED display, an ECB02 Bluetooth module, and trolley drive execution components, realizing autonomous tracking, intelligent obstacle avoidance, and diversified control of the trolley. The core functions of the system include: accurately identifying the route through 2 TCRT5000 tracking modules and controlling the trolley to walk according to the set route; in the tracking mode, using the ultrasonic module to detect obstacles in front in real time, and once an obstacle is detected, it will stop running immediately until the obstacle leaves and then resume operation; in the obstacle-avoiding mode, when an obstacle is detected in front, the SG90 servo drives the ultrasonic module to turn left, and if there is no obstacle on the left, the trolley turns left; if an obstacle is detected on the left, the servo drives the ultrasonic module to turn right, and if there is no obstacle on the right, the trolley turns right; if an obstacle is also detected on the right, the trolley moves backward; real-time display of detected parameters such as distance through the OLED display; transmitting the detected data to the mobile phone through the ECB02 module, and supporting the control of the trolley's running direction (forward, backward, left turn, right turn) and mode switching through the mobile phone.​

The implementation of this system effectively improves the autonomy and intelligence level of the trolley's operation, enhances its ability to adapt to complex environments, provides an intuitive and reliable reference scheme for the research and development of related intelligent mobile devices and teaching practice, and has high practical value and promotion significance.​

Keywords:STM32F103C8T6; Intelligent trolley; Tracking and obstacle avoidance; Sensor; Bluetooth communication; Autonomous control

目录

第 1 章 绪论

1.1 研究的目的及意义

1.2 国内外发展情况

1.3 本文主要研究内容

第2章 设计思路与方案论证

2.1 主要元器件选择

2.1.1 主控芯片选择

2.1.2 循迹模块选择

2.1.3 避障及距离检测模块选择

2.1.4 舵机选择

2.1.5 显示模块选择

2.1.6 蓝牙模块选择

2.2整体设计方案

第 3 章 硬件设计

3.1 主控电路模块

3.2 循迹模块电路

3.3 超声波模块电路

3.4 舵机电路

3.5 显示模块电路

3.6 蓝牙模块电路

3.7 电机驱动模块电路

第4章 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 直流电机速度调节子流程设计

4.4 超声波检测模块子流程设计

4.5 OLED显示子流程设计

4.6 舵机子流程设计

4.7 蓝牙模块子流程设计

第 5 章 仿真测试

5.1 整体仿真测试

5.2 循迹模块功能测试

5.3 超声波与舵机协同功能测试

5.4 避障模式功能测试

5.5 显示模块功能测试

5.6 蓝牙模块功能测试

第 6 章 实物测试

6.1 整体实物测试

6.2 循迹模块功能测试

6.3 超声波与舵机协同功能测试

6.4 避障模式功能测试

6.5 显示模块功能测试

6.6 蓝牙模块功能测试

第 7 章 总结与展望

7.1 总结

7.2 展望

致谢

参考文献

附录

附录一:原理图

附录二:PCB

附录三:主程序

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/1 8:38:30

leetcode 866. Prime Palindrome 回文质数

Problem: 866. Prime Palindrome 回文质数 解题过程 常规方式的&#xff0c;回文串的判断使用字符串&#xff0c;翻转会超时的&#xff0c;回文串的判断要使用数学方式 Code class Solution { public:bool isprime(int n) {for(int i 2; i * i < n; i) {if(n % i 0) {ret…

作者头像 李华
网站建设 2026/5/1 8:04:07

探讨雷达在智能家居与消费电子领域的应用

在智能家居与消费电子领域&#xff0c;实现精准、可靠且无需接触的感知是提升产品智能化水平的关键。雷达技术&#xff0c;特别是毫米波雷达&#xff0c;在该领域的应用正展现出其独特的技术优势与不可替代性。以下将结合深圳市飞睿智能有限公司的产品资料&#xff0c;分析其优…

作者头像 李华
网站建设 2026/4/29 9:26:38

sudo setenforce 0的庖丁解牛

sudo setenforce 0 是 临时禁用 SELinux&#xff08;Security-Enhanced Linux&#xff09;强制模式 的命令。它常用于快速解决权限问题&#xff0c;但背后涉及 Linux 安全模型、风险权衡、运维规范 三大层面。一、SELinux 是什么&#xff1f; ▶ 1. 核心定位 MAC&#xff08;Ma…

作者头像 李华
网站建设 2026/4/27 3:58:11

学长亲荐2026研究生AI论文网站TOP9:开题报告文献综述神器

学长亲荐2026研究生AI论文网站TOP9&#xff1a;开题报告文献综述神器 2026年研究生AI论文网站测评&#xff1a;选对工具&#xff0c;事半功倍 在研究生阶段&#xff0c;撰写开题报告和文献综述是科研工作的基础环节&#xff0c;也是许多学生面临的一大挑战。随着AI技术的不断进…

作者头像 李华
网站建设 2026/4/23 4:43:02

基于协同过滤算法的音乐推荐播放器 计算机毕业设计选题 计算机毕设项目 前后端分离【源码-文档报告-代码讲解】

&#x1f393; 作者&#xff1a;计算机毕设小月哥 | 软件开发专家 &#x1f5a5;️ 简介&#xff1a;8年计算机软件程序开发经验。精通Java、Python、微信小程序、安卓、大数据、PHP、.NET|C#、Golang等技术栈。 &#x1f6e0;️ 专业服务 &#x1f6e0;️ 需求定制化开发源码提…

作者头像 李华