Gyro & Accel Logger

High-Fidelity Inertial Telemetry

📱

Sensor Protocol Required

Mobile operating systems require explicit user authorization to access high-frequency inertial hardware.

The Definitive Guide to Inertial Measurement Units (IMUs): Physics, Fusion, and Applications

We live in an era defined by spatial awareness. From the smartphone in your pocket to the autonomous vehicle navigating a busy intersection, machines need to know where they are and how they are moving. The heart of this awareness is the Inertial Measurement Unit (IMU). This comprehensive guide explores the deep physics of MEMS (Micro-Electro-Mechanical Systems), the mathematics of sensor fusion algorithms like the Kalman Filter, and practical methodologies for diagnosing hardware health using the Toolkit Gen Gyroscope & Accelerometer Logger.

Core Concepts: The Physics of Motion

Before interpreting the data on your screen, it is vital to understand the distinction between the two primary sensors housed within your device's IMU.

1. Accelerometer: Measuring Specific Force

"Contrary to popular belief, an accelerometer does not measure speed. It measures proper acceleration—the acceleration relative to a free-fall frame of reference. This is why, when your phone is stationary on a table, the Z-axis reads roughly $9.81 m/s^2$. The sensor is effectively 'feeling' the Earth pushing up against it to stop it from falling. The total magnitude ($a_{total}$) is the vector sum:"

$$a_{total} = \sqrt{a_x^2 + a_y^2 + a_z^2}$$

2. Gyroscope: Measuring Angular Velocity

"The gyroscope measures the rate of rotation around an axis, usually in degrees per second ($deg/s$) or radians per second. It utilizes the Coriolis Effect within a vibrating structure. To determine the device's actual angle (orientation), software must perform a mathematical operation called Integration, summing up these small velocity changes over time. However, integration introduces 'Drift'—small errors that accumulate into large deviations."

Chapter 1: The Silicon Nervous System (MEMS)

The miracle of modern mobile technology is that these sensors, once the size of a refrigerator in Apollo-era spacecraft, now fit on a silicon die smaller than a grain of rice. This is MEMS (Micro-Electro-Mechanical Systems) technology.

1.1 Capacitive Sensing Architecture

Most modern smartphones (iPhone, Samsung Galaxy, Pixel) use Capacitive MEMS Accelerometers. Imagine a microscopic "proof mass" suspended by silicon springs between fixed plates. As the phone accelerates, inertia causes the mass to lag behind, changing the gap between the mass and the plates. This change in distance alters the Capacitance ($C = \epsilon A / d$), which is detected by an Application-Specific Integrated Circuit (ASIC) and converted into voltage, then into the digital signal you see on our graph.

1.2 The Coriolis Vibratory Gyroscope

MEMS gyroscopes are fascinating. They do not have spinning wheels like a toy top. Instead, they use a vibrating mass. When the device rotates, the Coriolis force causes the vibrating mass to move perpendicularly to its vibration direction. This secondary movement is detected capacitively. The "Zero-Rate Level" is a critical metric: what does the sensor read when it is perfectly still? If your graph shows rotation while the phone is on the table, this is Zero-Rate Bias.

DIAGNOSTIC BENCHMARK: THE "JITTER" TEST

Use the "Stability Challenge" above. A healthy, high-quality IMU (like those in flagship devices) should maintain a noise floor (jitter) of less than $0.05 m/s^2$ when stationary. If you see spikes of $>0.20$ without touching the device, the MEMS structure may be damaged, or the internal ASIC is suffering from thermal noise.

Chapter 2: Sensor Fusion and The Kalman Filter

Raw data is rarely enough. Accelerometers are noisy but stable over long periods (gravity always points down). Gyroscopes are precise in the short term but drift over long periods. To solve this, engineers use Sensor Fusion.

2.1 The Complementary Filter

This is the simplest form of fusion. It applies a "High Pass Filter" to the gyroscope (trusting it for quick moves) and a "Low Pass Filter" to the accelerometer (trusting it for the gravity vector). The formula looks like this:

Angle = 0.98 * (Angle + GyroData * dt) + 0.02 * (AccelData)

This simple line of code is what keeps your screen rotation smooth and responsive without jitters.

2.2 The Extended Kalman Filter (EKF)

For VR, AR, and drone flight, the Kalman Filter is the gold standard. It is a recursive algorithm that predicts the system's state, measures the actual state, and then updates its prediction based on a "Kalman Gain" factor. It effectively "learns" the noise characteristics of your specific hardware in real-time. Our visualizer displays the raw, unfiltered data so you can see exactly what the Kalman Filter has to work with.

