登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 理工学类 > 自动化 > 正文

循迹小车软件设计

 2023-02-17 09:02  

论文总字数:20121字

摘 要

本毕业设计课题是循迹小车的软件设计,是基于51单片机的循迹小车的子课题,同组的还有一位同学是循迹小车的硬件设计。本论文设计并介绍了基于51单片机的循迹小车的软件设计部分。这个课题的设计是采用了TC89C52单片机和红外传感器ST188为主控制器的自动循迹小车。小车系统采用STC89C52单片机内部定时器产生PWM脉宽调制波型给电机驱动模块L298N,实现对小车速度、方向的调节控制。通过在车身前端下部安装几组ST188红外对管传感器,实现对路面黑色线的轨迹检判别,再把各组红外传感器检测结果的高低电平信号传给单片机控制系统,由单片机进行计算处理后调节输出的2路PWM波改变其占空比,从而实现对小车转向和小车速度的控制,由单片机控制小车电机驱动电路用来调整小车的运动方向,这样就可以让小车沿着地面上的黑色轨迹自动行驶,达到小车能够自动循迹的目的。

通过实验所反映出来的情况,不难发现整个系统的电路结构相对简单,其可靠性较高,能实现了预期的循迹功能。

本循迹小车软件设计课题的整个软件控制系统是个闭环的负反馈系统,通过红外对管传感器实现对黑线的检测,再由软件进行计算并调节电机实现对小车速度方向修正,进而达到测量偏差-反馈修正的闭环控制。

实验证明采用该方法设计的智能小车在保证运行速度的前提下,可以提高循迹精度、减少漂移次数。

关键词:循迹;智能小车;51单片机;电机驱动电路

ABSTRACT

The design of this graduation project is the software design of the tracking car, which is based on the subtopic of the tracking car of 51 MCU, and one of the classmates is the hardware design of the tracking trolley.This paper designs and introduces the software design part of the tracking car based on 51 MCU.This design is based on the infrared sensor ST188, STC89C52 single-chip microcontroller automatic tracking car.The car system adopts the internal timer of STC89C52 single chip microcomputer to generate PWM pulse width modulation wave mode to the motor drive module L298N, which realizes the control of the speed and direction of the car.Installed at the bottom of the front car body through several groups of ST188 infrared sensors, the pipe for the pavement of the black line track inspection criterion, then groups of infrared sensor detection results of high and low level signal to the single chip microcomputer control system, calculated by the MCU, after processing to adjust output 2 road PWM waves to realize control of the vehicle speed and steering, By single chip microcomputer to control the car motor drive circuit is used to adjust the movement direction of the car, so you can make the car along the ground on the black track run automatically, achieve the goal of the car automatically tracking, achieve the goal of automatic tracking car.The test results show that the circuit structure of the whole system is simple and reliable, and the expected intelligent tracking car function is realized.

This tracking car software design project of the whole software control system is a closed-loop feedback system, through the infrared sensor for the detection of the black line, the pipe by software to calculate again and realize the vehicle speed regulating motor direction correction, thus achieve measurement deviation - closed loop control of feedback correction.

The experiment proves that the intelligent car designed by this method can improve the tracking accuracy and reduce the drift frequency under the premise of ensuring the running speed.

Keywords: Tracking;Smart car;MCU;Motor drive

目 录

摘 要 I

ABSTRACT II

第一章 引 言 1

1.1 课题选题背景及意义 1

1.1.1 循迹小车课题研究背景 1

1.1.2 国内外循迹小车发展现状 2

1.2 本课题关键技术 2

1.2.1 C51单片机 2

1.2.2 STC89C52单片机 2

1.2.3 红外传感器循迹技术 3

1.2.4 电机驱动控制技术 3

1.3 论文结构及意义 4

1.3.1 论文框架及思路 4

1.3.2 本毕业设计意义 4

第二章 系统总体方案设计 5

2.1 总体方案设计原则 5

2.1.1 研究思路 5

2.2 总体设计方案 5

2.2.1 系统基本组成 6

2.3 本章小结 6

第三章 程序设计 7

3.1 系统程序设计方案框图 7

3.2 电路IO分配 7

3.2.1 单片机系统 8

3.2.2 串口通讯 8

3.3 主机程序设计 8

3.3.1 主程序 9

3.3.2 电机驱动程序 10

3.3.3 循迹程序 13

3.4 本章小结 14

第四章 系统实现与调试 15

4.1 程序调试 15

4.1.1 调试平台介绍 15

4.1.2程序测试 16

4.2 毕设过程遇到困难及经验总结 16

4.2.1 设计需求的分析及转换为软件的实现设计 16

4.2.2 软件的调试困难 16

4.3 软件测试 17

4.3.1 单机功能测试 17

4.3.2 系统整体功能测试 17

4.3.3 系统软件可靠性测试 17

4.4 毕设作品尚存在的不足 17

4.4.1 系统循迹不智能 17

4.4.2 无法避障 18

4.4.3急弯循迹效率不高 18

4.5 本章小结 18

结 论 19

致 谢 20

参考文献 21

附录1 硬件电路原理图 22

剩余内容已隐藏,请支付后下载全文,论文总字数:20121字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图