Hey i am new to odrive. So i am using a high current motor. I aim to move the motor by a set amgle say 60 degree. But i am unable to achieve it. Any suggestions how shoukd i go about
Hi! To help you best, I’m going to need some information. Can you please let me know the following:
- Which ODrive are you using?
- What motor are you using? A part number or datasheet is best
- What encoder are you using
- Please share some pictures of your wiring, showing how the encoder is connected to the motor, and how both are wired to the ODrive
- Please share the commands you used to set up your ODrive, whether in ODrivetool or the GUI.
What have you tried so far?
i am using 56V Odrive V3.6 and antigravity T motor MN5008 KV170
Till now, i have tried the following section from the documentation
However, I am unable to control the angle by which the drive moves
The encoder is connected to the motor via a pully cum coupler (I cant share an image…i hope u understand:) )
I was able to do the full calibration sequence and closed loop sequence
the following is the python code I used to calibrate the motor
from odrive.enums import *
from odrive.utils import dump_errors
odrv0 = odrive.find_any()
# # shows the voltage supplied to odrive
print(str(odrv0.vbus_voltage))
# # Controller configuring prarameters
odrv0.axis0.motor.config.current_lim = 4
odrv0.axis0.controller.config.vel_limit = 2
odrv0.config.enable_brake_resistor = True
odrv0.config.brake_resistance = 2
# # Motor Configuration Parameters
odrv0.axis0.motor.config.pole_pairs = 14
odrv0.axis0.motor.config.torque_constant = 8.27/170
odrv0.axis0.motor.config.motor_type = 0
# # Encoder Configuration Parameters
odrv0.axis0.encoder.config.cpr = 2400
# #calibration
#odrv0.save_configuration()
print('configuration saved successfully')
# Calibration
odrv0.axis0.requested_state = odrive.enums.AXIS_STATE_FULL_CALIBRATION_SEQUENCE
# Wait for calibration to complete
while odrv0.axis0.current_state != odrive.enums.AXIS_STATE_IDLE:
pass
odrv0.axis0.encoder.set_linear_count(0)
odrv0.axis0.requested_state = odrive.enums.AXIS_STATE_CLOSED_LOOP_CONTROL```
thank you