ADXL345 interference at 64Hz and its multiples

Hello everyone,

Currently for my project I’m using ADXL345 sensor on an original SparkFun beakout board, connected to Arduino Nano board, powered by a 9V battery, communicating with pc trought Bluetooth module HC-05 at 115200 baud/s.

Setting the sampling frequency on high values (1600/3200, but espetially 1600) I get some very regular disturbances with same amplitude at 64 Hz and its precise multiples (128, 192… until available bandwidth).

In the annexes there is the spectrum of a signal (peaks not at the previously mentioned frequences are supposed to be there), sampling freq 1600Hz, 10s of acquisition

Have you ever experienced something similar? do you have any idea what it could be?

P.S. some more info that could be useful:

  • the communication protocol is SPI. I checked and the default SPI clock from Arduino is 4MHz (16MHz from processor / 4), which greater than the required.
  • 2 Logic level converters to convert 8 I/O from 3.3V to 5V and reverse between the sensor and Arduino
  • To transfer data I adopted the following logic: FIFO buffer gets filled up with 25 values, watermark interrupt triggers and Arduino reads 25 times (so the FIFO gets empty). Arduino then sends 252channels bytes to the pc with the command Serial.write.

do you have any idea what it could be?

Resonance frequency of the board it is mounted on? Just my first thought...

Change the BT serial baud rate and see if that has an effect.

Due to aliasing, an external signal with frequency equal to "sampling frequency +/- N Hz" will yield peaks in the response spectrum at N Hz, and multiples thereof.

Good morning,
sorry to have taken so much time to reply, Christmas holidays and much was going on..

Anyway...

jremington:
Change the BT serial baud rate and see if that has an effect.

Due to aliasing, an external signal with frequency equal to "sampling frequency +/- N Hz" will yield peaks in the response spectrum at N Hz, and multiples thereof.

I don't see any relation between transmission baud rate and sampling frequency (apart that baud rate must be high enough to transmit all the sampled data).
In any case:

  • aliasing phenomena refers to external signals with frequency more than double the sampling one, which energy falls back (creating a foulty spectrum) to lower frequencies. The problem is evident only when I'm sampling at very high frequency, which is the counter-logical if the problem was aliasing. In addition, I've tested the equipment in various locations and the result is identical, so it couldn't come from outside.

  • I've tried changing the baud rate to see wether the noise frequency changes. It doesn't. The only difference is that the peaks start from 128 rather than 64 (but I don't think it's relevant)

pylon:
Resonance frequency of the board it is mounted on? Just my first thought...

Nope, sorry, the resonance freq is way higher.

UPDATES:
I've tried substituting the bluetooth connection with a usb cabled one. No changes.
I've tried substituting the Arduino board with a different one (same model). No changes.
I've tried changing baud rate from 112500 to 74880. No changes (the noise only starts at 128 instead of 64).

Thanks in advance for your time!

  • aliasing phenomena refers to external signals with frequency more than double the sampling one,

Other way around. The sampling frequency must be at least twice the highest frequency in the signal, or you will see aliasing.

Did you check your algorithm that calculated that chart? Rounding problem?

jremington:
Other way around. The sampling frequency must be at least twice the highest frequency in the signal, or you will see aliasing.

completely right, sorry, I meant that way

pylon:
Did you check your algorithm that calculated that chart? Rounding problem?

yeah, the algorithm is quite well tested, in fact at lower sampling frequencies (same algorithm tough) it works well.

Do you have only one ADXL345?
Have you another SPI acceleromenter capable to sample at 1600Hz?

I only have that accelerometer model. However, I tried two different sensors of the same model:

  • cheap one, random brand got for 3$ on Amazon
  • quality one, original from Saprkfun, got for 25$

Unluckily, the same problem is there with both sensors.

Are your connections soldered or are you using a bread board?

Have you tried a different physical location?

I tried to change location many times.

All my components are attached to pin headers which are soldered to a tailor made PCB (industrial-made).