news 2026/7/27 11:44:12

【dz-1048】基于单片机的自动避障小车

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-1048】基于单片机的自动避障小车

摘要

在智能移动设备快速发展的当下,自动避障技术作为移动设备自主导航的核心,对提升设备的自主性、安全性和工作效率具有重要意义。传统的手动控制小车不仅依赖人为操作、响应存在延迟,还存在操作繁琐、适用场景有限等问题,难以满足自动化、智能化移动的需求。​

基于 STC89C52 单片机的自动避障小车,整合了 HC-SR04 超声波传感器、SG90 舵机、SDC9150 直流电机驱动模块、CN-TTS 语音播报模块、LCD1602 显示屏及按键,实现了小车的自动避障与智能行驶。系统核心功能包括:通过 HC-SR04 超声波检测前方障碍物,若前方有障碍物,启动 SG90 舵机带动超声波检测左侧是否有障碍物,左侧无障碍物则左转,左侧有障碍物则启动舵机检测右侧,右侧无障碍物则右转,右侧有障碍物则小车退后,再依次检测左右是否有障碍物;通过 SDC9150 直流电机驱动模块驱动直流电机,控制小车的行驶状态;借助 CN-TTS 语音播报模块播报小车左转、右转或后退等动作;利用 LCD1602 显示障碍物距离值;支持通过 1 个按键启动小车。​

该系统的实现,有效提升了小车的自动避障能力和智能化行驶水平,减少了人工干预,确保了小车在复杂环境中的稳定运行,为智能移动设备的研发提供了高效、可靠的解决方案,同时为同类自动避障设备的设计提供了参考,具有较高的实际应用价值。​

关键词:STC89C52;自动避障小车;超声波传感器;智能行驶;语音播报

ABSTRACT

With the rapid development of intelligent mobile devices, automatic obstacle avoidance technology, as the core of autonomous navigation for mobile devices, is of great significance for improving the autonomy, safety, and work efficiency of devices. Traditional manually controlled cars not only rely on human operation with delayed responses but also have problems such as cumbersome operation and limited applicable scenarios, making them difficult to meet the needs of automated and intelligent movement.​

The automatic obstacle-avoiding car based on the STC89C52 microcontroller integrates HC-SR04 ultrasonic sensors, SG90 servos, SDC9150 DC motor driver modules, CN-TTS voice broadcast modules, LCD1602 displays, and buttons, realizing automatic obstacle avoidance and intelligent driving of the car. The core functions of the system include: detecting obstacles in front through HC-SR04 ultrasonic waves. If there is an obstacle ahead, start the SG90 servo to drive the ultrasonic wave to detect whether there is an obstacle on the left. If there is no obstacle on the left, turn left; if there is an obstacle on the left, start the servo to detect the right. If there is no obstacle on the right, turn right; if there is an obstacle on the right, the car retreats and then detects whether there are obstacles on the left and right in turn; drive the DC motor through the SDC9150 DC motor driver module to control the driving state of the car; broadcast actions such as the car turning left, right, or retreating with the help of the CN-TTS voice broadcast module; display the obstacle distance value using LCD1602; support starting the car through one button.​

The implementation of this system effectively improves the car's automatic obstacle avoidance ability and intelligent driving level, reduces manual intervention, ensures the stable operation of the car in complex environments, provides an efficient and reliable solution for the research and development of intelligent mobile devices, and also offers a reference for the design of similar automatic obstacle-avoiding equipment, with high practical application value.​

Keywords:STC89C52; Automatic obstacle-avoiding car; Ultrasonic sensor; Intelligent driving; Voice broadcast

目录

第 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.1.7 按键模块选择

2.2整体设计方案

第 3 章 硬件设计

3.1 主控电路模块

3.2 超声波传感器电路

3.3 舵机电路

3.4 直流电机驱动电路

3.5 语音播报模块电路

3.6 显示模块电路

3.7 按键模块电路

第4章 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 LCD1602显示模块子流程设计

4.4 独立按键子流程设计

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

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

4.7 舵机子流程设计

4.8 语音播报模块子流程设计

第 5 章 实物测试

5.1 整体实物测试

5.2 超声波传感器功能测试

5.3 语音播报模块功能测试

5.4 显示模块功能测试

5.5 按键功能测试

5.6 自动避障整体功能测试

第 6 章 总结与展望

6.1 总结

6.2 展望

致谢

参考文献

附录

附录一:原理图

附录二:PCB

附录三:主程序

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

【软件测试】6_性能测试实战 _建立测试环境

文章目录一、建立测试环境1.1 性能测试环境的特点1.2 如何保证测试环境与生产环境的一致性二、构造测试数据-慢查询使用2.1 good_insert.py一、建立测试环境 性能测试的环境独立使用 —— 其他测试人员不可用使用该环境 在进行性能则试之前,需要先完成性能测试环境…

作者头像 李华
网站建设 2026/7/21 17:19:35

springboot企业进销存管理系统演vue论文

目录摘要内容框架技术实现要点系统创新点应用价值开发技术源码文档获取/同行可拿货,招校园代理 :文章底部获取博主联系方式!摘要内容框架 基于SpringBoot和Vue的企业进销存管理系统研究 该系统采用前后端分离架构,后端基于SpringBoot框架实现…

作者头像 李华
网站建设 2026/7/24 4:03:27

网工毕设容易的题目分享

1 引言 毕业设计是大家学习生涯的最重要的里程碑,它不仅是对四年所学知识的综合运用,更是展示个人技术能力和创新思维的重要过程。选择一个合适的毕业设计题目至关重要,它应该既能体现你的专业能力,又能满足实际应用需求&#xf…

作者头像 李华
网站建设 2026/7/21 23:23:42

高级网络爬虫实战:动态渲染、反爬对抗与分布式架构

在当今数据驱动的时代,网络爬虫已成为获取公开信息的重要工具。然而,随着网站防护机制的不断升级,传统基于静态 HTML 解析的爬虫已难以应对复杂的现实场景。本文将深入探讨现代爬虫开发中的三大核心挑战:动态内容渲染、反爬机制绕…

作者头像 李华
网站建设 2026/7/27 0:58:29

AI 的逐步进化:从被动的“思考者”到主动的“行动者”

你输入问题,它给出答案。这种交互模式已经很有用了,但也仅此而已,现在的AI的使用方式跟GPT3.5刚出来的时候已经完全不一样了,无论是dify、coze这些平台,还是Codex、Claude Code等开发者工具,都在以不一样的…

作者头像 李华
网站建设 2026/7/23 10:38:35

城市规划新方法:用照片to谷歌地球构建三维现状调研

城市规划师的日常困境 作为一名城市规划师,我的工作涉及城市更新、片区规划、交通优化等多个领域。从业十年来,我参与了超过50个城市规划项目,足迹遍布全国20多个城市。 在城市规划工作中,现状调研是最基础也是最重要的环节。我们…

作者头像 李华