HaldorPhil
- Joined Mar 8, 2019
- 16
Oversampling the analog signal is required if you are looking for accurate frequency/phase information. This is handled for you in the digital versions. SPI is one of the simplest serial interfaces to code for. I never used Arduino hardware, does the processor have a hardware SPI port? The data bandwidth of these accelerometers is low enough that you can just bit-bang the data in using a GPIO if you don't have a hardware SPI port available.Hello,
Thanks for replying, yes I agree that digital interface accelerometer is better and also more cheaper. The reason I still use analog accelerometer is currently my Arduino firmware best for analog data to log 8000data per second to SD card (https://forum.arduino.cc/t/try-this-super-fast-analog-pin-logger/222361)
And the reason why must 8000 data per second is to become a good audio data (8KHz sampling rate).
I haven't try the firmware to digital accelerometer. I also read LIS3DH datasheet it say maximum ODR output data rate is 5.3KHz
Here is an article about a bit-bang implementation of a SPI port on an Arduino.
https://circuitdigest.com/article/i...-spi-communication-in-arduino-via-bit-banging
On the 8 kHz data rate, it is easy enough to upscale the data from 1.6 kHz to 8 kHz:
* Use a timer interrupt at a 8 kHz rate.
* Every 5 timer interrupts read the 1.6 kHz data from the IC
* Use linear interpolation to fill in the 8 kHz values in-between chip reads. Note: This means the data you are sending lags one chip read period.
Last edited:


