A micro inertial measurement unit (μlMU) which is based on Micro-Electro-Mechanical Systems (MEMS) accelerometers and gyroscope sensors is developed for real-time recognition of human hand motion. By using appropriate filtering, transformation and sensor fusion algorithms, a ubiquitous digital writing instrument is produced for recording handwriting on any surface. In this paper, we propose a method for deriving an error feedback to a Kalman filter based on the assumption that writing occurs only in two dimensions i.e. the writing surface is flat. By imposing this constraint, error feedback to the Kalman filter can be derived. Details of the feedback algorithm will be discussed and experimental results of its implementation are compared with the simple Kalman filter without feedback information.