迷宫小车系统的设计.doc
约23页DOC格式手机打开展开
迷宫小车系统的设计,目 录摘要..........................................................................3abstract .....................................................................31...
内容介绍
此文档由会员 csfujixie 发布
目 录
摘要..........................................................................3
ABSTRACT .....................................................................3
1. 绪论.......................................................................4
1.1迷宫小车的作用与意义...................................................4
1.2迷宫小车的发展现状.....................................................4
2. 设计任务及要求............................................................4
2.1 设计任务..........................................................4
2.2 技术基本要求......................................................5
3. 系统方案的论证.............................................................5
3.1单片机控制模块.........................................................5
3.2电机控制模块...........................................................5
3.3光电监测模块...........................................................6
3.4显示模块...............................................................6
4. 总体设计方案 ..............................................................7
4.1系统模块...............................................................7
4.2系统方案 ..............................................................7
5. 硬件电路设计...............................................................7
5.1电动机驱动模块的电路设计与实现.........................................7
5.2单片机控制模块的电路设计与实现.........................................8
6. 系统的软件设计.............................................................8
6.1程序流程框图..........................................................10
6.2光电检测程序..........................................................10
6.3电机转动程序..........................................................12
6.3.1电机前进程序....................................................12
6.3.2电机后退程序....................................................12
6.3.3电机左转程序....................................................12
6.3.4电机右转程序....................................................12
6.3.5电机停止程序....................................................12
6.4显示程序..............................................................13
7. 系统测试与分析............................................................13
7.1测试工具..............................................................13
7.2测试结果..............................................................14
参考文献.....................................................................15
附录.........................................................................16
致谢.........................................................................22
迷宫小车系统设计
摘要:设计了一个基于单片机控制的迷宫小车系统。该系统采用AT89S52单片机为主控制核心,实现信号采集,路线判断,行驶总时间的显示,以控制小车的运动;利用光电开关感应墙体的存在,结合L298N芯片驱动减速电机运转,从而实现小车走迷宫。
该系统有单片机控制模块和光电监测模块两个主要功能模块。单片机控制模块主要利用单片机接受到光电开关输出的高低电平后再输出信号去控制小车的运动;光电监测模块则利用光电传感器对墙体的感应,然后输出相应的高低电平并传送给单片机。这样就可以实时监测小车在迷宫中所处的位置,并进行相应的运动,最终经判断让小车停止在迷宫出口指定的位置上。
关键词:单片机;电机驱动;光电开关
The System Design of Maze Trolley System
Yi Yinxue
School of Physics and Electronic Information, Grade 2006, Instructor:LaiChunhong
Abstract:Microcontroller AT89S52 is used to this maze trolley system to achieve signal acquisition ,line judge and the display of the driving total time.The principle of this system is that use photoelectric sensors which senses the presence of wall combined with the L298N chip to drive the DC Motor,achieve the purpose of making the trolley move and locate, Then achieve the goal that trolley move in the maze!
This system composed of modules such as SCM Control Module,Photoelectricity Monitoring Module,and so on.The SCM Control Module uses the SCM to output singnal after receiving the high-low output of photoelectric switches in order to control the move of trolley. Then the Photoelectricity Monitoring Module uses photoelectric sensors to judge the presence of wall ,then output corresponding high-low voltage to transmit to the microcontroller .This allows real-time monitoring of car position in the maze, and the corresponding movement,at last achieve the goal of making the trolley stop at the specified location.
Key word: microcontroller; motor drive; photoelectric switch
1. 绪论
1.1迷宫小车的作用与意义
进入21世纪,伴随着电子、信息技术的应用与迅速普及,人们对电子技术的要求越来越高。迷宫小车的出现对今后更好地用机器来代替人的工作垫定更扎实的基础。经过完善后的迷宫小车可以广泛用于抢险,救灾,有害气体中毒的抢救等。随着技术的发展智能迷宫机器人将替代小车工作,在危险场合迷宫机器人起着不可替..
摘要..........................................................................3
ABSTRACT .....................................................................3
1. 绪论.......................................................................4
1.1迷宫小车的作用与意义...................................................4
1.2迷宫小车的发展现状.....................................................4
2. 设计任务及要求............................................................4
2.1 设计任务..........................................................4
2.2 技术基本要求......................................................5
3. 系统方案的论证.............................................................5
3.1单片机控制模块.........................................................5
3.2电机控制模块...........................................................5
3.3光电监测模块...........................................................6
3.4显示模块...............................................................6
4. 总体设计方案 ..............................................................7
4.1系统模块...............................................................7
4.2系统方案 ..............................................................7
5. 硬件电路设计...............................................................7
5.1电动机驱动模块的电路设计与实现.........................................7
5.2单片机控制模块的电路设计与实现.........................................8
6. 系统的软件设计.............................................................8
6.1程序流程框图..........................................................10
6.2光电检测程序..........................................................10
6.3电机转动程序..........................................................12
6.3.1电机前进程序....................................................12
6.3.2电机后退程序....................................................12
6.3.3电机左转程序....................................................12
6.3.4电机右转程序....................................................12
6.3.5电机停止程序....................................................12
6.4显示程序..............................................................13
7. 系统测试与分析............................................................13
7.1测试工具..............................................................13
7.2测试结果..............................................................14
参考文献.....................................................................15
附录.........................................................................16
致谢.........................................................................22
迷宫小车系统设计
摘要:设计了一个基于单片机控制的迷宫小车系统。该系统采用AT89S52单片机为主控制核心,实现信号采集,路线判断,行驶总时间的显示,以控制小车的运动;利用光电开关感应墙体的存在,结合L298N芯片驱动减速电机运转,从而实现小车走迷宫。
该系统有单片机控制模块和光电监测模块两个主要功能模块。单片机控制模块主要利用单片机接受到光电开关输出的高低电平后再输出信号去控制小车的运动;光电监测模块则利用光电传感器对墙体的感应,然后输出相应的高低电平并传送给单片机。这样就可以实时监测小车在迷宫中所处的位置,并进行相应的运动,最终经判断让小车停止在迷宫出口指定的位置上。
关键词:单片机;电机驱动;光电开关
The System Design of Maze Trolley System
Yi Yinxue
School of Physics and Electronic Information, Grade 2006, Instructor:LaiChunhong
Abstract:Microcontroller AT89S52 is used to this maze trolley system to achieve signal acquisition ,line judge and the display of the driving total time.The principle of this system is that use photoelectric sensors which senses the presence of wall combined with the L298N chip to drive the DC Motor,achieve the purpose of making the trolley move and locate, Then achieve the goal that trolley move in the maze!
This system composed of modules such as SCM Control Module,Photoelectricity Monitoring Module,and so on.The SCM Control Module uses the SCM to output singnal after receiving the high-low output of photoelectric switches in order to control the move of trolley. Then the Photoelectricity Monitoring Module uses photoelectric sensors to judge the presence of wall ,then output corresponding high-low voltage to transmit to the microcontroller .This allows real-time monitoring of car position in the maze, and the corresponding movement,at last achieve the goal of making the trolley stop at the specified location.
Key word: microcontroller; motor drive; photoelectric switch
1. 绪论
1.1迷宫小车的作用与意义
进入21世纪,伴随着电子、信息技术的应用与迅速普及,人们对电子技术的要求越来越高。迷宫小车的出现对今后更好地用机器来代替人的工作垫定更扎实的基础。经过完善后的迷宫小车可以广泛用于抢险,救灾,有害气体中毒的抢救等。随着技术的发展智能迷宫机器人将替代小车工作,在危险场合迷宫机器人起着不可替..