Electronic – Spikes in raw acceleration data from AC motor

accelerometerisolationmicrocontrollermotorsignal processing

I have an MCU with an accelerometer, tightly mounted onto an AC motor inside a production hall.

Once an hour, it collects 1 sec. (Sample rate is 5000) of acceleration data for the motor and saves it.

When I try to display this data, I get these weird spikes:

Raw data from Accelerometer

Can somebody tell me, what these spikes/artifacts could be?

I'm sure my import/chart setup is correct, so I'm pretty sure it's an issue with my components.

Extra info:
The components are located inside a plastic box that's mounted with a metal backplate. Everything should be electrically isolated from the AC motor.
When testing in office environment (On a test motor), these spikes did not occur.

EDIT:
I come from software – I'm pretty new to hardware and electronics, so bear with me, thanks! 🙂

Best Answer

The spikes seem to have a few common heights that are roughly related by factors of 2, which strongly suggests that they are noise-induced single-bit errors in the binary data.

One good way to address this is to take the standard deviation of all the data, and then simply throw away any samples that are more than, say, 2σ from the mean.

Another technique is to use a median-value filter, which looks at a sliding window of, say, 3 or 5 samples, and replaces the middle sample with the median value of the samples in the window. I've used this technique to remove "salt and pepper noise" (same problem) in video data.


Simply post-processing the data as described above might be adequate for your purposes of monitoring equipment health, etc. But if you want to find and fix the root cause of the bit errors, you'll need to focus on the digital communications paths in the system:

  • between the accelerometer and the MCU
  • between the MCU and the system where you're analyzing the data

Switching the plastic box to a metal one might be a good first step, especially for the upper bullet item. Shielded cable (if you're not already using it) would help with the second item.

Related Topic