Anyone familiar with this Sensor?

hello, i bought this vibration sensor and i want to connect it to my arduino in order to make some actions whenever the sensor is triggered, the only site i found it on was: Here does anyone have an idea about whats its name or any demo codes that can be compatible with it? this is an image of it from the inside(i added the 2 wires): |500x314

It looks like a weight (golden cylinder) on a flexible arm will bounce against an contact when shaken. Does the contact close when you press that cylinder downwards?

Trembler switch?

This looks close (could give some operational insight) Mini Shock/Vibration Detector

i connected a led to the sensor and gave it 4v or 5v and whenever the sensor was touched or vibrated , the current passes through and the led turns ON ... |500x314 i need help with solving something and the only way i can figure it out with this sensor is this way: first the sensor gives voltage to one of the pins, then if the pin receives the +5v it allow another action to be done and was hoping for something like this in the code

if(pin1ReceivedVolt== 5) or if(pin1Received==true){do actions...}

can something like this be done? thanks

blackeaglemn: i connected a led to the sensor and gave it 4v or 5v and whenever the sensor was touched or vibrated , the current passes through and the led turns ON ...

I'm wondering where your current limiting resistor is on that LED (unless you have the max current turned waaaaaay down on that power supply)...

blackeaglemn: can something like this be done?

Yes - though I am wondering why you haven't just tried it, instead of asking here?

Your code could be expressed with a simple digitalRead() and a check to see if it is HIGH or not.

Though this might not be enough for your project - which you haven't told us about; if you are doing a lot of other processing in the loop, just checking for "HIGH" might be missed - in which case you would need to set things up so that the switch triggers an interrupt, and then within the interrupt service routine (ISR) you set a variable to "true" that you can flag off of in your main loop.

cr0sh:
I’m wondering where your current limiting resistor is on that LED (unless you have the max current turned waaaaaay down on that power supply)…

Yes - though I am wondering why you haven’t just tried it, instead of asking here?

Your code could be expressed with a simple digitalRead() and a check to see if it is HIGH or not.

Though this might not be enough for your project - which you haven’t told us about; if you are doing a lot of other processing in the loop, just checking for “HIGH” might be missed - in which case you would need to set things up so that the switch triggers an interrupt, and then within the interrupt service routine (ISR) you set a variable to “true” that you can flag off of in your main loop.

yes the max current was low when used because i was just trying to test if the sensor is working and it did…
ok i will look into digitalread but what do u mean with high or not? supposed i conected the led to pin2 and ground and passed 5v like in the image, will i use an if like this if(digitalRead(pin2)==5){//do actions}
note: am trying to use the led again with the arduino so whenever the sensor is triggered i notice it with the led but the pin also get its voltage…

sry for not talking about my project, which consist of 3 steps -
1)sensor triggered
2)get GPS location
3)send message with GPS location via GSM sheild

so basically when the sensor is triggered i want my already working codes of GPS and GSM to be launched

Three terminals (or at least three screws) - cant be too difficult to work out with a DMM which are which. There is usually an anti-tamper contact that opens when you take the lid off. Is there a pin in the cover lid that presses down on one of the contacts?
The clue is in AWOL’s answer - trembler switch - like defusing WW2 bomb. This is going to be a very dirty switch in digital terms and is going to need some serious debouncing. Also not going to have good quality contacts with “wetting” problems. A mercury tilt switch might be a better bet. Yours looks like the sort of thing screwed to a window frame and responds to bricks chucked at windows. You don’t need much code or demo’s for that, just a DMM to identify terminals and either hardware (Schmitt or RC) or debounce software to get a clean single contact closure. Antitamper circuits are usually series normally closed, sensors are usually parallel normally open. There are better ways to sense movement - Hall effect, optical, all with clean digital outputs. “Sensor” is guilding the lily in this case