A simple Arduino-based inertial motion tracker using a 3-axis analog accelerometer (e.g., ADXL335).
The sketch reads raw acceleration, removes sensor bias, integrates acceleration to estimate velocity and position, and streams all telemetry over Serial.
- Reads analog values from the X, Y, and Z axes.
- Converts ADC readings into acceleration (g units).
- Calibrates the sensor by averaging samples while the device remains still.
- Removes sensor bias and subtracts gravity from the Z-axis.
- Integrates acceleration over time to estimate:
- Velocity
- Position
- Streams all telemetry over Serial for logging or visualization.
- Lightweight Arduino implementation
- Automatic bias calibration on startup
- Adjustable sampling interval
- Real-time telemetry output
- Basic inertial navigation using classical kinematics
This is a simplified inertial tracker.
Analog accelerometers accumulate noise and drift quickly when integrated.
Without additional sensors (gyroscope, magnetometer, GPS), long-term position accuracy will degrade.
- Arduino board (Uno, Nano, etc.)
- ADXL335 or compatible analog 3-axis accelerometer
- 3 analog input pins (A0, A1, A2)
dt:<seconds>,ax:<g>,ay:<g>,az:<g>,vx:<m/s>,vy:<m/s>,vz:<m/s>,px:<m>,py:<m>,pz:<m>
MIT License