fide
Meraklı ve "nasıl" sorusunu seven biri
- Katılım
- 8 Eylül 2021
- Mesajlar
- 2,197
Tezim için Hoverboard BLDC Motor ve Odrive 3.6 sürücü kart ile bir araç yapmaya çlışıyorum. Daha önce Hall effect sensör ile çalıştırmıştım ama şimdi incremental encoder ile güncellemeye çalıştırmak istiyorum.
2~3 gündür uğraşıyorum ama ilerleyemedim.
In [124]: dump_errors(dev0)
system: no error
axis0
axis: Error(s):
AxisError.MOTOR_FAILED
motor: Error(s):
MotorError.PHASE_RESISTANCE_OUT_OF_RANGE
DRV fault: none
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
DRV fault: none
sensorless_estimator: no error
encoder: no error
controller: no error
Aldığım hata yukarıda.
Setup ise aşağıda.
dev0.axis0.motor.config.pole_pairs = 15
dev0.axis1.motor.config.pole_pairs = 15
Because the motors have a high resistance, you need to increase the calibration voltage.
dev0.axis0.motor.config.resistance_calib_max_voltage = 4
dev0.axis1.motor.config.resistance_calib_max_voltage = 4
Lower the current range to get a better reading.
dev0.axis0.motor.config.requested_current_range = 25
dev0.axis1.motor.config.requested_current_range = 25
Lower the bandwidth to get better control.
dev0.axis0.motor.config.current_control_bandwidth = 100
dev0.axis1.motor.config.current_control_bandwidth = 100
Enter the estimated torque constant.
dev0.axis0.motor.config.torque_constant = 8.27 / 16
dev0.axis1.motor.config.torque_constant = 8.27 / 16
The hoverboard motors use hall effect sensors.
dev0.axis0.encoder.config.mode = ENCODER_MODE_HALL
dev0.axis1.encoder.config.mode = ENCODER_MODE_HALL
The hall effect sensors in combination with the magnets produce 90 counts per revolution.
dev0.axis0.encoder.config.cpr = 90
dev0.axis1.encoder.config.cpr = 90
To get better alignment, use 150 pulses for the calibration.
dev0.axis0.encoder.config.calib_scan_distance = 150
dev0.axis1.encoder.config.calib_scan_distance = 150
dev0.axis0.encoder.config.bandwidth = 100
dev0.axis1.encoder.config.bandwidth = 100
Set the controller gains.
dev0.axis0.controller.config.pos_gain = 1
dev0.axis1.controller.config.pos_gain = 1
dev0.axis0.controller.config.vel_gain = 0.02 * dev0.axis0.motor.config.torque_constant * dev0.axis0.encoder.config.cpr
dev0.axis1.controller.config.vel_gain = 0.02 * dev0.axis1.motor.config.torque_constant * dev0.axis1.encoder.config.cpr
dev0.axis0.controller.config.vel_integrator_gain = 0.1 * dev0.axis0.motor.config.torque_constant * dev0.axis0.encoder.config.cpr
dev0.axis1.controller.config.vel_integrator_gain = 0.1 * dev0.axis1.motor.config.torque_constant * dev0.axis1.encoder.config.cpr
Set the velocity limit.
dev0.axis0.controller.config.vel_limit = 10
dev0.axis1.controller.config.vel_limit = 10
Set the control mode to velocity.
dev0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
dev0.axis1.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
If you are using the latest firmware version.
dev0.config.enable_brake_resistor = True
After changing settings, use save and reboot.
dev0.save_configuration()
dev0.reboot()
2~3 gündür uğraşıyorum ama ilerleyemedim.
In [124]: dump_errors(dev0)
system: no error
axis0
axis: Error(s):
AxisError.MOTOR_FAILED
motor: Error(s):
MotorError.PHASE_RESISTANCE_OUT_OF_RANGE
DRV fault: none
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
DRV fault: none
sensorless_estimator: no error
encoder: no error
controller: no error
Aldığım hata yukarıda.
Setup ise aşağıda.
dev0.axis0.motor.config.pole_pairs = 15
dev0.axis1.motor.config.pole_pairs = 15
Because the motors have a high resistance, you need to increase the calibration voltage.
dev0.axis0.motor.config.resistance_calib_max_voltage = 4
dev0.axis1.motor.config.resistance_calib_max_voltage = 4
Lower the current range to get a better reading.
dev0.axis0.motor.config.requested_current_range = 25
dev0.axis1.motor.config.requested_current_range = 25
Lower the bandwidth to get better control.
dev0.axis0.motor.config.current_control_bandwidth = 100
dev0.axis1.motor.config.current_control_bandwidth = 100
Enter the estimated torque constant.
dev0.axis0.motor.config.torque_constant = 8.27 / 16
dev0.axis1.motor.config.torque_constant = 8.27 / 16
The hoverboard motors use hall effect sensors.
dev0.axis0.encoder.config.mode = ENCODER_MODE_HALL
dev0.axis1.encoder.config.mode = ENCODER_MODE_HALL
The hall effect sensors in combination with the magnets produce 90 counts per revolution.
dev0.axis0.encoder.config.cpr = 90
dev0.axis1.encoder.config.cpr = 90
To get better alignment, use 150 pulses for the calibration.
dev0.axis0.encoder.config.calib_scan_distance = 150
dev0.axis1.encoder.config.calib_scan_distance = 150
dev0.axis0.encoder.config.bandwidth = 100
dev0.axis1.encoder.config.bandwidth = 100
Set the controller gains.
dev0.axis0.controller.config.pos_gain = 1
dev0.axis1.controller.config.pos_gain = 1
dev0.axis0.controller.config.vel_gain = 0.02 * dev0.axis0.motor.config.torque_constant * dev0.axis0.encoder.config.cpr
dev0.axis1.controller.config.vel_gain = 0.02 * dev0.axis1.motor.config.torque_constant * dev0.axis1.encoder.config.cpr
dev0.axis0.controller.config.vel_integrator_gain = 0.1 * dev0.axis0.motor.config.torque_constant * dev0.axis0.encoder.config.cpr
dev0.axis1.controller.config.vel_integrator_gain = 0.1 * dev0.axis1.motor.config.torque_constant * dev0.axis1.encoder.config.cpr
Set the velocity limit.
dev0.axis0.controller.config.vel_limit = 10
dev0.axis1.controller.config.vel_limit = 10
Set the control mode to velocity.
dev0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
dev0.axis1.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
If you are using the latest firmware version.
dev0.config.enable_brake_resistor = True
After changing settings, use save and reboot.
dev0.save_configuration()
dev0.reboot()