文档视界 最新最全的文档下载
当前位置:文档视界 › 智能循迹避障小车完整程序(亲测好使)

智能循迹避障小车完整程序(亲测好使)

智能循迹避障小车完整程序(亲测好使)
智能循迹避障小车完整程序(亲测好使)

/*******************************************

//利用51定时器产生PWM波来调节电机速度

//速度变化范围从0-100可调

//使用三路做寻迹使用,哪一路检测在黑线哪一路为

//高电平

//没检测到黑线表示有反射对应输出低电平信号

*********************************************/

#include

#define uint unsigned int

#define uchar unsigned char

/*电机四个接口定义*/

sbit in1=P0^0;

sbit in2=P0^1;

sbit in3=P0^2;

sbit in4=P0^3;

/*计时器*/

uchar j,k,i,a,A1,A2,second,minge,minshi;

sbit dula=P2^6;

sbit wela=P2^7;

uchar code table[]={0x3f,0x06,0x5b,0x4f,

0x66,0x6d,0x7d,0x07,

0x7f,0x6f,0x77,0x7c,

0x39,0x5e,0x79,0x71};

uchar code table2[]={0xbf,0x86,0xdb,0xcf,

0xe6,0xed,0xfd,0x87,

0xff,0xef,0xf7,0xfc,

0xb9,0xde,0xf9,0xf1};

void delay(uchar i)

{

for(j=i;j>0;j--)

for(k=110;k>0;k--);

}

void display(uchar sh_c,uchar g_c,uchar min_ge,uchar min_shi) {

dula=1;

P0=table[sh_c];

dula=0;

P0=0xff;

wela=1;

P0=0xfb;

wela=0;

delay(5);

dula=1;

P0=table[g_c];

dula=0;

P0=0xff;

wela=1;

P0=0xf7;

wela=0;

delay(5);

dula=1;

P0=table[min_shi];

dula=0;

P0=0xff;

wela=1;

P0=0xfe;

wela=0;

delay(5);

dula=1;

P0=table2[min_ge];

dula=0;

P0=0xff;

wela=1;

P0=0xfd;

wela=0;

delay(5);

}

/*左、中、右三路循迹传感器接口定义*/ sbit zuo=P1^0;

sbit zhong=P1^1;

sbit you=P1^2;

/*避障接口定义*/

sbit bz_zuo=P1^3;

sbit bz_zhong=P1^4;

sbit bz_you=P1^5;

uchar count = 0;

/*利用定时器0定时中断,产生PWM波*/

void Init_timer()

{

TH0 = (65535-10)/256;

TL0 = (65535-10)%256;

TMOD = 0x01;

TR0 = 1;

ET0 = 1;

EA = 1;

}

/*左轮速度调节程序*/

void zuolun(uchar speed)

{

if(count <= speed) //count计数变量{

in1 = 1;

in2 = 0;

}

else

{

in1 = 0;

in2 = 1;

}

}

void youlun(uchar speed) //同上

{

if(count<= speed)

{

in3 = 1;

in4 = 0;

}

else

{

in3 = 0;

in4 = 1;

}

}

void Inline() //检测黑线信号

{

uchar temp;

temp =P1;

switch(temp)

{

case 0x01:zuolun(0); youlun(90);break; //左侧循迹传感器压线,小车向左前修正

case 0x02:zuolun(100);youlun(100);break; //中间循迹传感器压线,保持直走此处两值使电机速度保持相同

case 0x04:zuolun(90); youlun(0);break; //右侧循迹传感器压线,小车向右前修正

case 0x08:zuolun(90); youlun(0);break; //左侧避障传感器有信号小车右转case 0x10:zuolun(90); youlun(0);break; //中间避障传感器有信号小车左转

case 0x20:zuolun(90); youlun(0);break; //右侧避障传感器有信号小车左转

}

/*

if(zuo==1)

{

zuolun(10);

youlun(50);

}

else if(zhong==1)

{

zuolun(99);

youlun(99);

}

else if(you==1)

{

zuolun(50);

youlun(10);

} */

}

void main() //主函数

{

Init_timer(); //调用函数

while(1)

{

Inline();

minge=0;

minshi=0;

second++;

if(second==60)

second=0,minge++;

A1=second/10;

A2=second%10;

if(minge==10)

minge=0,minshi++;

for(a=200;a>0;a--)

{

display(A1,A2,minge,minshi);

};

}

}

void Timer0_int()interrupt 1 //定时器中断计数

{

TH0 = (65535-10)/256;

TL0 = (65535-10)%256;

count ++;

if(count >= 100)

{

count = 0;

}

}

