Accelerometer data frequency analysis?

Hi all!

Has anyone tested analysing frequency spectrum of the accelerometer data with FFT (Fast Fourier Transform) or such?

I tried to explore the forums and the net for some examples or projects but did not find any. If you’ve seen projects that have done accelerometer data analysis, please link here?

Nordic SDK has example of FFT transform of data. In theory you could run accelerometer at high frequency into accelerometer FIFO, read buffer into nRF52 and do FFT on data. Then you could send frequency bins in advertisement as usual.

Thanks for the info!

What would be the easiest way to stream accelerometer data over bluetooth, so I could try do processing on external computer first?

I tried to see the accelerometer data with the weather app, but I did not see any. Do you know of examples / downloadable apps that show accelerometer data on Android phone?

If you need to do analysis on raw data, your best bet might be to implement a GATT service, such as Nordic UART Service and stream data over BLE connection. Advertisements are lost every now and then which would lead to missing samples, which would skew your frequency-domain data.

Great, thanks!

I’ll proceed along these guidelines :slight_smile:

Question regarding GATT. What is the current recommendation to activate and use Ruuvi as GATT-device? How to enable it in its most reliable form?

Did you check this already?

The current GitHub repository at master has most usable code for the application, although there is a bug in advertisements as of 2.2.0.

Essentially you’re going to need some custom software on tag and receiver.

On tag:

  • Code logic to receive data from Nordic UART Service
  • After a “stream” command has been received, start sending acceleration data over NUS

On receiver (Android, raspberry pi etc)

  • Scan for BLE devices which have NUS or scan for RuuviTags
  • Once tag is found, establish BLE connection
  • Register into NUS TX characteristic notifications
  • Send “stream” command ( you need to define what this is).
  • receive data

Hello,
glad I found about your product today, in 3rd page of google search after masses of alibaba !

do you have an estimate of a range an off the shelf class 1 bluetooth receiver can pickup from this tag ?

basically I am looking to stream accelerometer data at a very high frequency, maybe partially submerged in water, ideally looking for 100 - 150 meters

regards,
-anirban

Hello,

RuuviTag can reach 100 - 150 meters of line-of-sight range, but submerging would probably prevent the tags from being heard. The tags are IP67-rated, so they cannot be submerged for a long time, either.

thanks, so range is good and just have to find out how much water it can take

Hi there!

Is there a binary firmware that has functional GATT profile for Ruuvi so I could try it out in a flash?

Otso mentioned about some bugs in 2.2.0 and also some custom stuff that I would need to add to the tag. Is it something that I can do after flashing new firmware or would it need to be code first and then update the firmware to Ruuvi?

I think 2.2.x has DFU and discovery services available, as well as Nordic UART Service for sending custom data over GATT. However the GATT does not do anything yet, and there’s no easy-to-use template for writing data over it.

The bug is that some tags which have run Espruino or Eddystone will not boot properly. You can work on top of current master if you wish, but expect a lot of rough edges.