Tilt/Vibration Sensor


Closed Thread
Results 1 to 15 of 15
  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,809

    Default Tilt/Vibration Sensor

    Usual Tilt Sensors detect a large angle displacement. I needed an all axis sensor, so selected the VBS030600 (pdf attached).

    This sensor has two gold balls inside and when moved, opens briefly the normally closed circuit.

    Project needs to sense a movement of the box where the sensor is installed as an alarm system.

    Have tried to use a counter and count how many times it opened before an alarm is given.

    Also tried to average the pulses from the sensor with Darrel's Fast Averaging routine to the PIC but either sensitivity is greatly reduced or is very sensitive to vibration than tilting.

    Any ideas on how to better use this sensor as tilt sensor is appreciated.

    Attached the data sheet of the sensor and an example of the circuit using 1M pull up (for low sleep current) and interrupt on RB0 (Wake up from sleep).

    Ioannis
    Attached Images Attached Images  
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    Hi,

    Cant you use an interupt that will start a timer when the circuit opens.. and then you use an interups to stop the timer when the circuit closes and reload timer.

    Then you set up the timer to overflow at a suitable time. If the box is tilted the timer will overflow and give you a timer interupt. If the box is just shaked the time between sensor toggle is so small so you will not get an overflow.

    maybe ;-)

  3. #3
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    You could put a capacitor across the sensor to "average" the oscillations. Better yet, a RC network tuned to give you the desired time you want.

    I'm curious though, there is nothing in the datasheet says this will work as a "tilt" sensor. Only says it's a "vibration" sensor yet doesn't give you any specs on minimum movement required to trip the sensor. If someone moved the sensor very slowly would the sensor sense that? If not, it won't work as a tilt sensor as those trip when something is tilted no matter how slowly it's moved.

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    The last time I did something like this I used a mercury bulb switch. Yes, those were still available some years back; not sure about now. A slight tilt would cause the mercury blob to move thus breaking the circuit. For a vibration sensor, a cheap chinese toy was inspiration. Just needed a straight wire soldered perpendicular to a pcb surrounded by a spring (also soldered to pcb) with a blob of solder on its end to make its end heavy. Movement causes the blob to oscillate leading to multiple closures of the contact between spring and wire.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,809


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    Quote Originally Posted by Jumper View Post
    Cant you use an interupt that will start a timer when the circuit opens.. and then you use an interups to stop the timer when the circuit closes and reload timer.

    Then you set up the timer to overflow at a suitable time. If the box is tilted the timer will overflow and give you a timer interupt. If the box is just shaked the time between sensor toggle is so small so you will not get an overflow.

    maybe ;-)
    Yes, it is a good idea to try. But the main issue is that the sensor gives a series of pulses when triggered. Is not like the mercury tilt switch. Either shaked or tilted.

    Quote Originally Posted by AvionicsMaster1 View Post
    You could put a capacitor across the sensor to "average" the oscillations. Better yet, a RC network tuned to give you the desired time you want.

    I'm curious though, there is nothing in the datasheet says this will work as a "tilt" sensor. Only says it's a "vibration" sensor yet doesn't give you any specs on minimum movement required to trip the sensor. If someone moved the sensor very slowly would the sensor sense that? If not, it won't work as a tilt sensor as those trip when something is tilted no matter how slowly it's moved.
    Since we have a microcontroler, why make an integrator with RC net? As for the kind of sensor, yes it is more a vibration that tilt sensor, though very sensitive and can be used I guess as such.

    Quote Originally Posted by Jerson View Post
    The last time I did something like this I used a mercury bulb switch. Yes, those were still available some years back; not sure about now. A slight tilt would cause the mercury blob to move thus breaking the circuit. For a vibration sensor, a cheap chinese toy was inspiration. Just needed a straight wire soldered perpendicular to a pcb surrounded by a spring (also soldered to pcb) with a blob of solder on its end to make its end heavy. Movement causes the blob to oscillate leading to multiple closures of the contact between spring and wire.
    If this kind of sensor is commercially available, please give a link. This is going to be used in a relative low production.

    Thanks all for the contribution.

    Ioannis

  6. #6
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    RS components has a lot of tilt switches, see this link: http://uk.rs-online.com/web/c/?searc...es&sra=oss&r=t

    Cheers

    Al.
    All progress began with an idea

  7. #7
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    For me simple is better. If I can put a capacitor or resistor/capacitor on something rather than write many lines of code that's better than taking the time to make the code work.

    Your location says Greece so any link in the U.S. might not be viable but mercury tilt switches are fairly common here. If you have an old thermostat, the ones with the slide for setting temperature not digital, they have a mercury switch in them.

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    A variant on the wire/spring idea; use the coiled spring from an old thermostat. Add a drop of lead on the tip to act as contact.

    You might be able to have two axis by placing two springs perpendicular.

    This of course is totally theoretical.

    Robert

  9. #9
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    A quick image search on google for 'mercury tilt switch' showed a lot of those bulbs and 'non-mercury tilt switches' are now the norm.

    I found some commercial vibration sensors using the spring sensor here
    http://www.aliexpress.com/store/grou...210931515.html

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,809


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    Mercury is not allowed anymore. So other solutions like the spring type or ball like the one I am using is prefered.

    I have ordered a packet of 200 pcs spring type sensor and will see if it works as expected. Since this is a production design, I cannot experiment with diy coils or springs. Thanks all for the ideas, but a ready made solution is prefered.

    I have a feeling that either sensor, the one I am using now (see the pdf on the #1 post), or the spring type, it will need some kind of filtering or integration. Maybe the idea of a resistor-capacitor will help as AvionincsMaster1 posted.

    Ioannis

  11. #11
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    Woohoo! I might have gotten something right!

    Have you thought about using something like this:ADXL345 3-axis Digital Tilt Sensor Acceleration Module. I know it's for Arduino but I'm sure a similar solution could be forund for PBP and they're fairly cheap but I was too lazy to look for one. They probably aren't as cheap as your vibration sensor though.

    I did find some two axis tilt sensors but if you're doing an alarm you might want the three axis and I think an accel would work well. The math for it looks daunting http://www.freescale.com/files/senso...ote/AN3461.pdf. You could also use IOC with the accels which I think would be easier by just looking for a raw voltage change. I realize this system probably won't be used in the National Art Gallery but it could be made to be fairly sensitive using accelerometers.

    Good luck.

  12. #12
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,809


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    I forgot to mention that the circuit will be battery powered with the need to work for a long time. Say for months. MCU will be in sleep and when shaked, an interrupt wakes it, does its magic and goes back to sleep as a good kid.

    Thanks for the moduleidea, it is a good but is very expensive for this project. The target price per device is about 7-10 euros max.

    So for now, I'll stick with the mechanical sensors.

    Ioannis

  13. #13
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    I have done some vibratin sensors using a old headphone speaker with a small ball point pen spring superglued to the cone , I have tried perpendicular and parallel, #2 works better, but I had to use a LM386 to amplify it and used a germanium diode to rectify it. it might be possible to use a opto isolator in place of a amplifier, just depends how much voltage you can get out of a vibrating speaker, usually not much.
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  14. #14
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    Most of car alarms use coil and magnet on spring, signal from coil is goes to comparator, output to monostable.
    This way you can set trigger level, and you can define duration of output signal.
    In stand of coil, magnet and spring you can use piezo.

  15. #15
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,809


    Did you find this post helpful? Yes | No

    Default Re: Tilt/Vibration Sensor

    No in my case. PIC must be in sleep mode until a clear TTL level trigger wakes it up.

    So, anything like a switch can be used. Not analog senors.

    Thanks for the input.

    I am waiting for the new spring sensors and also trying ways with the ball sensor.



    Ioannis
    Attached Images Attached Images  

Similar Threads

  1. IR Temperature Sensor
    By TravisM in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 23rd October 2012, 15:04
  2. 2-axis tilt sensor
    By Ramius in forum General
    Replies: 9
    Last Post: - 31st May 2012, 12:34
  3. Tilt Sensor Reading
    By sincity337 in forum Serial
    Replies: 6
    Last Post: - 20th September 2010, 05:23
  4. Replies: 6
    Last Post: - 18th January 2008, 08:17
  5. ultrasonic sensor
    By PoTeToJB in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th May 2006, 20:26

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts