Electronic – Magnet encoder accuracy problem

encoder

I am using a magnet encoder chip AS5147 and I chose to use SPI to read the output position of a gearbox connected to a motor. The position resolution is claimed to be 14-bit when using SPI reading. A button magnet was mounted on the output gear shaft with a plastic holder, and the sensor was mounted on a PCB and the sensor alignment and distance from the magnet was carefully adjusted according to the spec. When the motor was at standstill and I read the position value using SPI command, however, the value was not stable at all. The value variation is about 3bit, which actually made it to be 11bit encoder.

What I want to ask is, if anyone has ever used such magnet encoder before and is it actually so unstable in position reading? Or is it because the alignment or sensor distance from the magnet was not well adjusted?

Best Answer

I know nothing about these chips but a quick look at the AS5147 datasheet bottom of page 8 shows:

enter image description here

Figure 1. AS5147 RMS output noise.

Assuming that 14-bits is 360° then 0.082° is \$ \frac {0.082}{360} = 0.000228 \$ or an error of 0.0228%. Note that this is the RMS noise value. You'll have to figure out how that relates to the max and min values.

Meanwhile you're seeing 3-bits noise on your 14-bit signal. Therefore 11 bits are remaining stable and the 12th bit is unstable. \$ \frac {1}{2^{12}} = 0.000244 \$ or an error of 0.0244%.

Someone will correct the details of my calculations here but it seems to me that you're running close to specification.


Analog Devices AN615 may help.

enter image description here

Figure 2. Histogram for a Grounded Analog Input.

Noise

Figure 1 shows a typical histogram obtained from a sigma-delta ADC when the analog input is grounded. Ideally, for this fixed dc analog input, the output code should be zero. However, due to noise, there will be a spread of codes for a constant analog input. This noise is due to thermal noise within the ADC and quantization noise due to the analog-to-digital conversion process. The code spread is generally Gaussian in nature.The rms noise is calculated using the curve that results from the histogram, the width of the curve determining the rms noise. A Gaussian curve goes from –infinity to +infinity. However, 99.99% of the codes occur within 6.6 \$ \times \$ rms noise.Therefore, the peak noise is 6.6 \$ \times \$ rms noise.