Introduction: Five-cent Tilt Sensor

Picture of Five-cent Tilt Sensor

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 1: Break the Perfboard

Picture of Break the Perfboard

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.

Step 2: Build the Cage

Picture of Build the Cage

To build the cage, cut and strip some solid-core wire (I happened to have copper around), and solder into one of the boards to create corner posts. Shore up the cage by gluing shims at each corner beside the posts. These are cut from popsicle stick, because popsicle stick plus hot-melt glue was just think enough that the nickle could slide freely.

Step 3: Top It Off.

Picture of Top It Off.

Finally, glue the top down. With hot-melt, I could only manage to get two corners glued (any more and the glue would cool before I could thread the pins through the top board). I squished some extra in from the sides on the other corners.

Step 4: The Finished Product

Picture of The Finished Product

You now have a cheap tilt sensor -- well, at least in as much as you already have perfboard, wire, solder, and hot glue. Show below, I've wired the sensor up to some leads, ready for installation into my orientation sensing cube.


Bigev (author)2009-01-28

I wonder, could you thread the pins, then squirt in the glue? That way you could just drop the board on top, no hurry!

diy_bloke (author)Bigev2012-10-23

my thought exactly :-)

toelle (author)2009-01-30

Nice Instructable, no offence but i built a better tilt sensor .

tealpsyclone (author)toelle2009-02-01

show us. don't feel like I am calling you out or something but if you think it is better prove it and show us the product or how to do it. I'm getting some components in hand for a project but i want the best/ cheapest. so far this is a good option but if yours is better, show me.

toelle (author)tealpsyclone2009-02-02

Okay, kind of hard to explain in the comments. I'll make an instructable. I'll pm you when its finished

Aplonis (author)toelle2011-11-12

I'd be interested in this...except that I see the promised instructable is now two years, nine months old without result. Here's hoping to see it soon?

toelle (author)Aplonis2011-12-11

I forgot about this comment at the time, so I never got around to creating this. So I'm not sure if it'll be done or if it's even relevant anymore?

Goodhart (author)toelle2009-02-05

Let us all know :-)

tealpsyclone (author)toelle2009-02-02

cool i look forward to it.

svartgeit (author)toelle2011-12-11

This is meant to be a quick and cheap sensor. So yeah, we all can build better tilt sensors and we all can spend lots of money and get really nice ones. Please don't try to put down this instructable. What makes this site great is all the different ways to do things. We don't just want one instructable for each idea, we want as many creative ways we can get! So please don't try to make yourself better by putting down others.

toelle (author)svartgeit2011-12-11

It was never meant to "put down" anyone or "make myself better" at all. I was actually going to create an instructable about how I think it could've been done better, but never got around to doing it. And as you say, we want as many ideas as we can get. However, please note that the original comment is now almost 3 years old.

frollard (author)2009-01-29

My favourite toy from years past: Brain Warp uses a ball bearing sensor, similar to this, its inside an octahedron shape, where each corner has a set of connectors. This is a great instructable! (and good job getting tagged on hackaday!)

eeejae (author)frollard2011-03-08

YES! and our favorite family toytoo. It came apart when changeing the batteries. Now it only says, "game ready..." and does nothing else. Please share the schematic so we can put it back to working order. Thanks.

ceramiceye (author)frollard2009-02-05

oh man, I LOVED Brain Warp, but I left it with my parents when I moved out for college. Now I have rubiks revolution, which is similiar, but not as good.

Unit042 (author)2009-08-12

This, while a simple proof of concept, using a single coin instead of a ball and cage, is an awesome idea. I'm gonna recommend this to my friends, and possibly build one in the near future.
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!

Unit042 (author)Unit0422009-08-12

Aha! I found an interface method using two wires to monitor the standard four wire model shown. (Schematic can be drawn and posted if requested.) PS: I wonder what uses a three-wire cage would have?

eranox (author)Unit0422010-10-25

Couldn't you use resistors of different values for each wire, and then use an analog pin on your microcontroller (or an array of comparators connected to a digital pin perhaps) to sense which wire/s were being contacted? I think numeric keypads use a similar technology, which allows one lead to be connected to ground and the other to be connected to a single pin on the microcontroller. Pressing each button gives a different resistance, and that's how the microcontroller knows which button is pressed. This would let you have a virtually unlimited number of wires and use only one pin on your microcontroller.

I know I'm about a year late to jump in on this, but maybe it's still a help. :p

Unit042 (author)eranox2010-10-29

Interesting idea. It would be difficult to organize the resistors into a coherent circle-arrangement, as one resistor set would be sharing a side with two other potential contacts....
I'll have to break out my circuit simulator for this idea....

skabonner (author)2009-01-29

i saw a detonator in an old vietnam improvised munitions handbook. but they used a ball bearing

Dr.Bill (author)skabonner2009-02-10

we used mercury switches.

beehard44 (author)Dr.Bill2010-02-26

