基于单片机的直流电机调速系统的设计
摘
要
直流电机是通电线圈在磁场的作用下产生一电磁力,电磁力产生一
个作用于电枢的力矩
(即电磁转矩),使电机转动。电机转动的速度与电
机两端施加的电压成正比,输出转矩则与电流成正比,其通
-断比率对
应于所需速度。根据题目要求,系统可分为控制部分和速度检测部分。
本系统采用两片 AT89S52 单片机作为核心控制器,通过红外对接管组
成的自制传感器对电机转速进行测量。单片机采样单位时间的电机转
速后,通过 PID 控制算法校正 PWM(脉冲宽度调制)控制电机驱动电
路(H 桥)驱动直流电动机完成转向和速度的控制。然后由两个
4 位数
码管来显示直流电机当前的欲设速度和实际转速。
关 键 字 :AT89S52
直流电机
PID PWM 电机驱动电路
Abstract
Dc motor is made.put coil in magnetic field under the action of produce a electromagnetic
force, electromagnetic force produced a role in the armature torque, namely electromagnetic
torque motor rotation, making. Motor rotation speed and motor applied voltage is proportional to
the ends, the output torque is proportional to its current on-and-off broken rate corresponding to
the required speed. According to the topic request, the system can be divided into the control part
and speed detection parts. The system USES AT89S52 SCM as core controller, through infrared to
tube composed of homemade sensors to motor speed measuring, microcontroller sampling,
through the PID control algorithm produces PWM (pulse width modulation) control motor driver
circuit driver for dc complete dc motor speed control of steering and. Then by eight digital tube to
display the single-chip microcomputer control with measurement results.
Key word: AT89S52 dc motor PID PWM motor driver circuit