|
|
|
|
|
by jononor
707 days ago
|
|
There exists ready made BLE beacon hardware with accelerometer, which is excellent for an application like this. Many with NRF52 and LIS2/LIS3, for example. A well documented option is RuuviTag. May others from Moko, Minew, HolyIot etc. CR2032 battery would be great for small size. However one would have to write custom firmware, as the stock firmware just extracts orientation from the accelerometer, or notifies on any movement, which is not useful in this case. Zephyr RTOS has excellent support for the typical accelerometers and NRF52 - though it will be a step learning curve if one has never done any embedded.
Conceptually the firmware is simple. Initialize accelerometer, say to 20 Hz sample rate, using FIFO. Sleep for 1 seconds, wake up, fetch accelerometer data from FIFO. High pass filter the samples, compute FFT to get energy at different frequencies. Stuff the FFT coefficients into a BLE advertisement packet, send N=4 times. Go back to sleep, repeat. |
|
I didn't know that and it's a great start. If I get something like the MOKOSmart M1 Ultra Thin Beacon Tag [1], will I be able to send accelerometer data to let's say a Raspberry Pi, process it further, and send a push notification when needed?
[1] https://www.mokosmart.com/beacon-tag/