news 2026/8/25 8:07:35

【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/8/19 15:43:27

安捷伦 Keysight 16195B 是德 16195B 校准套件

是德科技 16195B校准套件‌主要用于高频阻抗测量仪的校准,特别是在7 mm接头平面上进行校准。该套件包含以下组件: E4991-60021 (SHORT)、 E4991-60022 (OPEN)以及一个50欧姆的负载,频率范围为DC…

作者头像 李华
网站建设 2026/8/22 6:59:25

力科Teledyne LeCroy PP024 示波器探头 PP024-2

力科PP024探头 是一款无源衰减探头,适用于示波器,具有10:1的衰减值和500MHz的带宽。‌ 该探头的输入电阻为10MΩ,最大电压值为CAT I 500V和CAT II 400V,输入电容为10pF,电缆长度为51.181英寸(约1300毫米&am…

作者头像 李华
网站建设 2026/8/19 15:42:35

springboot旅游旅行攻略网站的设计与实现vue

目录系统架构设计核心功能模块技术实现要点扩展功能设计部署方案开发技术源码文档获取/同行可拿货,招校园代理 :文章底部获取博主联系方式!系统架构设计 SpringBoot旅游旅行攻略网站采用前后端分离架构,后端使用SpringBoot框架提供RESTful A…

作者头像 李华
网站建设 2026/8/21 9:58:23

【dz-670】基于单片机的智能化光伏发电监控与管理系统设计

基于单片机的智能化光伏发电监控与管理系统 摘要:当前全球能源需求持续增长,同时对环境保护的重视程度也日益提高,光伏发电作为一种有清洁、可再生特性的能源技术,已获得广泛应用,本文设计了一种以单片机为基础的智能化…

作者头像 李华
网站建设 2026/8/22 0:54:29

ZUI15 平板充电样式怎么改?个性化设置教程来了!

对于使用联想 ZUI15 系统平板的用户来说,细节处的个性化定制总能让设备更具专属感。充电时的显示样式看似是小细节,却能在日常使用中带来不一样的仪式感 —— 单调的默认样式看久了难免乏味,不少小伙伴都在寻找更改充电样式的方法&#xff0c…

作者头像 李华
网站建设 2026/8/19 19:01:12

计算机毕设Java基于微信小程序的社区志愿者服务管理系统 基于微信小程序的社区志愿服务管理平台的Java开发实践 微信小程序环境下Java实现的社区志愿者服务管理系统设计

计算机毕设Java基于微信小程序的社区志愿者服务管理系统76x8l9(配套有源码 程序 mysql数据库 论文) 本套源码可以在文本联xi,先看具体系统功能演示视频领取,可分享源码参考。 随着社会的快速发展,社区志愿服务在促进社区和谐与提…

作者头像 李华