Go Down

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

goga

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

robtillaart

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

http://www.phidgets.com/products.php?product_id=1104_0

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

robtillaart



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()
{
  int x = analogRead(A0);
  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

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

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.

goga

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

JimboZA

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?

goga

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

my pienzo which is attached on the sensor has a green

goga

ooops!!!!no i am wrong!!!!!
i have not any leds..... :smiley-eek:

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.

goga


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

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

Go Up