But when it is not, the motor never stop rotating. When the set point is a value between 10 - 350 the sytem worked well. FOR READING ENCODER POSITION, GIVING 0-359 OUTPUT CORRESPOND TO THE ENCODER POSITION PID myPID(&input, &output, &setpoint, kp, ki, kd, DIRECT) ĪnalogWrite(RPWM, out) //Sets speed variable via PWMĪnalogWrite(LPWM, abs(out)) //Sets speed variable via PWM The used code: #include īyte input_pin = ĭouble input = 0, output = 0, setpoint = 0 The motor cannot stop at set point value near 0 degree (350 - 359, 0 - 10 degree). The system contain a dc motor, absolute encoder, and a motor driver.Įverything work as expected, but one thing. I'm doing a control engineering project, implementing a PID motor position control for automatic antenna tracking system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |