Mercury Tilt Switch
A quick video demonstration of the switch:
How to Make a Mercury Switch
After taking it out, mount it on a block of wood in whatever way you like. I like to keep part of that long metal strip with it so I can use it as an angle adjuster. On the bottom I attached Velcro so I can put it on various robots real easy.
Notice that the mercury is encased in glass, with wiring going inside the encasing. Typically inside there is either air, an inert gas, or a vacuum.
So when the mercury is tilted on one end, it connects the ADC to +, giving a logic high:
And when tilted the other way, it connects to -, giving a logic low:
There is also a middle state that lasts for a very very short time between the mercury transistion, in which case your ADC will float. If this is a problem, you can always connect it to ground via a 300k resistor - if it's in the transition state it will go to logic low.
Advantage of Mercury Switch vs. Accelerometer
Not to give you bad ideas, but apparently this sensor was also used in car bombs because acceleration would trigger it . . . but you didn't read that here . . .
Problems with the Mercury Tilt Switch
I remember the first time I tried out my sensor, my robot would do a stop-start motion. Acceleration would cause the sensor to false trigger, causing my motors to reverse . . . and the sudden deceleration would cause the sensor to un-trigger, once again making the robot accelerate . . . It was a really bad control algorithm, but I was a noob back then too . . .
The mechanical fix to this problem is to adjust the tilt angle more steeply (bend the metal beam coming out the wood mount more).
An electrical solution would be to put a capacitor between the ADC and ground. Depending on the size of the capacitor, you can vary the time it takes for it to trigger. Higher values would result in lower possibility of a false trigger, but would also slow the sensor response speed. Experimentation will be required for your robot . . .
From Wikipedia (I couldn't have said it better):
"It can be inhaled and absorbed through the skin and mucous membrane, so containers of mercury are securely sealed to avoid spills and evaporation. Heating of mercury, or compounds of mercury that may decompose when heated, should always be carried out with adequate ventilation in order to avoid exposure to mercury vapor."
"Acute exposure to mercury vapor has been shown to result in profound central nervous system effects, including psychotic reactions characterized by delirium, hallucinations, and suicidal tendency."
Has this site helped you with your robot? Give us credit -
link back, and help others in the forums!
Society of Robots copyright 2005-2013