Something's wrong with getting a new motor to work: gets hot, doesn't reply to commands

Hi, I’m trying to get a 50W 48V BLDC motor to work, and specifically it seems I have encoder issues.

The model I’m dealing with has:

  • 5 pole pairs
  • 2500ppr incremental encoder (A/B/Z)
  • Both the motor and the encoder are IP-65, which is why I really want to get it to work, as opposed to switching to more conventional encoder, which are well tried with ODrive.

The encoder consumes around 85mA at 5V and exposes a DB15 connector with both hall and incremental signals. All signals also feature complementary pins, i.e. I have A+ and A- pins, with A- being the logical negation of A+. Using just A+, B+ and Z+, which seem to be strong and noise-free enough by themselves, I’ve connected it to an ODrive v3.6 56V and I’m driving it with 48V.

With this setup, I’ve tried the encoder.shadow_count and it seems correct - one mechanical revolution by hand increases/decreases the shadow count by 10000.

The symptoms are:

  • at first, I got the motor to pass AXIS_STATE_FULL_CALIBRATION_SEQUENCE without errors, but then AXIS_STATE_ENCODER_INDEX_SEARCH did not do anything. I read that some noisy encoders need small caps to ground on the signal pins, and I’ve added 27nF on the Z. With that, AXIS_STATE_ENCODER_INDEX_SEARCH works every time.
  • however, after successful index search, the motor does not work very well: when I enter CLOSED_LOOP_CONTROL, the rotor does not fight me if I try to turn it by hand, but instead increases speed radically and errors with overspeed. Other times, I’ve been successful in setting input_vel = 1.0, and the motor turns, but much faster than expected. In that case, setting input_vel = 0 did not stop the rotation.
  • in all cases, the ODrive consumes around 16 watts, and a lot of those seem to be dissipated in the motor, as it gets above 60°C, with nothing attached to it

What I tried:

  • I’ve also suspected that the A/B signals could suffer from signal integrity, so I’ve added 1nF caps from their pins to GND, but this did not improve anything
  • I’ve tried rotating the motor at 1 rps exactly (5 electrical rps, driven via an another no-frills blind-driving circuit connected only to the motor phases). The motor turns well in this setup, and both A and B pins read ~2.5 kHz with a DMM (as expected). The Z pin is also seen, though it’s very brief.
  • In the same setup, I’ve tried looking into the signals with a 'scope. They seem fairly good, square signals, both very near to 5 and 0V. Only some jitter is seen, as the square waves aren’t perfectly repetitive, i.e. some intervals are slightly longer than the others.

I’m only testing on Axis #0.

My setup is:

odrv0.axis0.encoder.config:

abs_spi_cs_gpio_pin: 1 (uint16)
bandwidth: 100.0 (float)
calib_range: 0.05000000074505806 (float)
calib_scan_distance: 250.0 (float)
calib_scan_omega: 12.566370964050293 (float)
cpr: 10000 (int32)
direction: 1 (int32)
enable_phase_interpolation: True (bool)
find_idx_on_lockin_only: False (bool)
hall_polarity: 0 (uint8)
hall_polarity_calibrated: True (bool)
ignore_illegal_hall_state: False (bool)
index_offset: 0.0 (float)
mode: 0 (uint16)
phase_offset: 53377 (int32)
phase_offset_float: 0.7857681512832642 (float)
pre_calibrated: True (bool)
sincos_gpio_pin_cos: 4 (uint16)
sincos_gpio_pin_sin: 3 (uint16)
use_index: True (bool)
use_index_offset: False (bool)

odrv0.axis0.motor.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: False (bool)
acim_autoflux_min_Id: 10.0 (float)
acim_gain_min_flux: 10.0 (float)
bEMF_FF_enable: False (bool)
calibration_current: 3.75 (float)
current_control_bandwidth: 100.0 (float)
current_lim: 5.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: 0 (uint8)
phase_inductance: 0.0003528124652802944 (float)
phase_resistance: 0.5823253989219666 (float)
pole_pairs: 5 (int32)
pre_calibrated: True (bool)
requested_current_range: 10.0 (float)
resistance_calib_max_voltage: 12.0 (float)
torque_constant: 0.04318537935614586 (float)
torque_lim: inf (float)

Any ideas why does the motor behave like this? What should I try? What might I be missing?

Please disregard the question - the issue was that one of the motor phases didn’t have good contact onto the ODrive’s motor terminal. The final config that works has 27nF Z-to-GND, and 1nF each on A-to-GND and B-to-GND.

Great to hear you got this to work :slight_smile: