The first one is a ball-based vibration detector. It detects any kind of movement. It's only disadvantage is that the contact time is really short at this sensor, so you have to connect it to a very sensitive circuit or prolong the signal length by a programmed PIC, somehow like Xyzzy did in his DIY RumblePak for Nintendo DS.
The second one is a tilt sensor (well, it is ball-based, too). This is the sensor used in my other project, home-made Guitar Hero controller. It is very simple and still quite effective!!!
Step 1: First type - components needed
- a piece of thicker and harder copper wire
- a spring (e.g. from a pen)
- an iron ball (e.g. from a ball bearing system) - of course proportional to the other components
- soldering-iron and some solder
- and of course a bit of hot glue
So here it is how it worx:
The spring starts to move (or rather vibrate) because of the mass of the ball (you know, the friggin' inertial force _). If the movement is big enough, the ball makes contact with the copper wire (both physically and electrically).