iImage Information

This is a basic tilt sensor inspired by ball-and-cage style sensors, but 2d instead of 3d. A captured nickle connects pairs of wires depending on the sensor orientation. These are quick to build, and pretty cheap; I came up with them for a project where I wanted to know which face of a cube was pointing up (a task for which you only need two -- I'll leave that as an exercise to the reader).
The nickle does sometimes catch a bit on the perfboard; gluing something a bit slipperier onto the board, or lightly sanding it, might help.
Step 1Break the Perfboard
iImage Information

Figure out how many holes apart you will need each pin in the cage to be -- you'd like it to be the case that the nickle only touches two at once, but too much play will waste board. I left six holes between pins, axis-aligned. This was a bit looser than I would have liked. Having the cage slightly diagonally oriented might allow a better fit.
After doing the layout, score and break the board. I score a few times on each side with a box knife and break over the corner of a table. In these pictures I'm making two sensors, so I've made four plates -- a top and a bottom for each. The little bit of extra board was useful elsewhere in the project.
I'm trying to find a way to use fewer microcontroller pins to check the sensor's state, by not having any power sent to the coin itself. (coin acts as a multi-pole relay, only touching two together, not supplying power to any pins, just connecting them together)
Hint: More pins around the nickel = higher resolution (accuracy)
The maker of this 'ible has brought an intermediate-cost sensor, and brought it to the hobbyist level!
This gets five stars, favorited, and user-subscribed!
I know I'm about a year late to jump in on this, but maybe it's still a help. :p
I'll have to break out my circuit simulator for this idea....