毕业实习论文

发布时间:2025年10月14日  作者:aiycxz.cn

题目:基于单片机的智能循迹小车设计学生姓名: 王 凯学 号: 2011307202院 (系): 电子工程学院专 业: 电子信息工程指导教师: 王 斌2015年 6月 1日# 基于单片机的智能循迹小车设计## 摘要智能小车,也就是轮式机器人,最适合在那些人类无法工作的环境中工作,该技术可以应用于无人驾驶机动车,无人工厂,仓库,服务机器人等领域。循迹是指小车在白色地板上循黑线行走,通常采取的方法是红外探测法。红外探测法,即利用红外线在不同颜色的物体表面具有不同的反射性质的特点,在小车行驶过程中不断地向地面发射红外光,当红外光遇到白色纸质地板时发生漫反射,反射光被装在小车上的接收管接收;如果遇到黑线则红外光被吸收,小车上的接收管接收不到红外光。单片机就是否收到反射回来的红外光为依据来确定黑线的位置和小车的行走路线。本设计采用STC89C52单片机为控制核心,利用红外传感器检测路面黑线,从而控制电机驱动模块调整小车转向,使小车能够沿着黑线自动行驶,实现小车自动循迹的目的。**关键词:** 智能循迹小车;STC89C52单片机;红外传感器;电机驱动# The design of intelligent tracking car based on single chip microcomputer## AbstractIntelligent car, also known as wheeled robot, is the most suitable for working in the environment where human cannot work. This technology can be applied to unmanned vehicles, unmanned factories, warehouses, service robots and other fields. Tracking refers to the car walking along the black line on the white floor, usually using the method of infrared detection. Infrared detection method, which uses the characteristics of infrared light with different reflection properties on the surface of different colors of objects, in the process of driving the car continuously to the ground to launch infrared light, when the infrared light encounters a white paper floor diffuse reflection occurs, the reflected light is installed on the car receiver tube; if you encounter a black line, the infrared light is absorbed, the car on the receiver tube can not receive infrared light. Whether the single chip microcomputer receives the reflected infrared light as the basis to determine the position of the black line and the car's walking route. This design uses STC89C52 microcontroller as the control core, using infrared sensor to detect the road black line, so as to control the motor drive module to adjust the car steering, so that the car can automatically drive along the black line, to achieve the purpose of automatic tracking car.**Key words:** intelligent tracking car; STC89C52 microcontroller; infrared sensor; motor drive目录1 绪论......1 1.1 课题背景......1 1.2 课题研究的目的和意义......1 1.3 课题研究的主要内容......22 系统总体方案设计......3 2.1 系统方案设计......3 2.2 系统工作原理......3 2.3 系统总体结构框图......43 系统硬件设计......5 3.1 单片机最小系统......5 3.2 电源模块......7 3.3 电机驱动模块......8 3.4 循迹模块......104 系统软件设计......13 4.1 系统主程序......13 4.2 循迹模块程序......14 4.3 电机驱动模块程序......155 系统调试......17 5.1 硬件调试......17 5.2 软件调试......17 5.3 软硬件联调......186 总结......19参考文献......20致谢......21# 1 绪论## 1.1 课题背景智能小车,也就是轮式机器人,最适合在那些人类无法工作的环境中工作,该技术可以应用于无人驾驶机动车、无人工厂、仓库、服务机器人等领域。循迹是指小车在白色地板上循黑线行走,通常采取的方法是红外探测法。红外探测法,即利用红外线在不同颜色的物体表面具有不同的反射性质的特点,在小车行驶过程中不断地向地面发射红外光,当红外光遇到白色纸质地板时发生漫反射,反射光被装在小车上的接收管接收;如果遇到黑线则红外光被吸收,小车上的接收管接收不到红外光。单片机就是否收到反射回来的红外光为依据来确定黑线的位置和小车的行走路线。本设计采用 STC89C52 单片机为控制核心,利用红外传感器检测路面黑线,从而控制电机驱动模块调整小车转向,使小车能够沿着黑线自动行驶,实现小车自动循迹的目的。## 1.2 课题研究的目的和