Following the Hoverboard tutorial, I was able to make my wheels spinning
However, I am getting errors when setting input_vel to 0 before changing state to IDLE as described in the tutorial.
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.input_vel = 2
# Your motor should spin here
odrv0.axis0.controller.input_vel = 0
odrv0.axis0.requested_state = AXIS_STATE_IDLE
But I don’t get errors when running commands in this order:
...
# Your motor should spin here
odrv0.axis0.requested_state = AXIS_STATE_IDLE
odrv0.axis0.controller.input_vel = 0
So, I need to switch state first bevor setting velocity to 0.
Those are the errors I get:
In [30]: dump_errors(odrv0)
system: no error
axis0
axis: no error
motor: Error(s):
MOTOR_ERROR_UNKNOWN_TORQUE
MOTOR_ERROR_UNKNOWN_VOLTAGE_COMMAND
sensorless_estimator: no error
encoder: Error(s):
ENCODER_ERROR_ILLEGAL_HALL_STATE
controller: no error
In my application, the robot will stop and move very often. I am using Jetson Nano which sends commands (velocity) by UART. Ideally, I could set velocity between 0 and 2 without changing the state.
Note: I can make my wheels spinning from input_vel = 0.3. Below, the state switches to IDLE and throws errors like above.
Today, capacitors and protoboard arrived. But I just realized that I ordered the wrong ones…
I got 0.22uF instead of 22uF. The set includes caps from 0.1 to 10uF. Those ones won’t work right?
Ok, I bought correct caps but I realized that it’s really difficult to solder. I also tried it with a protoboard but it’s just a mess. So I have to find someone with expert soldering skills or take a different motor controller. I am just a bit frustrated because it is working except this little noise/issue on M0 which makes the ODRIVE useless. I also don’t understand why this board doesn’t come with caps by default.
Ah ok… I think it will be a great enhancement for v4.
By the way, my encoder (AEDR-8300) also has A/B wires. I tried to calibrate ODRIVE following the normal instructions without hall support. However, I didn’t get any signal/feedback. Do you know if this encoder is not supported by ODRIVE or can I make it supportive somehow?
Finally, I ordered a proper soldering station trying to solder caps again. Hopefully, I will be more lucky this time.
Alright, after some soldering practice I was dared to solder caps directly to the ODRIVE and it works like a charm. Puh, I hope that was the final challenge.
When running this command odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION I get the following error:
system: no error
axis0
axis: no error
motor: no error
sensorless_estimator: no error
encoder: Error(s):
ENCODER_ERROR_NO_RESPONSE
controller: no error
axis1
axis: no error
motor: no error
sensorless_estimator: no error
encoder: no error
controller: no error
Alright, I was able to fix it. I forgot to add some parameters. Nice, now I can run my motor in Hall or Encoder/Incremental Mode. That is amazing. Thanks a lot for supporting