作者:李星,杨秀媛,李银银
单位:北京信息科技大学,北京 100192
中图分类号:TP29
文献标识码:A
文章编号:1006-883X(2018)01-0013-05
收稿日期:2017-10-20
摘要:设计了基于STC12C5A单片机的智能寻迹小车。利用小车前侧及左右两侧的光电传感器检测跑道上的黑线,以STC12C5A单片机为控制芯片控制电动机及时调整转向并利用PWM进行调速,从而实现小车沿跑道行驶以及超车的功能。其中寻迹信息采集部分以反射式光电传感器和比较器组成,将采集到的数据处理后送至单片机。利用单片机输出的PWM波经L298N实现对电机转速的控制,从而实现小车的智能化。该小车具有自动寻迹、起始点检测以及自动声光报警等功能。基于稳定的硬件电路设计以及精确可靠的软件算法,小车能够实现预期功能。
关键词:STC12C5A单片机;L298N驱动;光电传感器;PWM调速
Design of an intelligent auto-tracking car based on DC motor control
LI Xing, YANG Xiu-yuan, LI Yin-yin
Beijing Information Science & Technology University, Beijing 100192, China
Abstract: An intelligent auto-tracking car based on DC motor control is designed in this paper, which uses the photoelectric sensors at the front and the left and right sides of the car to detect the black line on the runway, STC12C5A MCU as the core to control the motor for adjusting the direction of the car, and the PWM signals to adjust the speed, so as to realize the car driving along the runway and the function of overtaking. The tracing information acquisition part is composed of the reflective photoelectric sensors and the comparator, which processes the collected data and sends them to the MCU. The control of motor speed is realized by using PWM wave output from SCM to realize the intelligentialize of the car. The car has automatic tracking, starting point detection and automatic sound alarm and other functions. Based on stable hardware circuit design and accurate and reliable software algorithm, the car can realize the expected function.
Key words: STC12C5AMCU; L298N; photoelectric sensor; PWM timing
阅读全文
备注:2018年 第24卷 第01期