自动往返电动小汽车技术.docVIP

  • 1
  • 0
  • 约1.1万字
  • 约 18页
  • 2018-11-30 发布于江苏
  • 举报
自动往返电动小汽车技术

摘要 PAGE IV PAGE 18 基于单片机的自动往返小车设计 摘 要 本系统以Freescale MC9S12XS128MCU为核心控制模块,附以外围电路,采用激光管和接收管进行信号检测和循线运动;通过CodewarriorIDE 在线Debug进行调试,实现自动往返小车设计。综合运用单片机技术、自动控制理论、传感器检,使小车自动借助传感器识别路面环境以及行驶状态,运用单片机的运算和处理能力来实现小车的自动加速、限速、减速、定时、原地转向倒车、左转、右转、显示行驶时间等控制。 关键词:MC9S12XS128MCU,自动控制,电动小车, PWM调速,传感器 ABSTRACT The core of the system is MC9S12XS256 series microcontroller control module. We make full use of the automatic detection technology, MCU smallest system, Nixie tube module circuit, the control of signal, and the motor drive circuit. Through the simulation Codewarrior, practice and debugging, we realize the design of automatic car. We comprehensively use the microcontroller technology, automatic control theory, the detection technology, etc. The car is in unattended operation circumstance, using sensor to identify road environment and its position on the road. It travels by single-chip microcomputer control, the preliminary no control. MCU is known for its flexible operations, small volume, light weight, less consumption, powerful functions, and low in price. This design based on singlechip and peripheral circuit, uses gray scale sensor, laser device and receiver to realize the required following movement. We use MCU to realize the automatic forward, backward, left, right, and display time and distance of intelligent control system. KEY WORDS: MC9S12XS256 microcontroller, automatic, PWM speed adjusting, sensor 1、设计任务: 设计并制作一个能自动往返于起跑线与终点线间的小汽车,不能用人工遥控(包括有线和无线遥控),其行驶线路满足所需的要求。 要求 分区控制:如(图1)所示: 图1 跑道示意图 车辆从起跑线出发(出发前,车体不得超过起跑线),到达终点线后停留10秒,然后自动返回起跑线(允许倒车返回)。往返一次的时间应力求最短(从合上汽车电源开始计时)。 到达终点线和返回起跑线时,停车位置离起跑线和终点线偏差应最小(以车辆中心点与终点线或起跑线中心线之间距离作为偏差 的测量值) D-E间为限速区,车辆往返均要求低速通过,通过时间不得少于8秒,但不允许在限速区内停车。 2. 系统方案论证与分析 根据设计任务要求,并且根据我们自己的需要而附加的功能,该系统的总体框图可分为几个基本的模块,框图如(图1)所示: MC9S12XS MC9S12XS128 主控芯片 L298电机驱动芯片 黑线检测模块 电源模块 数码管显示模块 小车位置调节模块 图2-1 小车系统框图 2-1 主控芯片选择 针对此次设计的要求,以性能和熟悉程度为最重要的考虑指标,选择飞思卡尔公司的16位单片机MC9S12XS128。此MCU功能强大,具有高速I/O口、8路8位PWM输出通道,16通道AD转换4路定时通道、时钟发生模块,控制精度高,灵敏度强,适于进行实时过程控制。缺点是

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档