MA600 encoder support in moteus

It’s time to announce support for yet another encoder type in moteus, this time the MA600 precision tunnel magnetoresistance (TMR) sensor. Compared to hall effect magnet angular sensors the MA600 has lower noise and less non-linearity. It has a SPI interface and operates from 3.3V. When used with moteus, it can be connected to AUX2 on moteus-c1 and moteus-n1, and to AUX1/ENC on moteus-c1, moteus-n1, and moteus-r4. Support is available in firmware version 2024-10-29 and newer.

On axis performance

To show what it is capable of, I mounted a small breakout board above an on-axis magnet attached to a mj5208.

The biggest advantage of the MA600 vs the AS5047P that is integrated into moteus or other similar hall effect sensors like the AS5600, MA702, or MA732 is the lower noise and improved non-linearity. To show the lower noise, I captured a power spectral diagram showing those 4 encoders mounted in similar configurations, the plot is below.

For the frequency region of interest, roughly 1Hz through 400Hz, the MA600 is significantly better, exceeding the noise performance by roughly a factor of 10x. The higher frequencies are not typically relevant, as usually in moteus applications, the encoder PLL filter filters them out.

Granted, these are from just one sample sensor and one mounting configuration so results across many devices may vary. These values do correspond well to what is reported in the datasheets though, so it seems reasonable to expect they are somewhat representative.

Off axis performance

In an off-axis configuration, the MA600 has a similar improved performance compared to a MA732. Here I mounted the encoder off-axis with a diametrically magnetized ring magnet of 32mm diameter, used the measure_ma732_bct.py script for both MA732 and MA600 to compensate for the off-axis configuration, then captured a power spectral diagram in the same manner as above. Notably however, in the off axis configuration, the observed noise performance is significantly influenced by the orientation of the local magnetic field. So for each of the MA600 and MA732, I have recorded performance curves from a selected set of positions to try and capture the range of performance that would be observed.

Both devices have moderately worse noise performance in the off-axis configuration, and the MA600 appears to have a wider range of performance across angular positions. However, the MA600 is still roughly 10x better than the MA732 across the frequency regions of interest.

Control and audible noise improvements

Another benefit of the improved noise performance of the MA600 (or any encoder with low noise, like the AksIM-2), is that it can increase the allowable kp and kd gains that moteus can use while remaining stable. In many cases, especially for kp, the noise of the encoder is the limiting factor when selecting gains. This isn’t always true though, as in some cases the mechanical properties of the system limit the gains and no amount of encoder improvement will help.

To demonstrate the range of improvements you can observe, I set up an on-axis mj5208 configuration and an off-axis GL80 configuration and tuned the gains as high as I could go in both cases.

MA732 MA600
Maximum kp / on-axis mj5208 10 70
Maximum kd / on-axis mj5208 0.2 0.2
Maximum kp / off-axis GL80 160 550
Maximum kd / off-axis GL80 0.4 1.0

For the mj5208 configuration, I believe the kd term was limited by the mechanics of the system, and I think that was also a factor in the GL80 off axis. However, the kp value that could be achieved did increase by between 3x and 7x, which is a fair amount more margin.

Further, the MA600 results in much less audible noise for the same encoder bandwidth and control gains.

Breakout board

You can experiment yourself using this breakout board in the mjbots store, which includes a cable to connect to aux2 on the moteus-c1 and moteus-n1:

That’s all for now!