Sensor for detection of sudden acceleration/deceleration