(注:可编辑下载,若有不当之处,请指正,谢谢!)

智能循迹避障小车设计

毕业设计(论文) 课题名称智能循迹避障小车设计 学生姓名 XXX 学号00000000000000 系、年级专业 XXXXXXXXXXXXXXXXXXX 指导教师 XXX 职称讲师 2016年5月18日

摘要 自从首个工业智能设施诞生以来,智能设施的发展已经扩展到了包括机器、刻板、电子、冶金、交通、宇航、国防等产业领域。近年来智能设施水平迅速上升,大大的改变了大多数人类的生活方式。在人类的智能化技术不断飞速进步的过程中,能够取代手动的机器人在更加人性化的同时也越来越智能化。 本文主要讨论了基于单片机的智能循迹避障小车的设计。智能自动循迹制导系统在驱动电路的基础上,实现自动跟踪汽车导线,而智能避障是使用红外传感器测距系统来实现功能来规避障碍。智能寻光避障小车是一种采用了多种传感器,以单片机为核心,电力马达驱动和自动控制为技术,根据程序预先确定的模式,而不是人工管理来实现避障导航的自动跟踪高新技术。这项技术已广泛应用于智能无人驾驶、智能机器人、全自动工厂等许多领域。 这个设计使用STC89C52单片机[1]作为小车的智能核心,使用红外传感器对智能小车跟踪模块识别引导线跟踪,收集模拟信号并将信号转换成为数字信号,使用C 语言编写程序,设计的电路结构简单,易于实现,时效性高。 关键词:智能化;单片机最小系统;传感器;驱动电路

ABSTRACT From the first level of industrial intelligent facilities since birth, the development of intelligent facilities has been broadened to include machinery, electronics, metallurgy, transportation, aerospace, defense and other fields. Intelligent facilities level rising in recent years, and rapidly, significantly changed the way people live. People in the process of thinking, improvement, learning and intelligence of replace the manual machine is more and more. This paper mainly discusses the intelligent tracking based on single chip microcomputer control process of the obstacle avoidance car. Intelligent automatic tracking is based on the driving circuit of the guidance system, to achieve automatic tracking car line; obstacle avoidance is the use of infrared sensor ranging system to realize the function to evade obstacles. Intelligent tracking obstacle avoidance car is a use different sensor , motor drive for power and automatic control technology to realize according to the procedures predetermined mode, not by artificial management can realize the automatic tracking of obstacle avoidance navigation of high and new technology. The technology has been widely used in unmanned intelligent unmanned line, intelligent robot and so on many fields. Using infrared sensors for car tracking module to identify the guide line tracking, collecting analog signal and converts the signal into digital signal; Using C language to write the program, the design of the circuit structure is simple, easy to implement,timeliness is high. Keywords: Intelligent; Single chip microcomputer minimum system; The Sensor; Driver circuit

智能循迹避障小车方案设计书

封面

作者:PanHongliang 仅供个人学习 目录 摘要………………………………………………………………………………………2 ABSTRACT………………………………………………………………………………

…2 第一章绪论 (3) 1.1智能小车的意义和作用 (3) 1.2智能小车的现状 (3) 第二章方案设计与论证 (4) 2.1 主控系统 (4) 2.2 电机驱动模块 (4) 2.3 循迹模块 (6) 2.4 避障模块 (7) 2.5 机械系统 (7) 2.6电源模块 (8) 第三章硬件设计 (8) 3.1总体设计 (8) 3.2驱动电路 (9) 3.3信号检测模块 (10) 3.4主控电路 (11) 第四章软件设计 (12) 4.1主程序模块 (12) 4.2电机驱动程序 (12) 4.3循迹模

块 (13) 4.4避障模块 (15) 第五章制作安装与调试 (18) 结束语 (18) 致谢……………………………………………………………………………………… 19 参考文献 (19) 智能循迹避障小车 摘要:利用红外对管检测黑线与障碍物,并以STC89C52单片机为控制芯片控制电动小汽车的速度及转向,从而实现自动循迹避障的功能。其中小车驱动由 L298N驱动电路完成,速度由单片机输出的PWM波控制。 关键词:智能小车;STC89C52单片机; L298N;红外对管 Intelligent tracking and obstacle-avoid car Abstract:Based infrared detection of black lines and theroad obstacles, and use a STC89C52 MCU as the controlling core for the speed and direction, A electronic drived, which can automatic track and avoid the obstacle, was designed and fabricated. In which, the car is drived by the L298N circuit, its speed is controlled by the output PWM signal from the STC89C52. Keywords: Smart Car。STC89C52 MCU。L298N。Infrared Emitting Diode 第一章绪论 1.1智能小车的意义和作用 自第一台工业机器人诞生以来,机器人的发展已经遍及机械、电子、冶金、交通、宇航、国防等领域。近年来机器人的智能水平不断提高,并且迅速地改变着人们的生活方式。人们在不断探讨、改造、认识自然的过程中,制造能替代人劳动的机器一直是人类的梦想。 随着科学技术的发展,机器人的感觉传感器种类越来越多,其中视觉传感器成为自动行走和驾驶的重要部件。视觉的典型应用领域为自主式智能导航系统,对于视觉的各种技术而言图像处理技术已相当发达,而基于图像的理解技术还很落后,机器视觉需要通过大量的运算也只能识别一些结构化环境简单的目标。视

