Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Tilt Switch Suggestion?

Status
Not open for further replies.
the nail with wire rings would detect tilt in any direction, microswitches and mercury switches seem like unidirectional solutions (they only work in one direction)
Perhaps you missed his size requirement.
I have about a 1"x2"x1/4" space to work with
 
Mercury bad!:mad:

Why?

Mercury tilt switches, mercury thermometers etc are perfectly safe unless you smash the sealed glass and drink the mercury.

You are much more ikely to get mercury exposure from a smashed CFL or fluoro tube light, which most people are exposed to in their lives and the mercury is a vapour that is more likely to be breathed in than mercury in a tilt switch is likely to be drunk.
 
A mercury switch would help to solve the vibration problem (within limits) because the mercury blob is inelastic, makes contact at many points, and adheres (wets) to the switch contacts, whereas a ball is elastic, makes contact at very few points, and has no adhesion to the contacts. But, alas, the OP doesn't want to use mercury.
 
Galinstan or NaK would make a less toxic replacement for Mercury. Though NaK is dangerous in it's own right.

Edit: Honestly, with minor amplification, you could just use any liquid electrolyte.
 
Last edited:
Why?

Mercury tilt switches, mercury thermometers etc are perfectly safe unless you smash the sealed glass and drink the mercury.

You are much more ikely to get mercury exposure from a smashed CFL or fluoro tube light, which most people are exposed to in their lives and the mercury is a vapour that is more likely to be breathed in than mercury in a tilt switch is likely to be drunk.

Would You Knowingly put it in the hands of Children?
 
If you want a suitable steel ball for a tilt switch? Find an Airbag crash sensor at the wreckers. Inside is a gold plated steel ball & goldplated contacts. Ive dismantled them for the parts. For compactnes & reliability you cant go past a mercury switch.
 
Last edited:
Would You Knowingly put it in the hands of Children?

No, but I would not put a sharp kitchen knife in the hands of children either. And if you said "Kitchen knives bad!" I would again question why the blanket statement and examine the risks in the real world.

Anyway we got off-topic so can we please drop the subject of mercury hazards? :)

The same hobby electronics stores that always sold mercury tilt switches now usually sell steel ball tilt switches as replacements, they are very common. As for the debouncing problem it's quite easy it just needs two resistors and a cap;

270 ohm from switch top to +5v
switch bottom to ground
then 10k from switch top to a cap + pin (say 1uF to 100uF) then cap + pin is the output.

Basically you have a 270 ohm pullup resistor on the switch, then there is a separate 10k/1uF RC filter on the output that will give a nice average voltage even when the switch is jiggled.
 
Anyway we got off-topic so can we please drop the subject of mercury hazards
Ok I just think its bad for humans in general.
Did you like the magnet idea?
 
The magnet idea is novel, but I think it might be difficult to achieve and maintain the required compromise between holding force against vibration and easy movement when tilted. Maybe not. But that idea has sparked the following proposal:

Wrap thin-walled flexible tubing into a single-turn helix around a miniature reed switch such that the helical wrap is concentrated mid-length of the reed switch. Let the free ends of the tubing run parallel to the reed switch and extend a bit beyond the ends of the reed switch. Place one or more magnetic balls inside the tubing (enough mag balls to energize the reed switch) and close off the opens ends of the tubing so the mag balls can't fall out. When the axis of the reed switch is vertical the reed switch will have one switch state because the mag balls are at one end of the reed switch, away from the middle of the reed switch, unable to move the reed contacts. When the axis of the reed switch is horizontal the mag balls are forced by gravity toward the center of the reed switch, thus energizing it. I think this should be somewhat less susceptible to small vibration. May even put some liquid in the tube along with the mag balls to dampen vibration. Rube Goldberg, or what?
 
Last edited:
I think you'll find the mag balls will stick to each other and not be willing to move through the tubing :(.
 
Ok I just think its bad for humans in general.
Did you like the magnet idea?

Sorry, I didn't. :) Like CCurtis I agree it was innovative and clever but it is complex mechanically and would be hard to get exactly the right magnetic strength. Also the ball may become magnetised over time and cause failure.

The commercial ball switches are small and neat, and produce and output that is "switch closed" for >99% of the time, with some added switch noise from vibration. I think the best solution is a simple electrical debouncing/averaging as people and myself have said.
 
I think you'll find the mag balls will stick to each other and not be willing to move through the tubing .

Good point. When stuck together the balls can't roll. Would have to be a single ball that has a strong enough magnetic field. There other ways to do it with a reed switch and a magnet too. The nice thing about the magnet/ reed switch combination is that the contacts have hysteresis which helps to deal with the vibration problem.

The sensor the OP is using is not designed for an environment with vibration, and incidentally, if you look at the data sheet he is probably exceeding the current rating of the sensor, somewhat. With a weight of .25g for the ball in it, you can get a pretty good idea of how little force is required to make it jump and bounce. And no matter how much mass the ball has, if you move the sensor downward at greater than 1G acceleration, with the sensor axis vertical, it's going to lose contact for as long as that acceleration is applied, unless the acceleration is so great that the ball moves all the way to the upper end.

The capacitor fix and the multiple sensor fix should at least help. I'm curious if there is a sensor, resistant to vibration, that you don't have to tack on fixes to and doesn't require power, if practical.
 
Last edited:
Interesting how the OP didnt seem to indicate that he wasnt in favour of using a mercury switch. Just someone else who seems frightend of them. They are still avalable & in my opinion the best option. I have used them in alarm aplications & are very reliable & rugged.
 
... I'm curious if there is a sensor, resistant to vibration, that you don't have to tack on fixes to and doesn't require power, if practical.

Yep! The mercury switch. Small reliable and vibration absorbing. The main problem with mercury switches is if you get too much current through the contacts you can get a poor-conducting oxide layer on the contacts and they get less reliable. But if used within their current spec they can work well for 20+ years.

Or if you want to go a bit more high-tech these modern sensors use a ball and optical break beam, and debouncing circuit all in the one TINY package;
https://www.romanblack.com/tilt.htm
 
Last edited:
I made a simple tilt switch it used ADC and two cds Photoresistors it's real simple and you don't have to deal with
switch bounce like a ball switch with two of these you could get right to left and front to back tilt and angle.

How it works is this you have a IR led mounted on top of a tube under the led is X shape mirror it's free to move
front to back or side to side you read the change of light on the 4 photo-resistors It worked real nice.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top