This topic might be of interest. Discussion of both accelerometers (the gate moved) and contact sensors.