摘要
选择STC12C5A60S2单片机(MCU)作为微处理器,模拟实现了转台的正反两方向的转角定位功能,且其旋转转速可控。首先步进电机带动角度传感器旋转得到不同输出电压,利用单片机的A/D(10位)转换功能实现对此电压的数字解码,从而完成角度的检测。再利用检测得到的与旋转角度对应的数字量来修正单片机输出的驱动脉冲信号,使得期望的角度值与实际旋转的角度值尽量一致,达到精准控制步进电机转角的目的。
This paper selected the STC12 C5 A60 S2 microcontroller( MCU) as the microprocessor,and emulated the angle positioning function of the drill from two directions,and its rotation speed can be controlled. The stepper motor drives the angle sensor to get different output voltage which is loaded to the input of the A/D( 10 bit) conversion of the MCU to realize the digital decoding for angle detection. Then it used the digital decoded to correct the pulse signal from the output of the microcontroller,which would make the actual value as far as possible to be consistent with the desired angle,meaning the rotation angle of the stepper motor is controlled precisely.
出处
《信息技术》
2018年第2期48-51,共4页
Information Technology
基金
国家级大学生创新训练计划项目(201610722016)
咸阳师范学院科研基金项目(15XSYK036)