Hello peoples,
I designed a ESP32 driver using the DRV8313, AS5600 and Canbus transceiver for a robotics project im working on, but I’m having issues with the motor fine tuning…
I’ve been trying to play with the PID variables in full_control_serial.ino for a while, but I can seem to eliminate this little twitch that occurs when the motor is sitting at the setpoint.
Has anyone had a similar issue? (I’ve already swapped the pwm library with the one in the github docs)
Please see the video link below!
//-----------------------
// velocity PI controller parameters
motor.PID_velocity.P = 0.2;
motor.PID_velocity.I = 20;
motor.PID_velocity.D = 0.001;
// maximal voltage to be set to the motor
motor.voltage_limit = 6;
// velocity low pass filtering time constant
// the lower the less filtered
motor.LPF_velocity.Tf = 0.01;
// angle P controller
motor.P_angle.P = 20;
// maximal velocity of the position control
motor.velocity_limit = 40;
//----------------------------------
right now the main loop is running @1Khz