This is another motor from SkysEdge called Robowheel runs perfectly with their controller but failed to calibrate with Odrive. does someone tried it before with these motors.
Reconnected to ODrive 2062356E5748 as odrv0
In [3]: odrv0.axis0.motor.config.pole_pairs = 13
…: odrv0.axis0.encoder.config.cpr = 78
…: odrv0.axis0.motor.config.resistance_calib_max_voltage = 5
…: odrv0.axis0.motor.config.requested_current_range = 30
In [5]: odrv0.save_configuration()
Oh no odrv0 disappeared
Reconnected to ODrive 2062356E5748 as odrv0
In [6]: odrv0.reboot()
Oh no odrv0 disappeared
Reconnected to ODrive 2062356E5748 as odrv0
In [7]: odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
In [8]: odrv0.axis0.requested_state
Out[8]: 0
In [9]: odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
Connected to ODrive 2062356E5748 as odrv0
In [1]: odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
In [2]: dump_errors(odrv0, True)
system: no error
axis0
axis: no error
motor: Error(s):
MOTOR_ERROR_PHASE_RESISTANCE_OUT_OF_RANGE
sensorless_estimator: no error
controller: no error
axis1
axis: no error
motor: no error
sensorless_estimator: no error
encoder: no error
controller: no error
Robowheel has 1.7Ω resistance. This is high enough that you should consider using gimbal model, but can still be run in high current mode if you really want.
Use 56V odrive on 48V bus voltage, set resistance_calib_max_voltage = 20 and calibration_current = 4 or so, should work.
system: Error(s):
ODRIVE_ERROR_DC_BUS_OVER_REGEN_CURRENT
axis0
axis: no error
motor: Error(s):
MOTOR_ERROR_SYSTEM_LEVEL
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: Error(s):
MOTOR_ERROR_SYSTEM_LEVEL
sensorless_estimator: no error
encoder: no error
controller: no error
Then I input the following command according to the documentation troubleshooting
n [13]: odrv0.config.enable_brake_resistor = True
In [14]: odrv0.save_configuration()
Oh no odrv0 disappeared
Now got the following error
system: Error(s):
ODRIVE_ERROR_DC_BUS_OVER_REGEN_CURRENT
axis0
axis: no error
motor: Error(s):
MOTOR_ERROR_SYSTEM_LEVEL
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: Error(s):
MOTOR_ERROR_SYSTEM_LEVEL
sensorless_estimator: no error
encoder: no error
controller: no error
I have been away from my deck donkey project for a few months, but I did get it to work.
It has two robowheels. I run it with Dewalt 20 v lithium pack.
Noticed you have 13 pole pairs, I used 27 pole pairs. Seems like I might have done something different with the cpr also?? I will try to dig it out (may take a week or so…lot going on)
Created a program for Jetson Nano and drove it remotely.
Did have some problems and it would stop working (might be do to hall sensors?? )
I like the features of odrive and BLDC motors but there is alot to the setup. I have a bigger donkey with
4 wheel chair DC motors , the drives are simpler but the wheels will turn at different speeds so you would have steering drift ; also going to within a millimeter of a wall is better with BLDC motors
My config has change since I posted the above. Below is my new config.
It is for two wheels and the optical encoder instead of the hall encoders.
odrv0.config.enable_brake_resistor = True # Using included 2ohm resistor #remove enable_
odrv0.axis0.motor.config.calibration_current = 2 # highest integer value where I heard the square wave was 4
odrv0.axis0.motor.config.pole_pairs = 15
odrv0.axis0.motor.config.resistance_calib_max_voltage = 6 # motor config still worked with this set to 6
odrv0.axis0.motor.config.requested_current_range = 35 # 35 was the lowest value that produced and audible square wave.
odrv0.axis0.motor.config.current_control_bandwidth = 100.0
odrv0.axis0.motor.config.torque_constant = 8.27 / 10 # KV 10
odrv0.axis1.motor.config.calibration_current = 2 # highest integer value where I heard the square wave was 4
odrv0.axis1.motor.config.pole_pairs = 15
odrv0.axis1.motor.config.resistance_calib_max_voltage = 6 # motor config still worked with this set to 6
odrv0.axis1.motor.config.requested_current_range = 35 # 35 was the lowest value that produced and audible square wave.
odrv0.axis1.motor.config.current_control_bandwidth = 100.0
odrv0.axis1.motor.config.torque_constant = 8.27 / 10 # KV 10
I use ASCII protocol and run it in velocity control mode.
I use a Jetson Nano to control the Odrive via optical USB.
Tried hall sensors but smoother with optical encoder. The optical encoder on these motors are not index so each time you power up Odrive you have to calibrate the encoders then I can go forward, reverse, turn, acclerate and stop. 95% of time is glitch free, few times one wheel might not turn in
calibration, I think encoder wires are loose in sensor J4 sometimes.