HALL Encoder: M1B state not read by MCU

Issue: unable to calibrate the encoder due to ILLEGAL_HALL_STATE error

Setup: Odrive 3.6 24V with BLDC and Hall sensor. 22nF caps on M0A, M0B, M0Z, M1A , M1B, and M1Z all to GND.

Tests to determine issue:

  1. liveplotter only shows hall_states 0, 1, 4, 5 for axis 1, and when hall_state is 0, pin M1A = 0V, pin M1B = 3.6V, pin M1Z = 0V (measured at J4 header)
  2. Verified both motors work correctly by flipping axis 0 and 1; axis 0 calibrated correctly both times

Analysis: It appears that the hall_state always reads the 2nd bit (M1B) as 0, independently of the voltage level, so I’m guessing that the board has a disconnect between the header and the micro pin. It may be the gpio pin isn’t configured correctly, but I set all the pin modes to GPIO_MODE_DIGITAL, saved, and restarted the board.

Am I missing anything? Where would be a good place to test the voltage with a scope (via, testpoint, pin), between J4 and the micro?

It sounds like R33 might be shorted out
schematic:
M1B_R33_schematic
Back of the board:
M1B_R33_img

If you still want to check at the STM32 here is the pin:

All of these files can be found here, I know it says v3.5 but I have confirmed all of this info is correct for the v3.6 as well.
Let me know how it goes!

2 Likes

I had the axis flipped; it was actually M0B. Anyway, I removed the R10 connected to M0B with a hot air gun, but the pads still had a 1.6 ohm resistance with the resistor removed (all of the other pins had 3.3k ohm), which means that the short is somewhere else along the B trace. I could probably cut the trace between the micro pin and the input header to determine the short location, then solder a jumper between the pins, but that isn’t an appealing option. Any other suggestions?