基于 单片机设计智能避障小车

单片机设计智能避障小车 摘要 利用红外对管检测黑线与障碍物,并以STC89C51单片机为控制芯片控制电动小汽车的速度及转向,从而实现自动循迹避障的功能。其中小车驱动由L298N 驱动电路完成,速度由单片机输出的PWM波控制。本文首先介绍了智能车的发展前景,接着介绍了该课题设计构想,各模块电路的选择及其电路工作原理,最后对该课题的设计过程进行了总结与展望并附带各个模块的电路原理图,和本设计实物图,及完整的C语言程序。 关键词:智能小车;51单片机;L298N;红外避障;寻迹行驶 abstract Using infrared detection black and obstacles to the line and STC89C51 microcontroller as the control chip to control the speed of the electric car and steering, so as to realize the function of automatic tracking and obstacle avoidance. Which the car driven by the L298N driver circuit is completed, the speed of the microcontroller output PWM wave control. This article first introduces the development of the intelligent car prospect, then introduces the design idea, the subject selection of each module circuit and working principle of the circuit, the design process of the subject is summarized and prospect with each module circuit principle diagram, and the real figure design, and complete C language program. Key words: smart car; 51 MCU; L298N; infrared obstacle avoidance; track driving

毕业设计+智能循迹避障小车设计之令狐文艳创作

单片机系统课程设计 令狐文艳 轮式移动机器人的设计 学院:通信与电子工程学院 班级:电子131 姓名:初清晨 学号:2013131013 同组成员:孟庆阳张轩 指导老师:王艳春 日期:2015年12月24日

组员分工 1、组长:张轩,实物焊接,报告整理,程序设计 2、组员:孟庆阳,实物焊接,仿真测试,报告整理 3、组员:初清晨,实物焊接,报告整理,仿真测试

目录 摘要1 第一章绪论2 1.1智能小车的意义和作用2 1.2智能小车的现状3 第二章方案设计与论证3 2.1 主控系统3 2.2 电机驱动模块4 2.3 循迹模块5 2.4 避障模块6 2.5 机械系统7 2.6电源模块7 第三章硬件设计7 3.1 AT89S52单片机的简介8 3.2总体设计11 3.3驱动电路12 3.4信号检测模块13 3.5主控电路14 第四章软件设计15 4.1主程序框图15 4.2电机驱动程序15 4.3循迹模块16 4.4避障模块20 结束语25 致谢26 附录一循迹加红外避障综合程序28 附录二实物图32

摘要 随着计算机、微电子、信息技术的快速进步,智能化技术的开发速度越来越快,智能度越来越高,应用范围也得到了极大的扩展。智能作为现代的新发明,是以后的发展方向,它可以按照预先设定的模式在一个环境里自动的运作,不需要人为的管理,可应用于科学勘探等用途。智能电动小车就是其中的一个体现。设计者可以通过软件编程实现它的行进、循迹、停止的精确控制以及检测数据的存储、显示,无需人工干预。因此,智能电动小车具有再编程的特性,是机器人的一种。 本设计采用AT89S52单片机加电机驱动电路和红外遥控及循迹模块还有红外接收一体化传感器设计而成,采用模块化的设计方案,运用红外遥控器控制小车的前进、后退、左转、右转、启动和停止。 关键词:智能小车;STC89C52单片机;L9110;红外对管 Intelligent tracking and obstacle-avoid car Abstract:Based infrared detection of black lines and theroad obstacles, and use a STC89C52 MCU as the controlling core for the speed and direction, A electronic drived, which can automatic track and avoid the obstacle, was designed and fabricated. In which, the car is drived by the L298N circuit, its speed is controlled by the output PWM signal from the STC89C52. Keywords: Smart Car; STC89C52 MCU; L298N;Infrared Emitting Diode 第一章绪论 1.1智能小车的意义和作用 自第一台工业机器人诞生以来,机器人的发展已经遍及机械、电子、冶金、交通、宇航、国防等领域。近年来机器人的智能水平不断提高,并且迅速地改变着人们的生活方式。人们在不断探讨、改造、认识自然的过程中,制造能替代人劳动的机器一直是人类的梦想。 随着科学技术的发展,机器人的感觉传感器种类越来越多,其中视觉传感器成为自动行走和驾驶的重要部件。视觉的典型应用领域为自主式智能导航系统,对于视觉的各种技术而言图像处理技术已相当发达,而基于图像的理解技术还很落后,机器视觉需要通过大量的运算也只能识别一些结构化环境简单的

智能避障小车

目录 1. 绪论 (5) 2. 方案设计与论证 (6) 2.1 主控系统 (6) 2.2寻迹模块 (7) 2.3 避障模块 (8) 2.4 机械系统 (10) 2.5 电源模块 (10) 3. 硬件设计 (12) 3.1总体设计 (12) 3.2驱动电路 (12) 3.3 PWM控制技术分析 (13) 3.4检测模块 (13) 4. 软件设计 (15) 4.1系统软件设计说明 (15) 4.2程序框图 (15) 结束语 (16) 参考文献 (17) 致谢 (18) 附录程序清单 (19)

摘要 随着机器人技术的发展, 自主移动机器人以其活性和智能性等特点, 在人们的生产、生活中的应用来越广泛。自主移动机器人通过各种传感器系统感知外界环境和自身状态, 在复杂的已知或者未知环境中自主移动并完成相应的任务。而在多种探测手段中, 超声波传感器与光电寻迹系统由于具有成本低, 安装方便, 不容易受电磁、光线、被测对象颜色、烟雾等影响, 时间信息直观等特点, 对于被测物处于黑暗、有灰尘、烟雾、电磁干扰、有毒等恶劣的环境下有一定的适应能力, 因此在移动机器人领域有着广泛的应用。 关键词:智能小车;STC89C52单片机;超声波检测模块;光电寻迹

Abstract With the development of robotics, autonomous mobile robots play an important role in our manufacture and society for its characteristics: flexible and intelligent. Autonomous mobile robots sense the outside environment and their states with a variety of sensor systems’help. They walk in the complex and known or unknown environment to complete tasks. Moreover, among the methods of detection, ultrasonic wave sensors and photoelectric components are low cost, easy to installation, not susceptible to electromagnetic, light, objects’ color s and smoke, and easy to see time information. Therefore, they can be used in the darkness, dust, smoke, electromagnetic interference, toxic and other harsh environment. In other words, the components have a wide range of applications in the area of mobile robots. Keyword: Intelligent Car, STC89C52 Microcontroller, Ultrasonic Wave Component, Photoelectric Component

智能避障小车设计--毕业设计完整版-附程序编程

毕业设计设计题目:智能避障小车设计 系别:机电工程系 班级:测控技术与仪器 姓名:XXX 指导教师: XXX

智能小车设计 摘要 随着近年来机器人的智能水平不断提高,其中机器人的感觉传感器种类越来越多,而视觉传感器成为自动行走和驾驶的重要部件。智能小车可应用于无人工厂,仓库,服务机器人等领域解决一些高危环境下的难题。同时单片机技术的迅速发展使得机器人的智能控制更加智能化,人性化。 该设计是利用光电传感器以一定的频率发射红外线来检测障碍物,然后将检测信号发送到STC89C52单片机,并以STC89C52单片机为控制芯片进而电动小汽车的速度及转向,以此实现自动避障的功能。其中小车驱动由L298N驱动电路完成,速度由单片机输出的PWM波调速控制。本设计结构简单,较容易实现,与实际相结合,现实意义很强,但具有高度的智能化、人性化,一定程度体现了智能。 关键词:智能小车; STC89C52单片机; L298N; PWM波

Design Of Smart Car Abstract Along with the robot's intelligent level rises ceaselessly, the types of robot sensory sensor are more and more, and the vision sensor have become the important part in the automatic walking and driving .Smart car can be applied to unmanned factory, warehouse, service robot and etc. to solve some high risk environment problems,At the same time,The rapid development of MCS technology makes the intelligent control of robot more intelligent ang humane. This design uses a photoelectric sensor sending a certain frequency transmitting infrared to detect obstacles, and then sends a detection signal to a STC89C52 MCS. While the car is drived by the L298N circuit, its speed is controlled by the output PWM signal from the STC89C52 MCS.This design is practical ,easy realization and simple in the structure, but highly intelligent, humane, Intelligent in some degree. Key words:Smart Car; STC89C52 MCS; L298N; PWM Signa

