I’ve recently picked up an old v3.6 ODrive (salvaged from an old project) that I’m intending to use for a fairly simple application. I’ve been testing it using a BLDC (600 Kv) that I have lying around, and I know the motor works properly from prior testing.
I have run the motor calibration sequence and encoder calibration sequence (using an AMT102 encoder, with index pulse) and can get the motor to return to the index position reliably on startup. However whenever I switch the ODrive into closed loop control it seems to default to velocity control mode and velocity input mode, and spins the motor a seemingly random low speed. If I command a velocity setpoint the motor seems to respond correctly (I haven’t externally measured the velocity, but the direction and relative magnitudes seem ok).
Setting it to position control and commanding a position doesn’t change this, and sometimes yields an INVALID_ESTIMATE error from the controller. I’ve checked the encoder pulses on a scope and they all look sensible, and the ODrive’s position and velocity setpoints are both zero as expected.
I don’t think it’s an issue with the control gains either, as even when I set all of the gains to zero the motor keeps rotating in closed loop control.
Does anyone have any thoughts on anything else I should be doing or checking?
Thanks in advance!
Hm, it could be an issue with the ODrive ADC calibration. What firmware version is it running? Also, are you calibrating with no load whatsoever on the motor? What are you setting as the axis0.config.calibration_lockin.current? And can you link the motor datasheet or provide a part number?
Firmware version is 0.5.3. Motor is calibrated with no load at all, part number is SunnySky X4108S (600 Kv model). axis0.config.calibration_lockin.current is set to 10A.
Is there an ADC calibration test that I can run to check the ADC?
The calibration should be done onboard / in real time. You can try updating to the newest v3.6 firmware (v0.5.6) and seeing if that helps. But before running the firmware update, could you try running odrivetool backup-config config.json and pasting the resulting config.json here? This also could be some board damage or wiring issues – could you post some pictures of your wiring as well as the top/bottom of your board?
I flashed the firmware twice - first time didn’t seem to fix anything, but on a hunch I flashed it again, and that seems to have fixed the issue! Now I have reliable closed loop position control - I can only assume that something was wrong with the old firmware/configuration.