I bought a used Odrive V3.6 off Ebay in october and have been wrestling with it sense. I am using a 4S 1300mAh nano techn 90C lip battery, a 50W 6RJ 6ohm brakeresistor, a Propdrive V2 3536 910KV BLDC motor, and an AMT 102 incremental encoder. Here are the settings that I have created using the setup guide through the ODrive documents, forum posts, and various youtube videos. Anything after a % sign is a comment
odrive setup and calibration test sequence
odrivetool
test that odrive is connected by asking for voltage
odrv0.vbus_voltage
then configure the power supply, if using lithium polymer battery
%Voltage Limits
bat_n_cells = 4
odrv0.config.dc_bus_undervoltage_trip_level = 3.3 * bat_n_cells
odrv0.config.dc_bus_overvoltage_trip_level = 4.25 * bat_n_cells
*%Current limits formula for maximum safe discharge capacity of the Lipo is capacity (mAh/1000) *
*%(CValue)
odrv0.config.dc_max_positive_current = 100
%Max charging current I am not sure about, but I know that 1 amp is safe
odrv0.config.dc_max_negative_current = -1
set Brake resistor value
odrv0.config.brake_resistance=6
Set Motor Configuration
odrv0.axis0.motor.config.pole_pairs=7
odrv0.axis0.motor.config.motor_type=MOTOR_TYPE_HIGH_CURRENT
odrv0.axis0.motor.config.torque_constant=8.27/KV
Configure the System for calibration
odrv0.axis0.motor.config.calibration_current=7
odrv0.axis0.motor.config.calibration_lockin.current=10
%used for encoder calibration. If not working raise this current value too? should start at half of the continuous current
odrv0.axis0.motor.config.resistance_calib_max_voltage=4
%default is usually fine, but for higher resistance motors you may need to increase this to pass the motor calibration. Max vale allowed is half of the bus voltage (configure the voltage when the motor is calibrated) (raising this means we need to raise the current sense gain to 25 since it was originally at 60, according to a youtube video)
odrv0.axis0.motor.config.requested_current_range =25
% apparently IF MOTORS HIGH INDUCTANCE reduce this value:
odrv0.axis0.motor.config.current_control_bandwidth = 100
%In general, you needtext resistance_calib_max_voltage > calibration_current * phase_resistance resistance_calib_max_voltage < 0.5 * vbus_voltage
Setting the limits for calibration
odrv0.axis0.motor.config.calibration_current=7
odrv0.axis0.motor.config.current_lim=15 (configure the maximum current limit for motor operation)
odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
odrv0.save_configuration()
Configure the Encoder Parameters with index
odrv0.axis0.encoder.config.cpr = 8192 (configure encoder resolution for AMT 102)
odrv0.axis0.encoder.config.mode=ENCODER_MODE_INCREMENTAL
odrv0.config.gpio7_mode =GpioMode.DIGITAL
odrv0.save_configuration()
Below is the output from dump errors
In [2]: dump_errors(odrv0)
system: no error
axis0
axis: no error
motor: no error
DRV fault: none
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
DRV fault: none
sensorless_estimator: no error
encoder: no error
controller: no error
In [28]: odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
In [29]: odrv0.axis0.motor.error
Out[29]: 34359738368
In [45]: odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
In [46]: dump_errors(odrv0)
system: no error
axis0
axis: no error
motor: Error(s):
MotorError.PHASE_INDUCTANCE_OUT_OF_RANGE
MotorError.CURRENT_SENSE_SATURATION
MotorError.UNKNOWN_CURRENT_MEASUREMENT
MotorError.UNBALANCED_PHASES
DRV fault: none
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
DRV fault: none
sensorless_estimator: no error
encoder: no error
controller: no error
In [49]: odrv0.axis0.error
Out[49]: 0
In [50]: odrv0.axis0.motor.config.phase_inductance
Out[50]: inf
Whenever I run odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION all it does is make the motor have a barely noticeable high pitched hum, upon hand rotation provides resistance from rotation for about 3-5 seconds. Eventually I increased the calibration current to 15 and smoked my freaking motor like a moron.
MotorError.UNBALANCED_PHASES
I tried to correct for this initially by increasing the wire gauge and decreasing the length. I also removed all connectors that were between my motor and the terminals on the Odrive so now it is just one solid wire. I also took a multimeter and measured the resistance across all phases and got a consistent (but imprecise) reading of 0.3Ohms.
MotorError.PHASE_INDUCTANCE_OUT_OF_RANGE
I input odrv0.axis0.motor.config.phase_inductance and it told me that the value was inf. So I am insure why it would claim the value is inf when according to the multimeter the motor has a very clear and defined resistance and hence inductance.
In [50]: odrv0.axis0.motor.config.phase_inductance
Out[50]: inf
MotorError.CURRENT_SENSE_SATURATION
I read the documentation for this which indicated that this can be tripped if the Current_lim is set higher than the requested_current_range, so I checked the values and confirmed that was untrue.
In [51]: odrv0.axis0.motor.config.current_lim
Out[51]: 2.5
In [52]: odrv0.axis0.motor.config.requested_current_range
Out[52]: 25.0
MotorError.UNKOWN_CURRENT_MEASUREMENT
Not sure there is anything I can do to get you more info as it seems the controller needed to take a measurement and couldn’t.
At this point I am at a complete loss, and could really use some help.