nah, just pull ring and throw. better, failproof.

NXTwiz (author)2009-05-30

now would u be able to connect the four wires to the 4 connectors on the psp circuit where the anolouge stick goes? that way u'd have a motion sensor?

NXTwiz (author)NXTwiz2009-05-31

srry i meant a tilt sensor?

codongolev (author)NXTwiz2009-07-16

I don't think so. the psp measures values of x and y and returns them through the four connectors. the analog stick acts as a variable resistor and tells the psp how far along the x and y axis the joystick is.

NXTwiz (author)codongolev2009-07-20

ya i realized that after a while. k thx anyway

geeklord (author)2009-07-07

Well, you beat Digi-Key price wise. Good job, I think I'll make one.

mathman47 (author)2009-05-29

The KISS method. And a real thought started. I linked to this from a self-balancing robot Instructable and this sure beats a microswitch with a weight. What ever happened to toelle's sensor?

game16 (author)2009-02-16

How would you use it? I'm a beginner, sorry but how do you use this sensor?

godfreyandthandi (author)game162009-03-17

connect gnd to the nickel and +5V to each pin, when the two touch it will register 'high' on the microcontroller.

jimmy dean (author)2009-03-15

Wouldn't it be more useful if wired positive to the nickel, negative to the nickel with a 10k resistor in between the nickel and negative, and then had each pin going to a digital in?

PKTraceur (author)2009-02-18

Wouldnt a penny work better? I thought that copper had better conductivity, and would be cheaper. Thanks, you project has inspired me to make an awesome flashlight. -RoAr

magicentral (author)2009-01-30

How about a BB Instead of a ball bearing or nickel? You could make a lot of tiny sensors for fairly cheap. One carton of BBs has a lot in it and you only need a 2x2 perf board or a smaller custom one. It would be much smaller and more sensitive.

Goodhart (author)magicentral2009-02-05

but the BB's could hang in the perf board's holes. a sheet of copper maybe a better rolling surface.

magicentral (author)Goodhart2009-02-07

but a copper sheet is completely conductive

Goodhart (author)magicentral2009-02-08

Indeed. You would have to insulate the pins with plastic or rubber grommets, or something (just where they entered the copper sheet).

magicentral (author)Goodhart2009-02-08

if you just drilled holes in a sheet of plastic for the pins then that would work without insulation

Goodhart (author)magicentral2009-02-08

as long as the metal ball or BB closed two contacts (completed a circuit) near the pin.

magicentral (author)Goodhart2009-02-15

but if we are going for small, and rolling is not good because it is too sesitive, then why haven't we cosidered, pennies, dimes, or even small washers?

billhorvath (author)magicentral2009-02-09

By the way, "BB" is short for "Ball Bearing."

nn5i (author)billhorvath2009-02-14

No, it isn't. US standard shot sizes are 12, 9, 8, 7-1/2, 6, 5, 4, 3, 2, 1, B, BB, BBB, and T. Nothing whatever to do with ball bearings. BBs are generally a little irregular anyway, which would have a negative effect on sensitivity. A stainless ball bearing would work well, I think.

jeff-o (author)2009-01-27

I suppose you could also use a ball bearing, though there's a chance it would roll around *too* much...

peanutthegreat (author)jeff-o2009-02-08

I agree. I think a small flat, and round object would e better. A BB would roll around at the slightest provocation.

jeff-o (author)peanutthegreat2009-02-09

I suppose it depends on how sensitive you want the switch to be.

Goodhart (author)jeff-o2009-02-05

or, depending on the size of the ball, hang in some of the holes....

landru (author)2009-02-05

sorry to be a pain but I can't resist pointing out that it's "nickel" not "nickle." My daughter placed 2nd in a spelling bee, instead of winning, for that mistake :) nice instructable & a cool idea, though.

stone3408 (author)2009-02-02

Great instructable! Very simple and easy to adapt to many different problems with a wide range of materials. Thanks for sharing.

Sandisk1duo (author)2009-01-31

Cool! better then getting a $20 gyroscope and programing it! quick and dirty

AtomSoft (author)2009-01-29

Pref boards are about $2 small and $5 large.... I like this... one could save the nickle and just find or get a old motherboard from a PC and take out the old coin cell battery and use that. Or if doing the ball bearing type way make sure you make a small hole/notch for the ball to slip into so it wont move on a vibration.

Plasmana (author)2009-01-29

That is a clever idea!

Learndy (author)2009-01-29

Great! Simple and effective. That's how I like it.

One idea regarding cage-building and glue: How about stacking paper that it is just a little thicker than the nickle and then putting the hot glue besides the paper stacks? Or no glue at all but bind the boards with a thread or fishing line or some thin wire? Or even replace one or two of the cage-boards with (thick) paper? An endless number of ideas, possibilites, options... ;-)
Airspace V - international hangar flying! for tools & toys

About This Instructable




More by ix:Five-cent Tilt Sensor
Add instructable to: