To solve the problems such as low resolution ratio, poor ability to resist electromagnetic interference of traditional motor analog signal output and PWM output, a motor control system is designed. The system is compatible with analog output signals and a variety of analytical methods SENT protocol, the system uses a 32 bit microcontroller STM32F103VCT6 as the core processer unit to receive angle information from the triaxis Hall sensor and drive the motor by the target angle sent by the HOST computer as PID closed-loop control. The experiment results show that the system can control the rotational position of the motor precisely and achieve compatibility with multiple protocols. In the SENT protocol mode, the motor rotation angle error is less than 0.12%, lower than the traditional analog signal output.%针对传统电机的模拟信号输出和PWM信号输出分辨率不高、抗电磁干扰能力差的问题,开发了一套电机控制系统.该系统兼容模拟信号输出和多种SENT协议的信号解析方式,以32位的STM32F103VCT6单片机为核心处理器,接收三轴霍尔传感器的角度信息,并根据上位机下发的目标角度对电机进行PID闭环驱动.经实验测试验证,该系统能够精准地控制电机的旋转位置,能够实现多种协议的兼容.在SENT协议模式下,电机旋转的角度误差均在0.12%以内,误差低于传统的模拟信号输出方式.
展开▼