智能避障小车设计

江阴职业技术学院项目设计报告 项目:超声波避障小车的设计与制作 专业应用电子技术专业 学生姓名 班级10应用电子()班 学号 指导教师 完成日期

智能小车是一种能够通过编程手段完成特定任务的小型化机器人,它具有制作成本低廉,电路结构简单,程序调试方便等优点。由于具有很强的趣味性,智能小车深受广大机器人爱好者以及高校学生的喜爱。 本论文介绍的是具有自动避障功能的智能小车的设计与制作(以下简称智能小车),论文对智能小车的方案选择,设计思路,以及软硬件的功能和工作原理进行了详细的分析和论述。经实践验收测试,该智能小车的电路结构简单,调试方便,系统反映快速、灵活,设计方案正确、可行,各项指标稳定、可靠。

Smart cars can be programmed to perform a specific task means the miniaturization of robot, it has to make cost is low, circuit simple structure, convenient program test. Because of it has strong interest, intelligent robot car favored by the majority of the university students' enthusiasts and love. This paper introduces the is a automatic obstacle avoidance function of intelligent car design and production (hereinafter referred to as the smart car), the thesis to the intelligence of the car scheme selection, design idea, and the implementation of hardware and software function and working principle of a detailed analysis and discusses. After practice acceptance test, this intelligent car circuit structure is simple, convenient debug, fast, flexible system reflect, correct and feasible design scheme, each index is steady and reliable.

毕业设计智能循迹避障小车设计

毕业设计智能循迹避障 小车设计 Standardization of sany group #QS8QHH-HHGX8Q8-GNHHJ8-HHMHGN#

单片机系统课程设计 轮式移动机器人的设计 学院:通信与电子工程学院 班级:电子131 姓名:初清晨 学号: 13 同组成员:孟庆阳张轩 指导老师:王艳春 日期:2015年12月24日

组员分工 1、组长:张轩,实物焊接,报告整理,程序设计 2、组员:孟庆阳,实物焊接,仿真测试,报告整理 3、组员:初清晨,实物焊接,报告整理,仿真测试

目录

摘要 随着计算机、微电子、信息技术的快速进步,智能化技术的开发速度越来越快,智能度越来越高,应用范围也得到了极大的扩展。智能作为现代的新发明,是以后的发展方向,它可以按照预先设定的模式在一个环境里自动的运作,不需要人为的管理,可应用于科学勘探等用途。智能电动小车就是其中的一个体现。设计者可以通过软件编程实现它的行进、循迹、停止的精确控制以及检测数据的存储、显示,无需人工干预。因此,智能电动小车具有再编程的特性,是机器人的一种。 本设计采用AT89S52单片机加电机驱动电路和红外遥控及循迹模块还有红外接收一体化传感器设计而成,采用模块化的设计方案,运用红外遥控器控制小车的前进、后退、左转、右转、启动和停止。 关键词:智能小车;STC89C52单片机;L9110;红外对管 Intelligent tracking and obstacle-avoid car Abstract:Based infrared detection of black lines and the road obstacles, and use a STC89C52 MCU as the controlling core for the speed and direction, A electronic drived, which can automatic track and avoid the obstacle, was designed and fabricated. In which, the car is drived by the L298N circuit, its speed is controlled by the output PWM signal from the STC89C52. Keywords: Smart Car; STC89C52 MCU; L298N; Infrared Emitting Diode 第一章绪论 智能小车的意义和作用 自第一台工业机器人诞生以来,机器人的发展已经遍及机械、电子、冶金、交通、宇航、国防等领域。近年来机器人的智能水平不断提高,并且迅速地改变着人们的生活方式。人们在不断探讨、改造、认识自然的过程中,制造能替代人劳动的机器一直是人类的梦想。 随着科学技术的发展,机器人的感觉传感器种类越来越多,其中视觉传感器成为自动行走和驾驶的重要部件。视觉的典型应用领域为自主式智能导航系统,对于视觉的各种技术而言图像处理技术已相当发达,而基于图像的理解技术还很落后,机器视觉需要通过大量的运算也只能识别一些结构化环境简单的目标。视觉传感器的核心器件是摄像管或CCD,目前的CCD已能做到自动聚焦。但CCD传

智能循迹避障小车设计

