2
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ Resolution /= accuracy. As Transistor says, the noise spec seems close to your observations. Look at the statistics of this variability : if it's random, there may be some improvement possible through averaging. \$\endgroup\$ – Brian Drummond Aug 28 '17 at 11:44
  • \$\begingroup\$ You are right. Actually, AMS itself recommended averaging as well. However, the 3-bit error will make 14-bit resolution claim meaningless, isn't it? What's the point of using a 14bit resolution encoder whose position accuracy is only 11bit? \$\endgroup\$ – roTor-roTor Aug 29 '17 at 2:46
  • \$\begingroup\$ If its resolution and accuracy were both 11 bit, you would have an 0.5LSB resolution error (quantization error) on top of 0.5LSB position uncertainty, doubling the actual error. You can do better than that by increasing the resolution (reducing the quantization step. \$\endgroup\$ – Brian Drummond Aug 29 '17 at 10:25
  • \$\begingroup\$ @BrianDrummond, I agree with you on the quantization error. However, in my case, the error seems to be caused by noise, which definitely overwhelmed quantization errors. In such a case, is higher resolution still helpful for better accuracy? \$\endgroup\$ – roTor-roTor Aug 30 '17 at 1:11
  • \$\begingroup\$ See first comment. \$\endgroup\$ – Brian Drummond Aug 30 '17 at 10:59
6
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ thank you very much for the explanation and I think your point is correct and explains why the last 3 bits varied. \$\endgroup\$ – roTor-roTor Aug 29 '17 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.