Shake Detector

Detect strong shakes from your phone’s accelerometer. Adjust sensitivity, log shake intensity, and verify motion triggers for games or QA testing in seconds.

Idle
Sensitivity Shake sensitivity
Medium (1.2 g)
More sensitiveLess sensitive

Tip: Start around 1.2 g. Increase the threshold if you see false positives.

Detector Shake detector
Waiting
Device
0Shakes detected
Live data Live sensor data
Current force0.00 g
Peak force0.00 g
Last shakeN/A

Force is calculated from acceleration magnitude relative to gravity (g).

Guide How to test shaking
  1. Disable battery saver to avoid throttled sensor polling.
  2. Remove bulky cases that dampen motion before testing.
  3. Shake with short, snappy movements for consistent acceleration peaks.
  4. Test multiple orientations (portrait/landscape) to cover all gameplay scenarios.

Hold the device firmly so you log the motion you intend to test.

About Shake Detector

Shake Detector listens to DeviceMotion events, converts acceleration to g-force, and counts high-intensity spikes. Perfect for QA teams validating shake-to-refresh gestures or mobile game mechanics.

  1. Tap Start detecting and allow the motion/accelerometer permission when prompted.
  2. Choose a sensitivity level: lower values catch soft shakes, higher values require stronger motion.
  3. Shake the device; force readings, peaks, and timestamps update in real time.
  4. Use Reset to clear the log before repeating a test run.

Frequently Asked Questions

A shake detector reads the device's accelerometer and looks for sudden, multi-axis acceleration spikes that exceed a threshold within a short time window. The underlying quantity is linear acceleration in meters per second squared (m/s²), reported by the browser's DeviceMotionEvent for each of the X, Y, and Z axes. A shake is recognized when the magnitude √(x² + y² + z²) − g rises above a configurable threshold (typically 12–25 m/s² peak) and the direction reverses several times in rapid succession. Phones use this for undo gestures, Easter eggs, panic alerts, and fitness apps. Hardware-wise the same MEMS chip drives auto-rotate, step counting, free-fall detection, and tap-to-wake.

Accelerometer faults frequently follow drops, water damage, or aging solder joints on tightly packed mainboards. A failed shake detector means lost undo gestures, broken fitness tracking, and degraded gaming controls. More importantly, the same sensor underlies fall-detection and crash-detection features on modern phones and smartwatches — when those silently break, an emergency call may never be placed. Running this tester confirms that all three axes respond, that magnitudes scale appropriately when you flick the phone, and that the response is symmetric between positive and negative directions. It also lets developers tune their own shake-detection thresholds against a known reference before shipping an app.

When the phone sits still, acceleration magnitude should be near 9.81 m/s² (one g of gravity). DeviceMotionEvent.acceleration removes gravity and should hover near 0 ±0.3 m/s² at rest, while accelerationIncludingGravity stays around 9.81. A gentle hand wiggle produces 5–10 m/s² peaks; a deliberate shake produces 15–30 m/s²; a vigorous shake can exceed 40 m/s². Free fall registers as 0 m/s² total magnitude (with gravity included), and a hard impact can briefly spike to 50–100 m/s² before the chip clips at its full-scale range (typically ±16 g = ±156 m/s² for consumer parts, ±32 g for sport/automotive grade).

Two tuning parameters dominate behavior: threshold and time window. A threshold too low fires on every footstep or car bump; too high requires an unnatural shake. Most apps use 15–18 m/s² with a 100–250 ms refractory window to suppress repeats. False positives during walking come from the natural arm swing, which produces 8–15 m/s² peaks twice per stride. False negatives often happen because users shake in a single direction without a reversal — robust detection requires sign changes on at least one axis. A second cause is sensor saturation: if you exceed the chip's ±16 g range, the value clips and looks like a constant rather than an impulse.

All four motions use the same accelerometer, but their signatures differ in time and frequency. A tap is a single 1–3 ms spike of 20–50 m/s² with high-frequency content above 100 Hz. A knock is a slower 5–10 ms impulse with strong low-frequency content. A step is a roughly sinusoidal 1–2 Hz pattern with 8–15 m/s² peaks repeated 1–2 times per second. A shake is a multi-axis 3–8 Hz oscillation with peaks above 15 m/s² and at least two sign reversals within 0.5–1 second. Filtering with a high-pass filter (to remove gravity) and a band-pass filter at 3–8 Hz is the standard way to isolate shakes from walking noise.

Yes. Combining the accelerometer with the gyroscope eliminates many false positives. A pure shake involves significant linear acceleration but relatively little angular rotation, whereas dropping the phone or walking with it produces both. By computing the ratio of acceleration magnitude to angular velocity, you can distinguish a deliberate shake (high accel, low rotation) from a swung-arm gesture (high accel, high rotation). Adding a low-pass filter at 0.5 Hz on each axis isolates gravity, and subtracting that from the raw signal gives clean linear acceleration. The W3C DeviceMotionEvent already exposes both gravity-included and gravity-removed acceleration on iOS Safari and most Chromium browsers, simplifying the math considerably.

The DeviceMotionEvent API delivers accelerometer data at 60 Hz on most devices, with acceleration (gravity removed), accelerationIncludingGravity (raw), and rotationRate. Since iOS 13, calling DeviceMotionEvent.requestPermission() from a user-initiated event is mandatory — otherwise Safari silently emits nothing. On Android Chromium browsers, motion events fire automatically over HTTPS, though Site Settings must permit Motion sensors. The newer Generic Sensor API exposes Accelerometer and LinearAccelerationSensor classes with higher precision and configurable frequency, but coverage on Safari iOS is still incomplete as of 2026. This tool falls back gracefully and warns users when the device lacks support.

Consumer MEMS accelerometers (Bosch BMA456, ST LIS2DH, InvenSense ICM-42688) are characterized by full-scale range (±2 to ±16 g typical), sensitivity (LSB/g), noise density in μg/√Hz (lower is better; 90–150 μg/√Hz is consumer-grade, 25 μg/√Hz is high-precision), bandwidth (DC to ~500 Hz), and zero-g offset stability over temperature. ISO 16063 defines calibration procedures and IEEE 1293 specifies test methods for linear accelerometers. The IMU-grade combined chips (IEEE 1554 framework) also report cross-axis sensitivity, which should be <2% for clean shake detection. For fall detection, ANSI/AAMI HE75 and IEC 60601-2-27 outline performance criteria — your phone's chip easily exceeds these.
Shake Detector — Detect strong shakes from your phone’s accelerometer. Adjust sensitivity, log shake intensity, and verify motion trigger
Shake Detector