Pages: [1]   Go Down
Author Topic: MEAS Vibration Sensor how to connec to to arduino?  (Read 2015 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello.
I bought two of these guys: http://www.hvwtech.com/products_view.asp?ProductID=787
(datasheet available under Download Resources)

The datasheet says I can use them as switch buttons. I learned in the arduino tutorials how to connect a button to arduino. I just replaced the button with one of the virbations sensors, but its not working.
I don't understand the sketch in the datasheet. Can I use them only with 220V? Or is the voltage they create too high for arduino? I am using an 280 Ohm resistor before the 5V pin.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now I connected it differently:

Sensor
|       |
GND  280 Ohm resistor
        |
        Analog Pin

Now I get the value 1023 on the Analog Pin. And if I touch the sensor I get values between 1023.

But am I connecting the sensor right to the arduino?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34493
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Make sure you put the zenner diode in it will stop you from zapping the input. Failing that a normal signal diode from the sensor to +5v should be used.

As this sources power you should not enable the pull up resistors in the sketch. That's the digital write high after you have set the pin for input.

Connecting it as an analogue input you will probably need to pull it down with say a 1M resistor (input to 0v ) as well.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do I nedd a (zener) diode? If yes which parameters do it need? Is this to get direct current? Do I need this only for digital input?

As Analog input:
It seems that I get more range if I use the resistor. Is this possible or is it just my imagination?

I just flipped the sensor, so that Sensor Pin 1 connects now to analog input instead of to GND, and according for Sensor Pin 2. Now the idle value is 0 (not 1023) and if I touch it it has a higher value (up tp 1023).
« Last Edit: July 24, 2008, 07:43:36 am by Maxi » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34493
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do I nedd a (zener) diode?

Yes otherwise you can damage the input of the Arduino. As it says use a 5V1 zener or if you don't have one of that value anything down to 3V3. As I said before :- Failing that a normal signal diode from the sensor to +5v should be used as well as that series resistor.

Quote
It seems that I get more range if I use the resistor. Is this possible or is it just my imagination?
What resistor? If it's the series one then you must use it to allow the zener diode to work. If it's the pull down one then it drains some of the current from the input pin allowing the voltage you generate to give a bigger input. You could also try a 0.1uF capacitor across the input to hold the voltage spike up a bit more and offer a bit more protection against over voltage from the sensor.
Logged

Pages: [1]   Go Up
Jump to: