loading

Used this sensor in this project. https://www.instructables.com/id/Jum-Jum-the-Jumping-Board/

Edit: 10 Mar 2016: Found some tips for circuit to work better - Must check last part.

Hello everyone. I am a graphic designer with a restless soul (my site http://www.inoace.com). I loved doing electronics years ago and than got busy with life and job. I am now blessed with some time ( rare now a days :P). This is my second arduino based project, I think i dived quite deep with first one, so many thing look easier now. https://www.instructables.com/id/Sparrow-My-Assist...

There are plenty of good and low cost vibration sensor on market, like this good looking (image)

https://www.adafruit.com/products/1766

Problem is I live in place, where I don't have either access to online shopping (yup living under rock) or local vendors sell expensive (if they willing to understand what you require). So looking at schematics and images and the restless soul of mine I decided to make my own sensor.

This sensor is going to be used in larger project, I am making for my son. I am successful in my test so I am sharing the knowledge, may it help someone.

This is inspired with this instructable: https://www.instructables.com/id/How-to-make-simpl...

and google search.

Things Required

- I used coated copper wire out old pc cooling fan, (can be found in various old things lying around).

- A Nail

- 220 ohm Resistor

Step 1: Process

1. Process is very easy. First rub the coated wire with sandpaper to make sure wire is clean and electricity can pass when it touches other pole.

2. Wound the cleaned copper wire on nail as per you desired length, you can take out and shake to check the bounce of spring, when thing are as per your taste, cut the extra wire.

3. solder the 220 ohm resistor to veroboard, as shown in picture, this way it will not only be a bit stable joint but also protect pins from too much current in case of accident. The resistor leg is touching the spring in pictures, that's because it is very sensitive and the board needs to be vertically straight (that's the sensitivity I was looking for). You can use thicker wire or real spring, depending what you need it for and how much sensitive you want it to be.

Lets check attaching with arduino.

Step 2: Vibration Sensor With Arduino

Lets attach it with arduino as show in above diagram). Here sensor is simply acting like a switch that turns on when vibrates. The CAPACITOR is necessary as it stables output, I guess the contact time is low for arduino to detect and i was experiencing not desired results. So what i think capacitor does is, on slight contact transistor amplifies the signal and capacitor stores energy to give a bit stable input to arduino.

Upon starting it arduino will digitalRead sensor, time to time. Digital read means, either its going to be ON or OFF (i.e. 0 or 1). One means the sensors contacts touched due to vibration, with following sketch the led on pin 13 of arduino will light up for 2 seconds.

Additional Edit: 11 March 2016

I have tested that we can also use analogRead to get results in floating points. This was you can set sensitivity inside program too.

Arduino sketch file attached.

Code:

int sensor = A5; // sensor pin
int led = 13; // default led on arduino

void setup() {

pinMode (sensor, INPUT);

pinMode (led, OUTPUT);

Serial.begin(9600);

}

void loop() {

int voltage = digitalRead(sensor); // read sensor here

Serial.println (voltage); // print voltage to serial monitor on pc

delay (1000);

if (voltage >= 1) { // if spring contacts on shaking

digitalWrite (led, HIGH); // turn on led to show that vibration is sensed

delay (2000);

digitalWrite (led, LOW); // turn off led now

} // end if voltage

} // end loop

THAT'S IT, ENJOY! share with me if you made something like this.

Step 3: Code - Sensitive Vibration

Previous code read sensor with digitalRead, where it can be only 1 and 0. If we analogeRead the sensor we can have very sensitive sensor. I have tested both and they both works satisfactory. Only difference in of preference and desired sensitivity.

Here is code

int sensor = A5;
int led = A0;

void setup() {

pinMode (sensor, INPUT);

pinMode (led, OUTPUT); Serial.begin(9600); }

void loop() {

int sensorValue = analogRead(sensor);

float voltage = sensorValue * (5.0 / 1023.0);

Serial.println (voltage); delay (200);

if (voltage >= 0.5) { // set sensitivity here, increase voltage 0.5 for less sensitive , decrease for more sensitive

digitalWrite (led, HIGH);

delay (2000);

digitalWrite (led, LOW); }

}

Very clever. You should call it KISS - Keep It Simple Sensor :-)
<p>Nice . I making a board for my son to jump on. If i name it KISS, I am afraid he will </p><p>squash the lips by jumping on it :P ;)</p>
clever. I am thinking that if you change how tall that coil of wire is, you can change the sensitivity...
<p>Thanks. Yes and thickness of wire can also do the job if short height is desired.</p>
<p>Nice idea. I wonder if your sensor would have a varying capacitance that could be measured? This would make it very sensitive. Thanks.</p>
Actually i accidentally analogRead instead of digital, the values were crazy, i plotted them to excel and made chart, it looked something like this. Since thats not what i was looking for I didnt saved it. Upon vibration the waves stretched vertically.

About This Instructable

7,914views

169favorites

License:

Bio: I am a designer with restless creative and restless soul. I like to make things.
More by ArifSae:Arduino Uno Steering Wheel Jum Jum  The Jumping board Vibration Sensor Homemade 
Add instructable to: