How to interpret RuuviTag sensor values?

Hello everyone

I recently set up a Raspberry Pi Zero W to store my RuuviTag sensor data into a InfluxDB database. I’m using Grafana to visualize that data.

Unfortunately, I’m having troubles interpreting these graphs.

  • What is the unit used for measuring acceleration?
  • Why is the value for the Z acceleration above 1.000.000 while the values for the X and Y acceleration are below 100?
  • How do I know which axis is which on RuuviTag?
  • Why are the values for acceleration not zero if RuuviTag isn’t moved?
  • When is the battery power considered low?

Thank you for your help.

Have a nice day.

Hello,

Depends on your parser, RuuviTag itself sends mG.

Z-acceleration is around 1000, not 1 000 000. This corresponds to one gravity.

Z is top, X and Y depend on the position of PCB inside enclosure.

RuuviTag would be accelerating at 1 G towards center of earth unless it was supported by your table. Accelerometer sees the support as 1G upwards, tag on freewill without rotation would have zero on all axes.

Depends on temperature and firmware you’re running. Most reliable way to detect a low battery is to check the measurement sequence counter. If the counter falls to zero before reaching 2^16 your tag is having resets. Usually 2.0 … 2.4 V.

Hello @otso

Thank you very much for your answer. Your support is greatly appreciated.

Regarding interpretation of Z values: When ruuvi tag is static or occasionally changing orientation, Z will reflect the orientation i.e. flat like on a table or on edge.
Various use cases include Monitor varmit trap, Remote location flood reporting and Sump pump failure alert

If the tag is “on edge” X and Y can be used to understand a rotational position.

Thank you @dgerman! Good to know.

Hello @otso

I have a quick follow up question.

I’m not quite sure how to detect a low battery following your suggestion. Would you mind to explain it in more detail? How does the measurement sequence counter help to detect a low battery and what’s the meaning of 2^16?

Thanks once again.

The measurementSequanceNumber is an ever-increasing counter until it reaches 2^16 and wraps around restarting from zero (2^16=65536, thus instead of getting to 65536 it jumps to 0). The only other time the counter resets to zero is when the tag reboots.

When the battery is getting low, the tag will start spontaneously rebooting on its own more and more frequently, until it will get stuck in an infinite reboot loop when the battery is too dead to support even a single measurement cycle.

Here is an example:

See how at the beginning the measurementSequanceNumber gets nicely all the way to around 65535 and then resets. Then around the middle it starts resetting much earlier than that, getting only to a couple of thousand. Towards the end, the counter barely reaches a couple of hundred. At this point I replaced the battery, but the same trend would continue; the counter will reset sooner and sooner, indicating a spontaneous reboot more and more frequently as the battery gets more and more critical.

Thus if you want to create a “battery is low, please replace it” type of alarm, the best trigger would probably be to check if the counter has reset (=the new value is lower than the previously received value) more than once within one day or something, depending on your setup and preference.

3 Likes

Hello @otso
That’s very valuable information. Thank you for point that out to me.
Have a nice day.