Close

Understanding Motion Data

A project log for Tracking without GPS

A different approach to tracking animals using Raspberry Pi 3, Texas Instruments Sensor Tag cc2650

brenda-armourBrenda Armour 10/16/2016 at 12:290 Comments

I am using Node Red and IBM BlueMix to send the sensor tag data to the cloud. I am using the accelerometer and magnetometer on the sensor tag to determine next position of a moving object. The Raspberry Pi 3 with built in Blue Tooth and WiFi is the gateway to the cloud. I have installed iot-sensor-tag to connect the Raspberry Pi 3 to Bluemix. More info can be found here.

Lets look at the raw data from the sensor tag. I am shaking the sensor tag in this demo.

I started experimenting with sensor data in 2014. The first board I used was the MEMS sensors evaluation board from Element 14. The board had a low-power 3D Magnetometer and a 3-Axis Digital Accelerometer. The video shows the board on a Raspberry Pi B. The kit also allows you with a website to move the board and visualize the accelerometer moving a car and a compass using the data from the magnetometer.

So the evaluation board was a great starting point. IBM Bluemix cloud/ Node Red and the Sensor Tag provided a way to mathematically calculate distance, bearing and velocity using the accelerometer and magnetometer. The sensor tag uses a coin cell battery that can last up to a year. All 10 sensors are enclosed in a small case. It is Bluetooth enabled and you can also use Zigbee protocol to increase distance. At this point I will be using Bluetooth.

Node Red already comes installed on the Raspberry Pi. I am using the cloud version because it was easier to program. I am also using Freeboard as a dashboard and Dweet.io to collect the data. I added some nodes to accomplish calculations for the algorithm. Smooth node info can be found here.

So can you calculate distance using an accelerometer ? This is essential to calculate position of a moving object. I am going to be using a pedometer design based on the 3 axis of the accelerometer data. Here is my node red design ( work in progress ) . The goal is to recognize and count steps. This will allow me to measure distance and speed. It appears I have two different flows but I am using Global Variables in my equations. I highly recommend this article on writing functions in Node Red.

A simplified view of the model :

At every 10 samples the maximum and minimum of the accerometer axis is taken. The dynamic threshold is calculated with (Max + Min)/2 . A placeholder holds the first sample and then compares it to the next sample. A step has been taken if the new sample < previous sample. . More to come !

Discussions