Problem
There is some stuff on using the odrive with friction load, but I haven’t seen anything about gravity load. How do I turn the odrive on and have it immediately resist torque from gravity?
Context
odrive board V 3.6
8192 CPR Encoder with ODrive Cable
ODrive Robotics D6374 - 150kv
brake wrapped around spindle
spindle attached to motor
cable wrapped around spindle
motor, brake, encoder, power source are fixed to a rack 5 ft off the ground
weight is attached to the end of the cable hanging down
Desired Goal
weight is on ground
system turns on
brake disengages
odrive is precalibrated
request state AXIS_STATE_ENCODER_INDEX_SEARCH
request state AXIS_STATE_MOTOR_CALIBRATION (for some reason)
request state AXIS_STATE_CLOSED_LOOP_CONTROL
motor can pick up weight and move it up and down
power shuts off
brake engages and holds weight
The problem comes in the following steps
power comes on
brake releases
weight falls to ground immediately
Work Done Before Procedure Above
went through a bunch of calibration for the motor and encoder and saved everything to the odrive
went through the tuning with load process so it can accurately move the weight around
odrv0.axis0.controller.config.vel_gain => 0.6525
odrv0.axis0.controller.input_pos => 6.0
settling time of 50ms
vel_integrator_gain = 0.5 * odrv0.axis0.controller.config.vel_gain * 20
set the calibration current high enough that it can pickup the weight from the ground
odrv0.axis0.motor.config.calibration_current = 10
Also you will need to upgrade your encoder for this. An incremental encoder is not suitable for this application because it requires the calibration / index search step, where the motor needs to be able to move, but cannot produce hardly any torque, because the commutation is not initialised.
Use an absolute encoder such as AS5047p and then you don’t have to do any calibration on start-up
I ran the following tests using a chair to temporarily simulate the brake staying on after the system powers up so we have a couple seconds to do motor calibration and closed loop mode.
If I understand what benefit the absolute encoder would give, is that the first test case will work like the second one did since we won’t have to do the encoder index search step.
Yes indeed.
Also note that you don’t need to do the motor calibration on every boot-up either. absolute encoder or not. You just need to do index search (with inc. encoder) or (with absolute encoder) go directly to closed loop.