Encoder error ERROR_ILLEGAL_HALL_STATE

The capacitors have to be mounted very close to the ODrive, you can’t have it out on a breadboard.

1 Like

Hi,

I tried this out recently with some 47nF and also with 22nF as suggested, but it didn’t seem to fix the issue. I instead ignored the error, but I now get “ERROR_NO_RESPONSE” when I run a full calibration or encoder offset calibration. Not sure if that helps in terms of debugging, but I’d be happy to provide more info if needed.

Just got a couple of Q85 motors working after getting this error. 47nF were needed (at least on M1).

Tried 22nF on both motors, but kept getting the error so replaced the 22nF with 47nF on M1 and that solved the problem.

2 Likes

A nice solution that is less difficult to solder and still keeps the capacitors close to the ODrive board:

1 Like

I like the protoboard solution. Any thoughts on also adding some additional resistors to create low pass filters? Would that improve things even more?

@wtip not necessarily. If the pass band of the filter is too low, then it will cause errors at high speeds, especially if using a high resolution encoder.
The filter should probably have a passband up to about 1MHz to avoid attenuating genuine encoder signals.

1 Like

I ended up using this board.

1 Like

I’m so glad the board is helpful! :slight_smile:

If all the capacitors are doing is smoothing the signal from the hall sensors, then could this not be done more elegantly (more configurably etc.) in code rather than hardware?

An exponentially-weighted average reading would only require one extra double for each encoder input, and other than the exponent (calculated once across all inputs per same) is very cheap to compute. The rate of smoothing could be a configuration option, which makes it easy to turn on/off and vary the level of smoothing to match the device.

If this is a terrible idea, then please say so. Otherwise, if someone can add this feature, I’d be delighted. Otherwise, if I can work out how to get the firmware source code, I’ll have a go myself.

1 Like

wow, that’s fancy; I didn’t want to spend that much and have to wait for it to ship; I had a ton of these proto-boards sitting around, so it was free, fast, same amount of soldering. For that price it should come with the capacitors and headers on the board to just plug in.

I ended up using this PCB: https://oshpark.com/shared_projects/1WRsMdeT. The hall effect signals plug in with a JST PH.

Super small and cheap, but certainly not as polished as what you all can make (I’m not an EE). Due to the small size, it doesn’t interfere with any other header pins on the odrive.