基于单片机的步进电机小车驱动系统设计摘 要本设计以 STC89C52 单片机最小系统为核心,设计了一种两相四线步进电机的驱动器电路。整个系统通过单片机控制步进电机驱动器的输出信号,对步进电机的动作进行控制,进而实现小车的行走动作。文章包括了步进电机正转、反转、加速、减速这些基本旋转,以及在此基础之上同时控制两个步进电机,实现小车的前进、后退、左转与右转。并在小车上增加一些传感器模块,使单片机正常驱动步进电机,带动小车执行相应任务的同时,根据传感器模块的反馈,不断修正,直到任务实现小车循迹与避障功能。至此来证明所设计的驱动电路的可行性。文章中不仅包括了在步进电机驱动电路基础上的单片机扩展电路,也包括了专门为单片机供电的 5V 稳压电路的分析与设计,以及使单片机串口与计算机 USB 接口直接进行通信的上位机电路的设计。关键词:STC89C52;步进电机;步进电机驱动电路;循迹;避障Stepping motor vehicles drive system design based on Single-Chip Microcomputer AbstractThis design with STC89C52 SCM smallest system as the core, designed a two phase four-wire stepping motor drive circuit. The whole system by single chip microcomputer control stepping motor drives the output signal, to control the motion of the stepper motor, and realizes the car to walk. Articles including the stepper motor are turning, inversion, acceleration, deceleration, these basic rotation, and on this basis at the same time control two stepper motors, implement the car move forward, backward, turn left and turn right. And add some on the car sensor module, MCU to normal driving stepping motor, drive car corresponding tasks at the same time, according to the feedback of sensor module, the correction unceasingly, until the task to realize the car tracking and obstacle avoidance function. At this point to prove the feasibility of the designed driver circuit.Not only included in the article based on step motor drive circuit of single chip microcomputer extended...