Hi Everyone,
I just started testing out the odrive. I got to the point of calibration. The odrive tool connected fine and I was able to input all the values. I was able to get ”odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE” to work no problem. The motor beeped and then turned a rotation. I then followed the next step and entered the “odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL“ command. The motor at this point doesn’t hold position or change position with the set position command. I’m not sure if maybe my power supply doesn’t supply enough current or what. I am using the amt10 13 bit encoder and a turnigy D3548 1100 kv motor. I haven’t checked the errors yet because I got pulled away by my family. Any help would be greatly appreciated.
Please check the errors, they will tell you answers
I was just about to!
I got the error code 257 or 0x101. I’m not sure what error that corresponds to though. I tried checking the documentation but I couldn’t find it.
is that axis, motor or encoder error?
Axis I believe. I just typed in odrv0.axis0.error, I apologize if I’m not very knowledge. I’m a mechanical engineer student so coding isn’t my strongest area, but I’m trying. Thank you so much for all the help though.
Check the error here. The error flags compose, so you have:
ERROR_ENCODER_FAILED = 0x100
and ERROR_INVALID_STATE = 0x01
.
You can ignore the invalid state part, that was because the sequence was interrupted. Go check the encoder errors.
If I did it correctly (odrv0.axis0.encoder.error) then I got the message 2 or 0x2. If I did it right then this is a count per revolution out of range error. I’m not sure what would cause this. I entered the cpr as 8192 according to the amt10 spec sheet. Maybe the wiring is wrong? I noticed that the supplied plug has the wires out of order from what you’re wiring diagram says. Yellow is in 5v, white in A, orange in B, green in Z, and black in ground.
Edit: I’m pretty sure the wiring is right
I would suggest to read odrv0.axis0.encoder.shadow_count, then turn the motor 1 rev by hand, and read it again. Make sure the difference of the two counts is close to the CPR you expect.
Okay, in the meantime I switched to axis1. Now I’m getting a different error (0x31). I’m sorry for being a pain.
How possible is it that the encoder is faulty? I had it sort of working, at least past the point of the first configuration step. Then I tried axis 0 again and now I’m getting the same encoder error on both axis’. I found an error saying that the phase couldn’t be read (0x0002).
After some trial and error I got it to work!!! This thing is crazy!