Hello,
I am using an arduino uno with a TMC6300 and an AS5600 to control a small gimbal motor.
I tested both closed loop velocity mode and closed loop angle mode.
I was able to tune the PID and filter parameter to get acceptable results.(still a work in progress)
I will give 2 examples to explain the problems i am facing:
example 1:
closed loop velocity
target_speed = 20 rad/s
motor pulls 0.01 A with no load
targer velocity is maintained, if i break the motor slightly current consumption increases and velocity is maintained.
Everything looks to be working well.
However after a minute or so the motor suddenly starts to pull max current (1A) and picks up speed … sometimes it would stop and change direction.
example 2:
Closed loop angle
target_angle = 2 rad
motor turns to desired position
if forced to a different position it goes back to the target
motor barely pulls any current when it is at target postion <0.01A
However after a minute or so the motor suddenly starts to pull max current (1A)
Unlike in velocity mode where the motor picks up speed, in angle mode the motor maintains it s target position.
I have already monitored motor.getangle() to make sure the AS5600 is not going nuts.
I have a feeling this is a software bug, can anyone guide me to figure out what is going on?