a sensor including : a base ; at least one component which moves relative to the base ; and a locking device for locking the at least one component in a predetermined stationary position in response to an external stimulus . where the sensor is an accelerometer , the external stimulus is preferably an acceleration of the sensor in which case the locking device locks the at least one component during periods in which the acceleration exceeds a predetermined value . the predetermined stationary position can be a null position taken by the at least one component corresponding to an acceleration that is substantially zero or an active position taken by the at least one component when acceleration equals a predicted acceleration other than zero . further , the locking device can lock the at least one component actively or passively .