All Projects → nerajbobra → embedded_pedometer

nerajbobra / embedded_pedometer

Licence: other
Accelerometer-based pedometer algorithm for embedded applications

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to embedded pedometer

LaunchPadFlightController
TM4C123G based Flight Controller
Stars: ✭ 62 (-12.68%)
Mutual labels:  accelerometer
adxl345
ADXL345 full function driver for general MCU and Linux.
Stars: ✭ 170 (+139.44%)
Mutual labels:  accelerometer
COVID-away
Repo of paper title 'Avoid touching your face: A hand-to-face 3d motion dataset (covid-away) and trained models for smartwatches'
Stars: ✭ 18 (-74.65%)
Mutual labels:  accelerometer
imusensor
Python library for communication between raspberry pi and MPU9250 imu
Stars: ✭ 47 (-33.8%)
Mutual labels:  accelerometer
ios logger
Application for camera and sensor data logging (iOS)
Stars: ✭ 60 (-15.49%)
Mutual labels:  accelerometer
sensormotion
Package for analyzing human motion data (e.g. PA, gait)
Stars: ✭ 73 (+2.82%)
Mutual labels:  accelerometer
dana
DANA: Dimension-Adaptive Neural Architecture (UbiComp'21)( ACM IMWUT)
Stars: ✭ 28 (-60.56%)
Mutual labels:  accelerometer
MPU9250 asukiaaa
A library for arduino to read value of MPU9250.
Stars: ✭ 69 (-2.82%)
Mutual labels:  accelerometer
Excuser
An Android app which trigger a fake call on the device, just by shaking android wear on your wrist.
Stars: ✭ 25 (-64.79%)
Mutual labels:  accelerometer
hoverboard-sideboard-hack-GD
Hoverboard sideboard hack for GD32 boards
Stars: ✭ 68 (-4.23%)
Mutual labels:  accelerometer
mpu6050
MPU6050 Arduino Library
Stars: ✭ 141 (+98.59%)
Mutual labels:  accelerometer
AndrOBD-Plugin
AndrOBD plugin development project
Stars: ✭ 38 (-46.48%)
Mutual labels:  accelerometer
CtrlUI
CtrlUI (Controller User Interface) is a Windows application, game and emulator launcher for your game controller, DirectXInput converts your game controller to a Xbox (XInput) controller, Fps Overlayer is a tool that shows the frames per second and the cpu, gpu and memory information.
Stars: ✭ 39 (-45.07%)
Mutual labels:  accelerometer
MotionCollector
iOS app for collecting data from internal motion sensors (gyroscope, magnetometer, accelerometer) of iPhone and Apple Watch.
Stars: ✭ 55 (-22.54%)
Mutual labels:  accelerometer
MPU-9250-Sensors-Data-Collect
MPU9250 (MPU6500 + AK8963) I2C Driver in Python for Raspbery PI
Stars: ✭ 51 (-28.17%)
Mutual labels:  accelerometer
SparkFun ADXL345 Arduino Library
Arduino Library for the ADXL345
Stars: ✭ 34 (-52.11%)
Mutual labels:  accelerometer
InterfaceInteraction
Interact your app's interface elements with different effects!
Stars: ✭ 57 (-19.72%)
Mutual labels:  accelerometer
Balance-Bot
A two-wheel self-balancing robot based on the ATmega2560 micro-controller.
Stars: ✭ 33 (-53.52%)
Mutual labels:  accelerometer
GRT-iOS-HelloWorld
An example of how to integrate the Gesture Recognition Toolkit into an iPhone app
Stars: ✭ 34 (-52.11%)
Mutual labels:  accelerometer
SparkFun MMA8452Q Arduino Library
SparkFun Triple Axis Accelerometer Breakout - MMA8452Q Arduino Library
Stars: ✭ 16 (-77.46%)
Mutual labels:  accelerometer

embedded_pedometer

Accelerometer-based pedometer algorithm for embedded applications

This code implements a step counting algorithm using X,Y,Z accelerometer data. It is written in C and is completely fixed point, with the intention of running in real time in an embedded system. The core of the algorithm is the autocorrelation function, which can be used to find the periodicity of a noisy signal in the time domain. An overview of the algorithm is as follows:

  1. calculate the magnitude of the X,Y,Z accelerometer data
  2. apply a low pass filter to the magnitude data
  3. remove the mean
  4. apply the autocorrelation
  5. calculate the derivative and find the first zero crossing from positive to negative, which corresponds to the first positive peak in the autocorrelation
  6. using the result from the previous step, hone in on the exact autocorrelation peak index
  7. calculate some basic statistics about the autocorrelation peak to determine if it corresponds to actual walking, or just noise (no walking)
  8. if the autocorrelation peak is valid, calculate the number of steps based on the calculated frequency of autocorrelation

The entry point of the algorithm is the count_steps function in count_steps.c. The data format expected is a pointer to a buffer of int8_t accelerometer data (i.e, -128 to +127) stored in sample order (i.e., [X1,Y1,Z1,X2,Y2,Z2,...Xn,Yn,Zn]). As a reference, a data file is attached with sample accelerometer data.

There are several #define parameters defined in count_steps.c and count_steps.h that should be adjusted based on your data. SAMPLING_RATE is the sampling rate of the accelerometer data. WINDOW_LENGTH is the length of the window of data that is analyzed by the algorithm, which is optimally 4 seconds long. NUM_TUPLES is the number of triplets of accelerometer data, so to get a WINDOW_LENGTH of 4 seconds with a SAMPLING_RATE of 20Hz, NUM_TUPLES should be set to 80. The only other value to adjust is NUM_AUTOCORR_LAGS, which determines the maximum frequency that can be calculated. It should be set such that it corresponds to roughly 0.4Hz.

For the provided data file, there should be approximately 20 steps. The algorithm output is 21 steps.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].