Go Down

### Topic: Vibration Sensor 1104 (Read 7081 times)previous topic - next topic

#### goga

##### Feb 17, 2013, 08:10 pm
Good evening!!!

I try to make a program about arduino mega 2560 and sensor 1104....

Could anyone help me =(

#### robtillaart

#1
##### Feb 17, 2013, 08:45 pm
can you post a link to the datasheet of that 1104, I get 156.000.000 hits in Google on the number 1104
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

#### goga

#2
##### Feb 17, 2013, 08:48 pm
http://www.phidgets.com/products.php?product_id=1104_0

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

#### robtillaart

#3
##### Feb 17, 2013, 09:02 pm

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.
Code: [Select]

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

void loop()
{
float voltage = x * 5.0 / 1023;
Serial.println(voltage);
}
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

#### goga

#4
##### Feb 17, 2013, 09:07 pm
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 ?

#### JimboZA

#5
##### Feb 17, 2013, 09:15 pm
Quote
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.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)

#### goga

#6
##### Feb 17, 2013, 09:20 pm
thanku  !!!!!!!!...i thought something else.....
now i can explain this sensor into my project

#### JimboZA

#7
##### Feb 17, 2013, 09:24 pm
Quote
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?
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)

#### goga

#8
##### Feb 17, 2013, 09:33 pm
you mean the pienzo???

my pienzo which is attached on the sensor has a green

#### goga

#9
##### Feb 17, 2013, 09:34 pm
ooops!!!!no i am wrong!!!!!
i have not any leds.....

#### JimboZA

#10
##### Feb 17, 2013, 09:35 pm
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.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)

#### goga

#11
##### Feb 17, 2013, 09:41 pm

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.. =(

#### JimboZA

#12
##### Feb 17, 2013, 09:54 pm
Quote
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
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)