摘要 本系统以设计题目的要求为目的,采用80C51单片机为控制核心,利用红外线传感器进行寻线,控制电动小汽车的自动循迹,并再通过光电开关探测障碍,从而控制电机转向,实现进行壁障功能。整个系统的电路结构简单,可靠性能高,实验测试结果满足要求。本文着重叙述了该系统的硬件设计方法、软件设计方法及测试结果分析。小车运行方案,在现有玩具电动车的基础上,加装红外线光电开关模块和红外寻线模块,实现对电动车位置、运行状况的实时测量,并将测量数据传送至单片机进行处理,然后由单片机根据所检测的各种数据实现对电动车的智能控制。 关键词:80C51单片机、红外线传感器、光电开关、电动小车

Abstract The system requirements of the design project for the purpose of the 80C51 microcontroller for the control of the core,the use of the hunt and infrared sensors,automatic obstacle acoidance control of electric cars,and the photoelectric switch to the barrier function.The electric circuit construction of whole system is simple, the function is dependable. Experiment test result satisfy the request, this text emphasizes introduced the hardware system designs and the result analyse. Car is running the program, under the existing toy electric car, based on the installation of super sonic sensor and infrared sensors, to achieve the location of electric vehicles,operational status of the real-time measurement, and measurement data sent to the microcontroller for processing, then SCM detected according to a variety of data to achieve intelligent control of electric vehicles. Key words: 80C51 single chip computer, infrared sensors, photoelectric switch, the electric car

Arduino智能避障小车避障程序

Arduino智能避障小车避障程序 首先建立一个名为modulecar.ino的主程序。 // modulecar.ino,玩转智能小车主程序 #include //导入舵机库 #include //导入NwePing库 // 对照系统配线方案依次指定各I/O const int ENA = 3 ; //左电机PWM const int IN1 = 4 ; //左电机正 const int IN2 = 5 ; //左电机负 const int ENB = 6 ; //右电机PWM const int IN3 = 7 ; //右电机正 const int IN4 = 8 ; //右电机负 const int trigger = 9 ; //定义超声波传感器发射脚为D9 const int echo = 10 ; //定义传感器接收脚为D10 const int max_read = 300; //设定传感器最大探测距离。 int no_good = 35; //*设定35cm警戒距离。 int read_ahead; //实际距离读数。 Servo sensorStation; //设定传感器平台。 NewPing sensor(trigger, echo, max_read); //设定传感器引脚和最大读数//系统初始化 void setup() { Serial.begin(9600); //启用串行监视器可以给调试带来极大便利 sensorStation.attach(11); //把D11分配给舵机

pinMode(ENA, OUTPUT); //依次设定各I/O属性 pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(ENB, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); pinMode(trigger, OUTPUT); pinMode(echo, INPUT); sensorStation.write(90); //舵机复位至90? delay(6000); //上电等待6s后进入主循环 } //主程序 void loop() { read_ahead = readDistance(); //调用readDistance()函数读出前方距离Serial.println("AHEAD:"); Serial.println(read_ahead); //串行监视器显示机器人前方距离 if (read_ahead < no_good) //如果前方距离小于警戒值 { fastStop(); //就令机器人紧急刹车 waTch(); //然后左右查看,分析得出最佳路线 goForward(); //*此处调用看似多余,但可以确保机器人高速运转下动作的连贯性 }

智能循迹避障小车(做人亲测试)

目录 摘要 (2) ABSTRACT (2) 第一章绪论 (3) 1.1智能小车的意义和作用 (3) 1.2智能小车的现状 (3) 第二章方案设计与论证 (4) 2.1 主控系统 (4) 2.2 电机驱动模块 (4) 2.3 循迹模块 (6) 2.4 避障模块 (7) 2.5 机械系统 (7) 2.6电源模块 (8) 第三章硬件设计 (8) 3.1总体设计 (8) 3.2驱动电路 (9) 3.3信号检测模块 (10) 3.4主控电路 (11) 第四章软件设计 (12) 4.1主程序模块 (12) 4.2电机驱动程序 (12) 4.3循迹模块 (13) 4.4避障模块 (15) 第五章制作安装与调试 (18) 结束语 (18) 致谢 (19) 参考文献 (19)

智能循迹避障小车 肖维 物理与电子信息学院电子信息工程专业 2006级9班指导教师:刘汉奎 摘要:利用红外对管检测黑线与障碍物,并以STC89C52单片机为控制芯片控制电动小汽车的速度及转向,从而实现自动循迹避障的功能。其中小车驱动由L298N驱动电路完成,速度由单片机输出的PWM波控制。 关键词:智能小车;STC89C52单片机; L298N;红外对管 Intelligent tracking and obstacle-avoid car Xiao Wei School of Physics and Electronic Information,Grade 2006 Class 9 ,Instructor:Liu Hankui Abstract:Based infrared detection of black lines and the road obstacles, and use a STC89C52 MCU as the controlling core for the speed and direction, A electronic drived, which can automatic track and avoid the obstacle, 、 Keywords: Smart Car; STC89C52 MCU; L298N; Infrared Emitting Diode 第一章绪论

