LinkitONE Sound Sensor

by ssarthak598 in Circuits > Arduino

1105 Views, 11 Favorites, 0 Comments

LinkitONE Sound Sensor

IMG_0861.JPG

Want to test the sound around you? Wana make your new science project or just have some fun? Got a LinkitONE board? Then you are at the right place!

Here i'll show you step by step how to interface a sound sensor with your linkit board and then play with it!

i'll be using the sound sensor from grove as its much accurate than sensors available in the market.

What Do You Need?

IMG_0862.JPG

1) LinkitONE Board

2) Sound sensor (Any would work)

3) micro-USB cable (for programming)

4) battery pack

Assembling the Parts

IMG_0855.JPG
IMG_0869.JPG

Now assemble all the parts together.

First of all, connect the jumper wires to the sound sensor. Connect 3 wires to VCC, GND and AOUT pin of the sensor.

Now connect the sensor to the A0 pin of the board.

Pin connections:

AOUT - A0

VCC - 5V

GND - GND

Writing Some Code

Capture.PNG

The code is really simple here! There's nothing much!

We're just taking a analog reading from sensor about sound amplitude. We are first analyzing reading for 1/4 seconds and then giving back the readings.

CODE:

------------

int Sensor_Pin = A0;

void setup()

{ Serial.begin(9600);

}

void loop(){

int SensorReading = analogRead(Sensor_Pin);

Serial.print("Sound level is");

Serial.print(SensorReading);

Serial.print("%");

Serial.println();

delay(250);

}

------------

Okay, so now burn this code to your board.

Testing It Out!

IMG_0859.JPG
Capture.PNG

Now test your device!

Just burn the code on your board from the previous step and then start! Open the serial monitor on the modem port of your Linkit. Carefully observe your readings. They update every 30 seconds. You can even plot a graph using opensource tools available online such as plotty or ubidots.

Final Touches

Now build your own sound testing box!

You made your own sound sensor, but you can make a small box that you can carry anywhere you want and that can measure amplitude of sound as well!