Here is a simple tilt sensor based switch circuit diagram which is built using a mercury based tilt sensor. This sensor is place on a box, so when someone opens the box, the buzzer connected with the tilt sensor start ringing.