Hello, I first got acquainted with the BLDC motor and the ODESC V4.2 driver.
I would like to control this driver using a PWM signal from an STM32 microcontroller
I encountered a problem, I can’t configure the “ODESC V4.2” driver so that the motor would work stably without a rotation angle sensor and without Hall sensors (sensorless mode)
I achieved settings when the motor starts with the command
dev0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
However, after some time of rotation, it stops and starts to rotate in the opposite direction, then this action is repeated cyclically
Input data:
- ODESC V4.2 driver (ODrive v3.6-56V) firmware 0.5.6 (I reprogrammed it because the firmware broke during the update)
- GM5208-12 motor (it comes with an AS5048A sensor, but I was not going to use it, because the dimensions of the device are important and it is more convenient to install this motor without sensor, and in general it is not needed there)
- ODrive control utility v0.6.9.post0
I am attaching the engine logs
In [3]: dev0.axis0.motor
Out[3]:
DC_calib_phA: 2.1464426517486572 (float)
DC_calib_phB: -1.7275053262710571 (float)
DC_calib_phC: -0.4188348054885864 (float)
I_bus: 0.0 (float)
config:
I_bus_hard_max: inf (float)
I_bus_hard_min: -inf (float)
I_leak_max: 0.10000000149011612 (float)
R_wL_FF_enable: False (bool)
acim_autoflux_attack_gain: 10.0 (float)
acim_autoflux_decay_gain: 1.0 (float)
acim_autoflux_enable: True (bool)
acim_autoflux_min_Id: 0.5 (float)
acim_gain_min_flux: 3.0 (float)
bEMF_FF_enable: False (bool)
calibration_current: 0.5 (float)
current_control_bandwidth: 15.0 (float)
current_lim: 10.0 (float)
current_lim_margin: 8.0 (float)
dc_calib_tau: 0.20000000298023224 (float)
inverter_temp_limit_lower: 100.0 (float)
inverter_temp_limit_upper: 120.0 (float)
motor_type: 3 (uint8)
phase_inductance: 0.004000000189989805 (float)
phase_resistance: 2.6500000953674316 (float)
pole_pairs: 7 (int32)
pre_calibrated: True (bool)
requested_current_range: 30.0 (float)
resistance_calib_max_voltage: 2.0 (float)
torque_constant: 0.10000000149011612 (float)
torque_lim: 10.0 (float)
current_control:
I_measured_report_filter_k: 1.0 (float)
Ialpha_measured: 0.5806068181991577 (float)
Ibeta_measured: -1.3179824352264404 (float)
Id_measured: 1.3999735116958618 (float)
Id_setpoint: 6.544421195983887 (float)
Iq_measured: 0.3379020392894745 (float)
Iq_setpoint: 6.546537399291992 (float)
Vd_setpoint: 0.0 (float)
Vq_setpoint: 0.0 (float)
final_v_alpha: 9.356669425964355 (float)
final_v_beta: -6.019383430480957 (float)
i_gain: 39.75 (float)
p_gain: 0.06000000238418579 (float)
phase: -2.98543643951416 (float)
phase_vel: 14.713949203491211 (float)
power: 20.11117935180664 (float)
v_current_control_integral_d: 7.529987812042236 (float)
v_current_control_integral_q: 7.956937313079834 (float)
current_meas_phA: -2.1472508907318115 (float)
current_meas_phB: 1.7275643348693848 (float)
current_meas_phC: 0.4197532832622528 (float)
effective_current_lim: 10.0 (float)
error: 0 (uint64)
fet_thermistor:
config: ...
temperature: 34.00545883178711 (float)
is_armed: False (bool)
is_calibrated: True (bool)
last_error_time: 0.0 (float)
max_allowed_current: 30.375 (float)
max_dc_calib: 3.0375001430511475 (float)
motor_thermistor:
config: ...
temperature: 0.0 (float)
n_evt_current_measurement: 951532 (uint32)
n_evt_pwm_update: 951536 (uint32)
phase_current_rev_gain: 0.012500000186264515 (float)