Hi there - new owner here, just trying to get my feet wet with a new v3.6 24V ODrive trying to control a (cheap) FlyCat iRotor 5010-360KV motor. I’ve had some limited success, but feel like I’ve hit an impasse…
My test setup:
24V ODrive v3.6 - not certain of the firmware version, but I assume 0.5.1 as this was purchased in the last week…
FlyCat iRotot 5010-360KV motor - note, this is a very cheap motor and possibly part of my issues?
AS5147P-TS_EK_AB encoder - AMS evaluation board. Using ABI interface. Board has been configured to run off 3.3V.
Bench Power supply set to 16V as main power to ODrive
Windows10 host computer, connected via USB, running freshly installed anaconda3 to run odrivetool
What I’ve done so far:
I ran through the Getting Started procedure in the documentation. I made the following changes as suggested in that procedure:
odrv0.axis0.motor.config.torque_constant=0.022972222 (arrived at by 8.27/360)
odrv0.axis0.controller.config.vel_limit=20 (this was originally 2, but through my testing I’ve bumped this up as I was receiving controller overspeed errors)
odrv0.axis0.requested_state=AXIS_STATE_FULL_CALIBRATION_SEQUENCE completes without errors.
odrv0.axis0.requested_state=AXIS_STATE_CLOSED_LOOP_CONTROL caused the motor to oscillate, vibrating horribly (and noisily).
After that I went through the Tuning procedure.
This left me with the following changes:
odvr0.axis0.controller.config.vel_gain = 0.04 (this “seems” quite low to me, but I had to go this low to get rid of the violent oscillation)
odrv0.axis0.controller.config.vel_integrator_gain=0.08 (I just did 2*vel_gain)
Now when I enter CLOSED_LOOP_CONTROL the motor doesn’t vibrate nearly as bad, but it still has some vibration (and hum) to it. I can send position commands to the motor and it’s responding reasonably. I’ve found that if I put a finger on the motor I can dampen out the vibration quite easily. I did start_liveplotter(lambda:[odrv0.axis0.encoder.pos_estimate, odrv0.axis0.controller.pos_setpoint]) to see if that told me anything, and I think it does…
It seems that the motor oscillation I’m seeing (in pos_estimate) is about +/- 0.0015 (of a turn). With my finger on the motor the swing drops to +/-0.0005 (which seems to be one or two encoder steps). Even with the motor powered I can easily rotate it +/-0.002 before I start to encounter the motor ‘fighting back’ in any way.
This leads me to think that the motor can’t really “hold” position better than +/-0.002 (of a turn, or about +/- 0.7degrees), the encoder is sensitive enough to detect this, and the controller is trying to compensate, but since the motor isn’t that precise, the controller ends up driving the motor too far to compensate, then has to drive it back the other way - resulting in the oscillation I’m seeing.
Just to be clear – I’m not worried (at this point) about the accuracy of the motor position - but in the powered-oscillation I’m seeing that is causing the (relatively) loud vibrations.
So - what am I doing wrong? What should I try to address the symptoms I’m seeing?
Thanks in advance for taking the time to read this far!