anyone tried these "spring" vibration sensors?

I brought one of these:

I thought it would be easy to figure out: 5V, Gnd, and Signal pin. The signal pin should go to the digital input. But I haven't been able to identify which pins go where. I tried S for signal, middle for 5V, and - for Gnd, but no good, I keep seeing active pin on signal regardless of if the sensor is being knocked. I'm afraid I might short my Arduino...so I haven't tried other combinations.

Has anyone tried one? when I ohm out the pins, I get open circuit on all combinations.

Orienting the sensor upright with the resistor facing you and "A" is upright, we see a resistor, the left and right legs of the "sensor", and the left, right, and middle pins. Here's my ohms:
resistor: 10k ohm
Left leg of sensor to pins from left to right: short, 10k, open
Right leg of sensor to pins from left to right: open, open, short

connect power to the center through a resistor.
put an led on each side leg and bang the thing on the table a bunch of different ways.

the spring has to move to make contact to complete the circuit.

Is there a maker's part number on there anywhere?

JimboZA:
Is there a maker's part number on there anywhere?

probably not. the board is only a holder for the pins and a couple resistors. all the un-used holes are for the myrad off parts the board is stuffed with. the 4 pins ? tact witch, other two, an led or IR emitter or flame detector.... one board, many uses.

you get what you pay for. in this case, it probably cost $1.00.

the spring is connected on one end. it would be easy to look at the board and see which end goes to what pin.

one of the pins, the center I think, is connected via the resistor. one of the side pins is wired direct without the resistor.
the remaining pin is open. circuit closes when the spring flails around inside the plastic enclosure. it will be slightly more sensitive one way than another.

arusr:
I tried S for signal, middle for 5V, and - for Gnd.

That would be correct.

The thing is, what sketch are you running on the Arduino?

The contact will be very brief, so you do not even necessarily expect it to show a decent flash on a LED unless the sketch emulates a monostable.

Show us your code!

Paul__B:
The contact will be very brief, so you do not even necessarily expect it to show a decent flash on a LED unless the sketch emulates a monostable.

For my clarity Paul... a monostable would be where a state is set when contact is made, so that the led would stay on even if the contact is lost, and would only go off with an explicit reset of some kind?

Ok, here it is. I'm just writing to the monitor if I see something, so the intermittent input should be OK.

int Shock = 3;// define the percussion Sensor Interface
int val;
void setup ()
{
	Serial.begin(9600);
	pinMode (Shock, INPUT) ;// define knock sensor output interface
	Serial.println("starting...");
}
void loop ()
{
	val = digitalRead (Shock) ;// read digital interface is assigned a value of 3 val
	if (val == HIGH) // When the percussion when the sensor detects a signal, LED flashes
	{
		Serial.println("I see shock!");
	}
{

Paul__B:

arusr:
I tried S for signal, middle for 5V, and - for Gnd.

That would be correct.

The thing is, what sketch are you running on the Arduino?

The contact will be very brief, so you do not even necessarily expect it to show a decent flash on a LED unless the sketch emulates a monostable.

Show us your code!

Since this sensor (correctly) includes a pull-up resistor and is active low, that code might be expected to continuously print an output. If it does not do so, then that indicates a fault in the code. I note "speed" is not defined.

int Shock = 3;   // define the percussion Sensor Interface
int val;
void setup ()
{
  Serial.begin(9600);
  pinMode (Shock, INPUT) ;   // define knock sensor output interface
  Serial.println("starting...");
}

void loop ()
{
  if (digitalRead (Shock) == LOW) Serial.println("I see shock!");
}

JimboZA:
For my clarity Paul... a monostable would be where a state is set when contact is made, so that the led would stay on even if the contact is lost, and would only go off with an explicit reset of some kind?

A monostable is a timed flip-flop, stays on after triggering, for a set duration. There are some variations in function according to whether it is "retriggerable" or not.

The intent of the code cited is a monostable of sorts, where the "on" time corresponds to the time it takes to generate the message.

Paul__B:
Since this sensor (correctly) includes a pull-up resistor and is active low, that code might be expected to continuously print an output. If it does not do so, then that indicates a fault in the code. I note "speed" is not defined.

Thanks Paul. I noticed that and corrected right before your post, sorry about that.

I was expecting the signal to be HIGH when vibration sensed, but what you said makes more sense. And actually looking more closely at the sample code on the seller's page, indeed the turn on the LED when the output is LOW.

Thanks for that. I was thinking it wasn't working when I kept getting the serial output, but that's probably the correct response.