Reducing motion sensitivity

I am using a RuuvuTag Pro 2 in 1 to monitor sea turtle egg clutches. I need to reduce the motion sensitivity so the ocean waves don’t run up the counter. How can this be done?

Hello,

You would need to build a custom firmware for yourself. Changing the sensitivity itself is one line change at ruuvi.firmware.c/src/application_config/application_mode_default.h at 6e1d33f9110c88985ba0e59768b84fb4cf33673d · ruuvi/ruuvi.firmware.c · GitHub, values in range of 0.016 to 1.024 are valid if I recall correctly. Larger is less sensitive and you can adjust at 0.016 increments, the firmware will round the value to the next upper value that matches. The unit is in G, so configuring 1.000 would mean that tag has to be in free fall for the motion to register.

Thanks. It is now time for another season of sea turtle nesting and I never got around to working on this. At this point I am more interested in getting this up and working than I am learning to code. I am looking for someone to hire to do the following. Best case: create an adroid app that would allow remotely changing the motion sensitivity threshold with bluetooth. Worse case: reduce the motions sensitivity and create a firmware update package that I can install easily. Any ideas who could do that? This is a project for a small non-profit organization I volunteer with.

@otso will be able to share good ideas for your use case. We do have a firmware 3.33.0 RC-1 version in Ruuvi GitHub repository where we have less sensitive motion detection, which could possibly be helpful in your case? This can be installed to your RuuviTag using nRF Connect app.

Change details for motion detection can be found here.

  1. Download RuuviTag Firmware 3.33.0 RC-1 to your mobile device.

  2. Install nRF Connect app from App Store (iOS) or Play Store (Android) to your mobile device.

  3. Open nRF Connect app, skip the welcome screens and on Scanner-page tap on Scan button at from top right corner. Grant requested permissions for nRF Connect app.

  4. Tap on Scan again and Bluetooth devices near you will be listed.

  5. Set RuuviTag to firmware update mode by pressing black button on the RuuviTag circuit board until LED turns to consistent red. If you have older RuuviTag version, hold down button B and tap on R button briefly. Sensor LED will turn to consistent red when update mode is activated.

  6. In nRF Connect, locate Bluetooth device with name RuuviBoot and tap on Connect.

  7. Locate DFU button at the top right corner, choose Distribution packet (zip) to be used for updating the firmware.

  8. Choose the downloaded firmware (zip) package from your device.

  9. Firmware update will begin automatically. Please wait until update has finished successfully. nRF Connect app can now be safely closed.

My own approach would be to create the firmware packages with reduced sensitivity and install them with nRF Connect app. That should get you up and running quickly. We added just a few weeks ago automatic builds on GitHub, so you could try to fork RuuviTag code to your account and adjust line ruuvi.firmware.c/src/application_config/application_mode_default.h at f5e159e82d150f76988a41acf39f9d2699debc85 · ruuvi/ruuvi.firmware.c · GitHub to your needs.

I also noticed just now that the default threshold is way too insensitive in development code, current production code has threshold of 0.064.

We have not tested the forked builds yet in practise, but it should be possible to just open a pull request with new value to your fork and GitHub will build the packages for you.

Doing the live configuration over app is more involved, you’d need:

  • UI in the app
  • BLE protocol for changing the value
  • Changing the value once BLE command is received
  • Storing the new value to tag flash in case of reboot
  • Restoring the configured value of flash if a custom value is present.

I’m sure you could find someone at Upwork, Freelancer.com or similar freelancer platform to estimate the time and cost for the work.

1 Like