Тёмный

ODrive Hoverboard Motor Calibration 

E Sexton
Подписаться 15
Просмотров 2,8 тыс.
50% 1

Calibrating a hoverboard motor using the Odrive controller, start to finish. I couldn't find any information on what the motor was supposed to do during calibration, so I filmed both the commands and motor during the process.
-----
If you encounter an error PHASE_RESISTANCE_OUT_OF_RANGE check continuity between the screw terminal and the connection to the motor. Do this for each of the 3 wires going to the motor.
################ 2023 Commands For Latest Firmware ######################
M0
odrv0.config.enable_brake_resistor = True
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.mode = ENCODER_MODE_HALL
odrv0.axis0.encoder.config.cpr = 90
odrv0.axis0.encoder.config.calib_scan_distance = 150
odrv0.config.gpio9_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio10_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio11_mode = GPIO_MODE_DIGITAL
odrv0.axis0.encoder.config.bandwidth = 100
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 = 100
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis0.motor.config.calibration_current = 5
odrv0.save_configuration()
odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
odrv0.axis0.motor.config.pre_calibrated = True
odrv0.axis0.requested_state = AXIS_STATE_ENCODER_HALL_POLARITY_CALIBRATION
odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION
odrv0.axis0.encoder.config.pre_calibrated = True
odrv0.save_configuration()
M1
odrv0.config.enable_brake_resistor = True
odrv0.axis1.motor.config.pole_pairs = 15
odrv0.axis1.motor.config.resistance_calib_max_voltage = 4
odrv0.axis1.motor.config.requested_current_range = 25 #Requires config save and reboot
odrv0.axis1.motor.config.current_control_bandwidth = 100
odrv0.axis1.motor.config.torque_constant = 8.27 / 16
odrv0.axis1.encoder.config.mode = ENCODER_MODE_HALL
odrv0.axis1.encoder.config.cpr = 90
odrv0.axis1.encoder.config.calib_scan_distance = 150
odrv0.config.gpio9_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio10_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio11_mode = GPIO_MODE_DIGITAL
odrv0.axis1.encoder.config.bandwidth = 100
odrv0.axis1.controller.config.pos_gain = 1
odrv0.axis1.controller.config.vel_gain = 0.02 * odrv0.axis1.motor.config.torque_constant * odrv0.axis1.encoder.config.cpr
odrv0.axis1.controller.config.vel_integrator_gain = 0.1 * odrv0.axis1.motor.config.torque_constant * odrv0.axis1.encoder.config.cpr
odrv0.axis1.controller.config.vel_limit = 100
odrv0.axis1.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis1.motor.config.calibration_current = 5
odrv0.save_configuration()
odrv0.axis1.requested_state = AXIS_STATE_MOTOR_CALIBRATION
odrv0.axis1.motor.config.pre_calibrated = True
odrv0.axis1.requested_state = AXIS_STATE_ENCODER_HALL_POLARITY_CALIBRATION
odrv0.axis1.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION
odrv0.axis1.encoder.config.pre_calibrated = True
odrv0.save_configuration()
Test motion
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.input_vel = 2
odrv0.axis0.controller.input_vel = 0
odrv0.axis0.requested_state = AXIS_STATE_IDLE

Опубликовано:

 

22 янв 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 5   
@kurtjurgen
@kurtjurgen 3 года назад
super helpful
@izzlate
@izzlate 3 года назад
Hey, thanks for this video! I have the same motor your using. Had some trouble getting mine working. But after updating the firmware on the Odrive it worked! Question...when you have your vol set to 0 do you get cogging when you move the wheel by hand?
@neverback4221
@neverback4221 2 года назад
Hello. Any chance to contact you? I would be very happy if possible.
@anthonycortes5093
@anthonycortes5093 3 года назад
attributeError: "torque_constant not found ", what should I do to troubleshot his error, any help would be helpful , thanks for the great video
@anthonycortes5093
@anthonycortes5093 3 года назад
Also when I type in "inodrv0.axis0.motor.config." then press the tab key "torque_constant" is not an option for me
Далее
hoverbot - hoverboard motor balancing robot
12:21
Просмотров 6 тыс.
Спецэффекты в Симс 4
00:36
Просмотров 74 тыс.
Сколько метров чернил в ручке?
16:35
hoverboard driver hack
2:20
Просмотров 9 тыс.
Balancing robot 🤖🔋 | hoverboard + ODrive/ODESC
6:16
Hacking a Hoverboard
4:01
Просмотров 57 тыс.
DC motor PID speed control
15:29
Просмотров 224 тыс.
Gearless Magnet Bike
17:57
Просмотров 6 млн