Problem with motor stops rotate

hello everyone,
I don’t know what is the problem with the motor. sometimes I have to move the motor vertical so can rotates but not always. Any ideas why? cable conexion ?

  • Motor ODrive D5065 270KV
  • ODrive Motor controller board V3.6
  • ODrive power resistor 50W
  • Encoder CUI AMT 102-V 4420

#restore the motherboard default parameters

#1 config dissipation resistor
odrv0.config.brake_resistance = 2.0

#2 config low voltage portection threshold
odrv0.config.dc_bus_undervoltage_trip_level= 8.0

#3 config overvoltage protection threshold
odrv0.config.dc_bus_overvoltage_trip_level= 56.0

#4 config overcurrent protection threshold
odrv0.config.dc_max_positive_current = 20.0

#5 config the reverse overcurrent protection threshold
odrv0.config.dc_max_negative_current =-1.0

#6 config the recharge current value
odrv0.config.max_regen_current =0

#7 save config parameters


#Part2: motor parameter configuration

#1 config the number of motor pole pairs

#2 config the current when the motor is calibrated
odrv0.axis0.motor.config.calibration_current =5

#3 config the voltage when the motor is calibrated
odrv0.axis0.motor.config.resistance_calib_max_voltage= 2

#4 config motor type

#5 Config the maximum current limit for motor operation
odrv0.axis0.motor.config.current_lim = 10 # [A]

#6 config the motor current sampling range
odrv0.axis0.motor.config.requested_current_range = 20

odrv0.axis0.motor.config.current_control_bandwidth = 2000
odrv0.axis0.motor.config.torque_constant = 8.27 / 270
odrv0.axis0.motor.config.torque_lim= 1.3

#7 save config parameters

# part 3
#encoder parameter config

#1 config encoder type
odrv0.axis0.encoder.config.mode= ENCODER_MODE_INCREMENTAL

#2 Config encoder resolution
odrv0.axis0.encoder.config.cpr =8192
odrv0.axis0.encoder.config.enable_phase_interpolation = True

#3 config encoding bandwith

#4 motor running current when configuring encoder calibration
odrv0.axis0.config.calibration_lockin.current =3

#5 config the current rise time during encoder calibration
odrv0.axis0.config.calibration_lockin.ramp_time = 0.4

#6 config the motor rotation distance when the current rises
odrv0.axis0.config.calibration_lockin.ramp_distance = 3.1415927410125732
#7 motor acceletation when configuring encoder calibration

#8 motor speed when configuring encoder calibration

#9 save config parameters

#PART 4 
#1 config control mode
odrv0.axis0.controller.config.control_mode= CONTROL_MODE_POSITION_CONTROL

#2 config the maximum speed of the motor

#3 config position loop gain
odrv0.axis0.controller.config.pos_gain =30

#4 config speed loop gain
odrv0.axis0.controller.config.vel_gain = 0.2
odrv0.axis0.controller.config.vel_integrator_gain = 0.5 * 10 * 0.2

#5 config input mode
odrv0.axis0.controller.config.input_mode= INPUT_MODE_TRAP_TRAJ

#6 Config the motor speed in trapezoidal mode
odrv0.axis0.trap_traj.config.vel_limit =30

#7 config the motor acceleration/deceleration in trapezoidal 
odrv0.axis0.trap_traj.config.accel_limit =5
odrv0.axis0.trap_traj.config.decel_limit =5

#8 save the config 


odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE



#odrv0.axis0.controller.config.input_mode = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.requested_state =AXIS_STATE_CLOSED_LOOP_CONTROL

odrv0.axis0.controller.input_pos =50

odrv0.axis0.controller.input_pos =0

This is the error i get
system: no error
axis: no error
motor: Error(s):
sensorless_estimator: no error
encoder: Error(s):
controller: Error(s):
axis: no error
motor: no error
sensorless_estimator: no error
encoder: no error
controller: no error

Doesn’t really make sense that you have both CPR_POLEPAIRS and OVERSPEED errors… is that at different times?

Yes, it’s at the same time. The wierd thing is that not always make the mistake. And about the problem that stops I think is because of the enclosure. Do you recommend another support to hold the motor?

Please check that the encoder is firmly mounted on the shaft. You need to press the plastic pieces together with “tool B” pretty hard so it grips firmly.

I found the problem. The screw were missing. What type of screw do i need?

Those are M4 screws.