loading
make a simple tilt sensor for your electronics project. this sensor will allow your robot or whatever to know when it has been inverted (or tilted to some angle such that the tilt sensor is inverted (i.e. needle side towards the center of the earth)

you'll need:
mechanical pencil
ball bearing with a smaller diameter than the pencil
two sewing needles
lighter or matches.

==============

1) take apart the mechanical pencil so that you have a hollow shaft, you don't need the other parts of the pencil

2) solder lead wires to the dull ends of the sewing needles.

3) heat up the sharp end of the needles with a lighter.
while still hot stick the needles through one end of the pencil shaft as seen in the diagram. they should be side by side with ~2mm space between them. (i.e. wide enough apart so that the ball bearing can sit on them comfortably.

4) put the ball bearing into the shaft.
stick something (cotton ball, balled up rubber band, tape, whatever) into the open shaft end to keep the ball bearing in there.

you're done.

I take it you have to operate this on its side? Isn't mounting, to have a level starting point, very critical? If starting from a non-level surface, it already triggers, but only in one direction. Perhaps a NAND gate for control - high or low. Or am I missing the point entirely?
I know it is 3.5 years later but I think you were missing the point. You need to mount this tube on its side indeed at such an angle that it will start rolling at the desired tilt. <br> <br>So suppose that you have a flat surface and you want the switch to close when the surface is 45 degrees tilted, you need to mount this tube at 45 degrees up, so it is level when the surface is at 45 and connects when it is tilted a bit more
Very good idea.<br/>But it has some dynamical problems when you use it on a moving object that the acceleration changes.<br/>The ball is moving because of the the change of the acceleration of the object and causes error.<br/>I made a balancing robot (<a rel="nofollow" href="https://www.instructables.com/id/balancing_robot">https://www.instructables.com/id/balancing_robot</a>) and first I tried to use a sensor like this but because of its motion the sensor worked improperly.<br/>
If you use a piece of square keystock instead of a ball bearing it may help with the error, and also the shorter the tube the more sensitive it will be. So for your project you may want to use a short tube for fast response.
wouldn't that run the risc of getting stuck in the tube?
maybe add a capacitor to the leads to reduce noise and use tiny springs instead of needles to reduse the effects?
You could do this simpler with some copper wiring. Just take two pieces of it and put them in the tube you're using. Place some cotton in the end where the ball bearing will be, so that the tips of the wires are in it, and fill the rest of the tube with epoxy. Then use the remaining wire sticking out of the tube to connect to the rest of whatever you're attaching it to. Remove the cotton, add the bearing, cap the end, and it should work.
to make a 2 way switch do that on both sides. I like it though. A lot safer than a mercury switch. :P<br />
so if the bal gets off of the sewing needles wat happens???
there is discontinuity and your microcontroller will read 0V at it's input pin
lol very cool, one step sensor.

About This Instructable

12,798views

23favorites

License:

Bio: www.leevonk.com
More by leevonk:WolfPack: Large-Dog Carrier Vortex-Drive Micro ROV (ROVVor) Squintasaurus: cybernetic dynamically adjustable vision enhancement system 
Add instructable to: