Vibration Sensor 1104

Good evening!!!

I try to make a program about arduino mega 2560 and sensor 1104....
i try something simple....just make a vibration ...but i can't find some material about this...

Could anyone help me ?????? =(

can you post a link to the datasheet of that 1104, I get 156.000.000 hits in Google on the number 1104

i can't understand how it works.....thanku very much for your interest!!!!

it is an analog device so you should connect one pin to +5V one to GND and the third to Analog pin A0 for example

some loop like this should work.

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  int x = analogRead(A0);
  float voltage = x * 5.0 / 1023;
  Serial.println(voltage);
}

ok ...something like this i have done ..but i need something to put into my code to make the vibration.......how is it work ???

for the temperature sensor and the light sensor i have a formula..but for this ???????

i need something to put into my code to make the vibration

It doesn't make a vibration: it's a sensor not an actuator.

When it feels vibration it will output a voltage based on the intensity of the vibration, eg 0V for "still" and 5V for a "earthquake"; you read that analog input as Rob suggested and your program acts based on the level of vibration.

thanku !!!!!!!!...i thought something else.....
now i can explain this sensor into my project

now i can explain this sensor into my project

Maybe have 3 LEDs.... green for still, yellow for minor vibration and red for a big shake, based on the analog reading?

you mean the pienzo?????????

my pienzo which is attached on the sensor has a green

ooops!!!!no i am wrong!!!!!
i have not any leds..... :astonished:

No, I meant maybe you could add coloured LEDs to your project and have them light up depending on how big a shake the sensor registers.

JimboZA:
No, I meant maybe you could add coloured LEDs to your project and have them light up depending on how big a shake the sensor registers.

my university can't give me any led.....i must do something with these matereals(sensor+arduino only)

i have my mobile phone near the sensor and when it is vibrating the output voltage is the same like before.. =(

i must do something with these matereals(sensor+arduino only)

Well, sensors by their very nature don't "do" anything, they "sense".... then you need an actuator to be the "do-er" based on what you sense. For example, you have a temperature sensor you say: well there's no point measuring the temperature if you don't act on that reading, eg switch the fan on if it's too hot.

But remember the Arduino has a built-in LED on pin 13- perhaps you could make that do something based on the readings