Tilt Switch and Transistor without Microcontroller

I think you should consider no transistor - just use 9V and tilt switch.