In this post
Hold a pen and tip it. Nothing on the page changes, but everything about how the next stroke lands does. Tilt is the pen's posture, and an IMU can read it with surprising precision, if it handles one tricky problem.
Gravity as a built-in reference
An accelerometer measures acceleration on three axes, and gravity is a constant downward acceleration of about 9.8 m/s². When the pen is still, the only thing it feels is that downward pull. If the pen is perfectly upright, gravity sits entirely on one axis; as you tilt the pen, the pull redistributes across the axes. A little trigonometry (the arctangent of the axis readings) converts that split into two tilt angles, pitch and roll, the pen's lean forward/back and side to side.
In other words, gravity is a free, always-available reference direction. At rest, the accelerometer is an excellent tilt sensor.
The problem: motion looks like tilt
Writing is not "at rest." As you push the pen through a stroke, that motion is also acceleration, and the accelerometer can't tell it apart from gravity. A quick flick can momentarily look exactly like a tilt. Rely on the accelerometer alone during writing and the tilt estimate jitters with every stroke.
Sensor fusion: accelerometer + gyroscope
The gyroscope solves the short-term problem. It measures rotation rate directly and doesn't care about gravity or sliding, so over short intervals it tracks how the pen is turning very cleanly. Its weakness is the mirror image of the accelerometer's: integrate its rate over time and tiny errors accumulate into drift, the estimate slowly wanders.
So the two are fused. A complementary filter, or a Kalman filter, leans on the gyroscope for fast, smooth changes and on the accelerometer's gravity reference to correct the slow drift. Each covers the other's blind spot:
- Gyroscope, accurate over the short term, drifts over the long term.
- Accelerometer, stable over the long term, noisy during motion.
- Fused, a tilt estimate that is both steady and drift-free.
Tilt and Indic letterforms
Why measure tilt so carefully? Because the angle you hold the pen at shapes the slant and consistency of your writing. A steady tilt produces an even, confident slant; a tilt that wanders shows up as letters leaning in different directions, one of the twenty factors the analyser scores.
This is acutely true for Indic scripts. The aksharas of Telugu and Kannada are built from rounded loops; Malayalam flows in generous curves; Tamil balances loops and straights; Devanagari (Hindi) hangs its letters from a continuous top line, the shirorekha. Each of these demands a consistent pen angle to keep curves smooth and that head-line straight. A small, steady tilt reads as graceful; an unsteady one makes the same loops look shaky. Measuring tilt precisely lets Vahini tell the difference, and coach toward a grip that holds the angle.
Key takeaways
- An accelerometer reads tilt from how gravity splits across its axes, when the pen is still.
- During writing, motion masquerades as tilt and corrupts that reading.
- Fusing the gyroscope (smooth but drifting) with the accelerometer (steady but noisy) yields a clean tilt estimate.
- A consistent tilt underpins even slant, vital for the curves and head-line of Indic scripts.