My hoverboard can't move

Hi guys, I just can’t run my hoverboard this time. I’ve used to use hoverboard using these parameters

odrv0.axis0.motor.config.pole_pairs = 15
odrv0.axis0.motor.config.resistance_calib_max_voltage = 4
odrv0.axis0.motor.config.requested_current_range = 25
odrv0.axis0.motor.config.current_control_bandwidth = 100
odrv0.axis0.motor.config.torque_constant = 8.27/16
odrv0.axis0.encoder.config.bandwidth = 100

odrv0.axis0.encoder.config.mode = ENCODER_MODE_HALL / odrv0.axis0.encoder.config.mode = EncoderMode.HALL
odrv0.axis0.encoder.config.cpr = 90

odrv0.axis0.controller.config.pos_gain = 1
odrv0.axis0.controller.config.vel_gain = 0.02 * odrv0.axis0.motor.config.torque_constant * odrv0.axis0.encoder.config.cpr
odrv0.axis0.controller.config.vel_integrator_gain = 0.1 * odrv0.axis0.motor.config.torque_constant * odrv0.axis0.encoder.config.cpr
odrv0.axis0.controller.config.vel_limit = 10
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL

odrv0.axis0.motor.config.calibration_current = 5

odrv0.axis0.encoder.config.mode = ENCODER_MODE_HALL
odrv0.axis0.encoder.config.cpr = 90

odrv0.save_configuration()
odrv0.reboot()

odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
odrv0.axis0.motor
odrv0.axis0.motor.config.pre_calibrated = True

odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION
odrv0.axis0.encoder
odrv0.axis0.encoder.config.pre_calibrated = True

odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.input_vel = 2

Currently trying to use these parameters with my new hoverboard and I don’t know what happen when I run odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION my hoverboard won’t beep resulting not having phase inductance and resistance.

and when i run dump error

In [38]: dump_errors(odrv0, clear=False)
system: not found
axis0
axis: no error
motor: no error
DRV fault: not found
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
DRV fault: not found
sensorless_estimator: no error
encoder: no error
controller: no error

Help me please.
Thank you very much

Hi! Could you please provide some pictures of your connection setup? And how much voltage your battery has?

hi mate, I’m not a programmer but fumbled my way through with these settings on a set of hoverboard wheels… this is probably 102 years old so may be out of date… fyi anyway,.

odrv0.axis1.motor.config.current_lim = 0

odrv0.axis0.motor.config.pole_pairs = 15

odrv0.axis1.motor.config.pole_pairs = 15

odrv0.axis0.motor.config.resistance_calib_max_voltage = 24

odrv0.axis1.motor.config.resistance_calib_max_voltage = 24

odrv0.axis0.motor.config.requested_current_range = 25 #Requires config save and reboot

odrv0.axis1.motor.config.requested_current_range = 25 #Requires config save and reboot

odrv0.axis0.motor.set_current_control_bandwidth(100)

odrv0.axis1.motor.set_current_control_bandwidth(100)

odrv0.axis0.encoder.config.mode = 1

odrv0.axis1.encoder.config.mode = 1

odrv0.axis0.encoder.config.cpr = 90

odrv0.axis1.encoder.config.cpr = 90

odrv0.axis0.encoder.config.bandwidth = 100

odrv0.axis1.encoder.config.bandwidth = 100

odrv0.axis0.controller.config.pos_gain = 1

odrv0.axis1.controller.config.pos_gain = 1

odrv0.axis0.controller.config.vel_gain = 0.02

odrv0.axis1.controller.config.vel_gain = 0.02

odrv0.axis0.controller.config.vel_limit = 2000

odrv0.axis1.controller.config.vel_limit = 2000

odrv0.axis0.controller.config.control_mode = CTRL_MODE_VELOCITY_CONTROL

odrv0.axis1.controller.config.control_mode = CTRL_MODE_VELOCITY_CONTROL

odrv0.save_configuration()

odrv0.reboot()

odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION

odrv0.axis1.requested_state = AXIS_STATE_MOTOR_CALIBRATION

odrv0.axis0.motor

odrv0.axis1.motor

odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION

odrv0.axis1.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION

  • odrv0.axis0.config.startup_motor_calibration
  • odrv0.axis0.config.startup_encoder_index_search
  • odrv0.axis0.config.startup_encoder_offset_calibration
  • odrv0.axis0.config.startup_closed_loop_control
  • odrv0.axis0.config.startup_sensorless_control

odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE

odrv0.axis0.requested_state=AXIS_STATE_STARTUP_SEQUENCE

1 Like

I think this is what @Raven_Red may be missing. 24V for resistance calibration is a bit excessive though. The default is 2V, but you may need up to 6V with a high resistance motor.

1 Like