Instructables
video DIY earthquake sensor
An earthquake sensor can be an useful safety device, because it feels the small tremor of the primary wave and puts out a sound alarm, some seconds before the big earthquake.  Surely we can not go outside within few seconds, but under a table we get more saving chances. Many earthquake sensors available on the market feature an electronic level in order to alert us to a landslide risk.
If you need just an earthquake sensor (without the electronic level), you may do it yourself.
The sensor you see in the images consists of a pendulum anchored to a pin (I used a M4 screw) by a double bearing and fixed to a back spring.  When an earthquake shakes the pendulum, the screw connected by the red wire closes an alarm circuit.
In order to send a stable signal to the bell I used a delay off circuit