Chapter 3: Advanced Use Cases and Field Diagnostics

The Gyroscope & Accelerometer Logger transforms your phone into a versatile scientific instrument. Here are advanced ways to utilize this tool:

3.1 Automotive NVH (Noise, Vibration, and Harshness)

Professional mechanics use expensive accelerometers to diagnose engine mounts and suspension issues. You can do the same. Mount your phone rigidly to the dashboard.
Test 1: Idling. High-frequency Z-axis vibration suggests worn engine mounts.
Test 2: Driving. Large, oscillating Y-axis (lateral) movements on a straight road can indicate alignment issues or loose tie rods.

3.2 Structural Health Monitoring

In civil engineering, the natural frequency of a building is a key health indicator. Place your device on the floor of a high-rise. The "Micro-tremors" caused by wind and traffic can be picked up by sensitive MEMS. If the frequency of these vibrations changes over time (e.g., after an earthquake), it indicates structural damage (stiffness degradation).

3.3 Bio-Mechanics and Gait Analysis

Place the phone in a waist belt or back pocket. Walk 20 steps. The Z-axis pattern reveals your "Heel Strike" force. Asymmetry in the Y-axis wave suggests a limp or uneven leg length. This is the foundational technology behind digital pedometers and fall-detection systems for the elderly.

Sensor Signal Physical Meaning Typical Noise Floor Failure Mode
Accel X/Y Lateral Tilt / Acceleration $< 0.02 m/s^2$ Stuck at max value (Stiction)
Accel Z Earth's Gravity + Vertical Force $\approx 0.05 m/s^2$ Offset $> 1.0 m/s^2$
Gyro $\alpha, \beta, \gamma$ Rotational Velocity $< 0.1 deg/s$ Constant drift (Bias instability)

Chapter 4: Privacy, Security, and "Side-Channel Attacks"

Why do browsers require permission for this data? It's not just to save battery. Security researchers have demonstrated that high-frequency accelerometer data can be used to perform Side-Channel Attacks.

By analyzing the minute vibrations of a phone resting on a desk next to a computer keyboard, machine learning algorithms can reconstruct the text being typed on the keyboard with surprising accuracy (up to 80%). Furthermore, "Fingerprinting" allows websites to identify a specific device based on the unique calibration errors of its MEMS sensors—even if cookies are disabled. This is why Toolkit Gen emphasizes a Local-First Architecture. All processing happens in your browser's RAM. We do not store your motion profiles.

Chapter 5: Troubleshooting Common IMU Issues

If the data in our logger looks incorrect, follow these steps:

  1. The Figure-8 Motion: This is the classic compass calibration method. It forces the magnetometer (compass) to see the magnetic field from all angles, helping the sensor fusion algorithm correct gyro drift.
  2. The Flat Surface Test: Place the device on a verified level surface. If Accel X and Accel Y are not zero, your accelerometer has a "Bias Offset." Some Android developer settings allow you to recalibrate this, but often it is hard-coded in the factory.
  3. Magnet Interference: Cases with magnetic clasps or mounting the phone near car speakers can saturate the magnetometer, confusing the orientation calculation. This manifests as the 3D model "spinning" slowly even when stationary.

Frequently Asked Questions (FAQ) - Sensory Physics

Why is the Z-axis $9.8$ while the phone is sitting still?
This is the Gravitational Constant ($1g$). Even though your phone isn't "moving" through space, the internal MEMS sensors are constantly being pulled toward the Earth's center by gravity. This constant force of $9.81 m/s^2$ is what allows your phone to know which way is "Down" and automatically rotate your photos and videos.
Does this work on iPhone and Android?
Yes. However, Apple (iOS 13+) requires a "Secure Context" (HTTPS) and an explicit User Gesture to enable these sensors. This is why you must click the "Enable IMU Access" button on iOS. On Android, most modern browsers will work immediately, but we recommend using Chrome for the highest sampling frequency (up to 60Hz).
What is the difference between "Alpha," "Beta," and "Gamma"?
These are the Euler Angles for rotational velocity. Alpha ($\alpha$) measures rotation around the Z-axis (Compass heading/Yaw). Beta ($\beta$) measures front-to-back rotation (Pitch). Gamma ($\gamma$) measures side-to-side rotation (Roll). These three signals allow the phone to map any complex 3D rotation with 0.01-degree precision.

Claim Your Spatial Data

Stop guessing about your device's precision. Quantify the motion, audit the sensors, and understand the invisible forces acting on your hardware every day. Your journey to hardware mastery starts here.

Begin Telemetry Log

Recommended Logic Tools