智能循迹避障小车设计

目录 摘要 (2) 绪论 (2) 2方案设计与论证 (3) 2.1 主控系统 (3) 2.2 电机驱动模块 (4) 2.3 循迹模块 (5) 2.4 避障模块 (6) 2.5 机械系统 (7) 2.6电源模块 (7) 3硬件设计 (7) 3.1总体设计 (7) 3.2驱动电路 (8) 3.3信号检测模块 (9) 3.4主控电路 (10) 4 软件设计 (12) 4.1主程序模块 (12) 4.2电机驱动程序 (12) 4.3循迹模块 (13) 4.4避障模块 (15) 结束语 (19) 致谢 (19) 参考文献 (19)

智能循迹避障小车 李庆滨 (德州学院物理系,山东德州253023) 摘要利用红外对管检测黑线与障碍物,并以STC89C52单片机为控制芯片控制电动小汽车的速度及转向,从而实现自动循迹避障的功能。其中小车驱动由L298N驱动电路完成,速度由单片机输出的PWM 波控制。 关键词智能小车;STC89C52单片机;L298N;红外对管 1 绪论 自第一台工业机器人诞生以来,机器人的发展已经遍及机械、电子、冶金、交通、宇航、国防等领域。近年来机器人的智能水平不断提高,并且迅速地改变着人们的生活方式。人们在不断探讨、改造、认识自然的过程中,制造能替代人劳动的机器一直是人类的梦想。 随着科学技术的发展,机器人的感觉传感器种类越来越多,其中视觉传感器成为自动行走和驾驶的重要部件。视觉的典型应用领域为自主式智能导航系统,对于视觉的各种技术而言图像处理技术已相当发达,而基于图像的理解技术还很落后,机器视觉需要通过大量的运算也只能识别一些结构化环境简单的目标。视觉传感器的核心器件是摄像管或CCD,目前的CCD已能做到自动聚焦。但CCD传感器的价格、体积和使用方式上并不占优势,因此在不要求清晰图像只需要粗略感觉的系统中考虑使用接近觉传感器是一种实用有效的方法。 机器人要实现自动导引功能和避障功能就必须要感知导引线和障碍物,感知导引线相当给机器人一个视觉功能。避障控制系统是基于自动导引小车(AVG—auto-guide vehicle)系统,基于它的智能小车实现自动识别路线,判断并自动避开障碍,选择正确的行进路线。使用传感器感知路线和障碍并作出判断和相应的执行动作。 该智能小车可以作为机器人的典型代表。它可以分为三大组成部分:传感器检测部分、执行部分、CPU。机器人要实现自动避障功能,还可以扩展循迹等功能,感知导引线和障碍物。可以实现小车自动识别路线,选择正确的行进路线,并检测到障碍物自动躲避。基于上述要求,传感检测部分考虑到小车一般不需要感知清晰的图像,只要求粗略感知即可,所以可以舍弃昂贵的CCD传感器而考虑使用价廉物美的红外反射式传感器来充当。智能小车的执行部分,是由直流电机来充当的,主要控制小车的行进方向和速度。单片机驱动直流电机一般有两种方案:第一,勿需占用单片机资源,直接选择有PWM

智能循迹避障小车控制系统设计最终版

上海大学2016 ~2017 学年秋季学期研究生课程考试 课程名称:微机接口技术与数字控制课程编号:09Z077005 论文题目: 基于STC89C52单片机自动避障循迹小车控制系统的设计 研究生姓名: 肖青峰、徐鹏、付高峰学号: 16721678 论文评语: 成绩: 任课教师: 沈林勇 评阅日期:

基于STC89C52单片机自动避障循迹小车 控制系统设计 肖青峰、徐鹏、付高峰 上海大学机电工程与自动化学院,上海200072 摘要:本设计是基于STC89C52单片机的自动循迹避障小车的控制系统设计。利用红外对管检测黑线与障碍物,并以STC89C52单片机为控制芯片控制电动小汽车的速度及转向,从而实现自动循迹避障的功能。其中小车驱动由L298N驱动电路完成,速度由单片机输出的PWM波控制。 关键词:循迹避障小车; STC89C52单片机;红外对管;pwm调速

