Troubleshooting: bldc motor with hall sensor - SOLVED


#1

So, I have had my motor running in sensorless mode for a while now, but recently the wires I needed to connect my hall-sensors arrived. So I have tried configuring them, but without any success.

What I have:

  • I am getting encoder error 0x10, which means i have an illegal state.
  • when I test the hall sensors manually, they appear to nicely move through the quadrature like I would expect, never producing 000 or 111, always at least one sensor high and one sensor low.
  • when I manually supply the sensors with power and ground, the pins that I want to plug into the Odrive read ABC = 110 (1 = 5V, 0=0V). However, when I plug it in and measure the pins I get everything at 4V so ABC=111.
  • The 5V, 3V, and Ground are still functioning normally.

Have I blown up the chip? Or is there some setting on my Odrive set wrong?

error = 0x0010 (int)
is_ready = False (bool)
index_found = False (bool)
shadow_count = 0 (int)
count_in_cpr = 0 (int)
interpolation = 0.0 (float)
phase = 0.0 (float)
pos_estimate = 0.0 (float)
pos_cpr = 0.0 (float)
hall_state = 7 (int)
vel_estimate = 0.0 (float)
config:
mode = 1 (int)
use_index = False (bool)
pre_calibrated = False (bool)
idx_search_speed = 10.0 (float)
cpr = 18 (int)
offset = 0 (int)
offset_float = 0.0 (float)
bandwidth = 1000.0 (float)
calib_range = 0.019999999552965164 (float)

Pinouts on the sensor, that I used in a previous setup:

Testing the states of the hall encoders, with 5V and Ground from the Odrive:

Plugging it into the Odrive, and getting straight 4V on all three sensors:


#2

So I measured the resistance between the ABC/Z pins on my Odrive and they are around 6.6kOhm. That seems to indicate a short right? The resistance between two random GPIO pins on the Odrive is 288kOhm.


#3

Check out some of the other recent support tickets.

Seems like the solution is to put a 22nF cap between each Hall input pin and GND.

Reference: oDrive, 8 Inch Hoverboard motor, Hall sensors calibration


#4

Thanks for pointing them out. I have seen them, and I don’t think capacitors will solve my issue. Capacitors would help filter in a noisy situation, but at the moment my issues is when the motor is static.

The problem I have is that the ABC/Z ports on the Odrive should be low, so that the active hall sensors can pull them high.

I am trying to figure out if the ports are working as intended, and i need to change my configuration somehow. Or if the ports are broken, and I need to get the unit replaced.

Basicly the Odrive is forcing ABC/Z to high, which is an illegal state.


#5

I would try 22nF capacitors anyway, it is easy and believe me i spent lot of time figuring out why it is not working and those caps saved me:) Without caps it is completely strange behaviour it does not matter if your motors are spining or not, just completely strange:)


#6

We have pull-up resistors to 3.3V on the encoder inputs, because many encoders (and hall signals too) are open drain. It seems you have push-pull sensors since you can see the output when disconnected.

Usually push-pull encoders/halls will drive over the 3.3k load just fine. However if you but if your motor’s sensors have really weak output current (<2mA) I guess they could have issues. You can try to de-solder the pull-up resistors and see if that helps.

They sit on the back of the board right next to the encoder input. Check this part of the schematic for the designators:


#7

Thanks, that seems to make sense. I just measured 0.42 mA over an activated sensor. Will investigate further, and probably remove the resistors.


#8

That worked perfectly. I am now getting the results I was expecting. Thanks for helping me out with that. Problem solved!

Now I will look into adding the capacitors.

Before removing the resistors on M0:

After removing the resistors on M0: