摘要:通过前期学习和后期实际运用并组合使用超声波传感器、红外光电管和光敏电感元器件,以ARM K60单片机为控制核心来控制电机运转和智能小车的寻迹,该系统还包括直流电机、L298N芯片和蓝牙等。
本设计采用ARMK60单片机作为智能小车核心控制器,以单片机为控制核心,其他元件为辅助控制,实现电机的运行、前进、倒退和停止,并整体上实现智能小车最基础的开始、左转、右转和停止等功能。通过三个超声波传感器检测障碍物的距离,并用与障碍物之间的距离做出相应的反馈;实现红外光电管对障碍物的追踪,能够根据障碍物的远近来做出是追踪还是倒退的判断;实现在光线环境较暗的情况下,可以沿着单一方向强光源移动以此实现对光的追踪。
电动车的速度、位置、运行状况都有各部分功能元件实时测量,并将测量数据传至ARM K60单片机进行处理,然后单片机根据所监测的各种数据又将需要实现的行为反馈给各个功能元件从而实现对智能小车的智能控制。这种方案能实现对智能小车的运动状态进行实时控制,相对而言比较灵活,精确度较高,可以实现对小车运行的各项要求。
PWM (Pulse Width Modulation)控制就是脉宽调制技术:即通过对一系列脉冲的宽度进行调制,来等效的获得所需要的波形(含形状和幅值),而其最重要的理论基础就是面积等效原理:冲量相等而形状不同的窄脉冲加在具有惯性的环节上是,其效果基本相同。
超声波的工作原理是:采用IO触发测距,给100us的高电平信号;模块自动发送8个40Khz的方波,自动检测是否有信号返回:如果有信号返回,就通过IO端口输出一高电平,高电平持续的时间就是超声波从发射到返回的时间,如果没有就重新启动超声波,以防止回波电平丢失。
关键词: 电机;ARM K60单片机;IO触发;PWM
Based on ARM K60 intelligent car development
Abstract:Actual utilize and combine the use ultrasonic sensor, the infrared electric eye and the photosensitive inductance primary device through the earlier period study and the later period, monolithic integrated circuit control the electrical machinery revolution and the intelligent car take ARM the K60 as the control core seek the mark, this system also includes
the direct current machine, the L298N chip and the blue tooth and so on.
This design uses the ARM K60 monolithic integrated circuit to take the intelligent car core controller, take the monolithic integrated circuit as the control core, other parts are the secondary controls, realizes the electrical machinery movement, the advance, backs up with the stop, and in the whole realizes the intelligent car most foundation start, counterclockwise, functions and so on right-turn and stop. Through three ultrasonic sensor examination obstacle distance, and with makes the corresponding feedback with the obstacle between distance; Realizes the infrared electric eye to obstacle tracing, can far and near make according to the obstacle is the judgment which tracing or backs up; The realization in the light environment dark situation, may along the sole direction glare source migration by this realization to light tracing.
The design proposal electric car speed, the position, the movement condition all have various part of function part real-time measurement, and will survey the data to pass on monolithic integrated circuit carries on processing to ARM the K60, the behavior feedback which then the monolithic integrated circuit according to thus which will monitor each kind of data needs to realize for each function part to realize to the intelligent car intelligent control. This kind of plan can realize to the intelligent car state of motion carries on the real-time control, says relatively quite nimbly, the precision is high, may realize to car movement each request. 基于ARMK60单片机智能小车研制+源程序:http://www.751com.cn/zidonghua/lunwen_22439.html