1设计目标和任务制定 随着社会水平提高与电子商务的快速发展,大型化集成化商品多元化的仓储集散中心应运而生。这些仓库通常面积巨大,(有的可达上万平方米,)并且物品种类繁多,仓储流量大,可是当前大多数仓储中心依旧采用传统的人工管理,工人管理工作繁琐且工作效率低下,综上所述,现代仓储业正面临着发展瓶颈,制约着仓储行业的进一步发展。如果有一种智能仓储,使得我们能够在实际的物流活动中提高仓储的效率,减少仓储的人力资源成本和仓库的直接成本,解决绝对人力不能满足大型物流中心运作的情况,那么我们的仓储行业又能向前迈进一个新阶。因此,基于上诉当前仓管配货工作的任务繁忙,减小仓管员工作量,提高仓储管理工作效率,我们决定制作一智能避障循迹小车,用于仓库不同货架间货物的自动配送。我们的小车能实现循迹移动,在不同工作点之间穿梭。借助我们的小车,仓管员只需轻松输入目标代码,就可以实现将货物自动送达目标货架或者将不同货架的货物收集到配送点。同时为了避免小车在行进过程中撞击到人员、货物或者货架等障碍物,我们的小车具有自动避障和自动停车功能。 2设计方案的拟定 2.1整体系统设计 该整个系统由控制模块、光电传感器检测模块、电源模块、电机及驱动模块等子模块组成。如框图所示:

毕业设计 智能循迹避障小车设计

单片机系统课程设计轮式移动机器人的设计 学院:通信与电子工程学院 班级:电子131 姓名:初清晨 学号: 2013131013 同组成员:孟庆阳张轩 指导老师:王艳春 日期: 2015年12月24日

组员分工 1、组长:张轩,实物焊接,报告整理,程序设计 2、组员:孟庆阳,实物焊接,仿真测试,报告整理 3、组员:初清晨,实物焊接,报告整理,仿真测试

目录 摘要 0 第一章绪论 0 1.1智能小车的意义和作用 0 1.2智能小车的现状 (1) 第二章方案设计与论证 (2) 2.1 主控系统 (2) 2.2 电机驱动模块 (2) 2.3 循迹模块 (3) 2.4 避障模块 (3) 2.5 机械系统 (4) 2.6电源模块 (4) 第三章硬件设计 (5) 3.1 AT89S52单片机的简介 (5) 3.2总体设计 (8) 3.3驱动电路 (9) 3.4信号检测模块 (10) 3.5主控电路 (10) 第四章软件设计 (10) 4.1主程序框图 (10) 4.2电机驱动程序 (10) 4.3循迹模块 (11) 4.4避障模块 (15) 结束语 (19) 致谢 (20) 附录一循迹加红外避障综合程序 (22) 附录二实物图 (25)

摘要 随着计算机、微电子、信息技术的快速进步,智能化技术的开发速度越来越快,智能度越来越高,应用范围也得到了极大的扩展。智能作为现代的新发明,是以后的发展方向,它可以按照预先设定的模式在一个环境里自动的运作,不需要人为的管理,可应用于科学勘探等用途。智能电动小车就是其中的一个体现。设计者可以通过软件编程实现它的行进、循迹、停止的精确控制以及检测数据的存储、显示,无需人工干预。因此,智能电动小车具有再编程的特性,是机器人的一种。 本设计采用AT89S52单片机加电机驱动电路和红外遥控及循迹模块还有红外接收一体化传感器设计而成,采用模块化的设计方案,运用红外遥控器控制小车的前进、后退、左转、右转、启动和停止。 关键词:智能小车;STC89C52单片机;L9110;红外对管 Intelligent tracking and obstacle-avoid car Abstract:Based infrared detection of black lines and the road obstacles, and use a STC89C52 MCU as the controlling core for the speed and direction, A electronic drived, which can automatic track and avoid the obstacle, was designed and fabricated. In which, the car is drived by the L298N circuit, its speed is controlled by the output PWM signal from the STC89C52. Keywords: Smart Car; STC89C52 MCU; L298N; Infrared Emitting Diode 第一章绪论 1.1智能小车的意义和作用 自第一台工业机器人诞生以来,机器人的发展已经遍及机械、电子、冶金、交通、宇航、国防等领域。近年来机器人的智能水平不断提高,并且迅速地改变着人们的生活方式。人们在不断探讨、改造、认识自然的过程中,制造能替代人劳动的机器一直是人类的梦想。 随着科学技术的发展,机器人的感觉传感器种类越来越多,其中视觉传感器成为自动行走和驾驶的重要部件。视觉的典型应用领域为自主式智能导航系统,

相关文档
相关文档 最新文档