Sound Responding Arduino Robot

Published

Introduction: Sound Responding Arduino Robot

About: GUYS FOLLOW US AT OUR FB PAGE ..DO LIKE ND SHARE ..OUR YOUTUBE CHANNEL IS S_R TRONICS...WATCH..TRY..INNOVATE..TASTE THE SUCCESS..THANK U..

hello guys ..this is our new project..thats called sound responding arduino robot..this robot is moves or changes direction by catching sound by sound sensor module....

so we are using sound sensor module for this project...

what is sound sensor?:-

The Sound Detector/sensor is a small board that combines a microphone and some processing circuitry. It provides not only an audio output, but also a binary indication of the presence of sound, and an analog representation of it's amplitude.

Sound sensors can be used for a variety of things, one of them could be turning lights off and on by clapping. Today we are going to use the sound sensor to a robo which will respond and moves with music, clapping or knocking....

Step 1: Components

Step 2: Circuit Diagram

follow above circuit to connect easily... so

we know that..l293d have 16pin..

8pin,1pin,9pin and 16pin of l293d is connect to +5v

4,5,12,13pin of l293d is connect to gnd............

2pin of l293d is connect to 8 pin of arduino

7pin of l293d is connect to 9pin of arduino

10pin of l293d is connect to 10pin of arduino

15pin of l293d is connect to 11pin of arduino

3and 6pin of l293d is connect to left motor

11 and 14pin of l293d is connect to right motor..

sound sensor module has 3pins...in which vcc to +5v and gnd to gnd

and output is connected to 6pin of arduino..

then connect your power supply through usb cable or battery jack properly..

Step 3: How It Works?

this robot is controlled by clapping hand or any sounds.. thats easy to catch for sound sensor module.

so this project is easy to make..

by coding, when a sound sensor catch a sound properly... then robot moves or changes direction..

if (digitalRead(sound)==0)
{

cont +=1;

delay(2000);

if(cont==5)

cont=0;

switch (cont)

{

case 0:

{

STOP();

}

break;

case 1:

{

Forward();

}

break;

case 2:

{

Backward();

}

break;

case 3:

{

Left();

}

break;

case 4:

{

Right();

}

break;

}

}

there is 5cases in coding,..

so.. after 1clap, robot moves in forward direction by case1..

then after 2nd clap, robot moves in backward direction by case2.

then, 3rd clap.. robot moves in left direction by case3.

and after 4th clap... robot moves in right direction by case4..

and after last or 5th clap... robot in stops condition by case0..

Step 4: Uploading Code

copy this code below... and paste to arduino.. then compile must.....

and last upload in arduino..

int sound = 6;
int m1_1 = 8;

int m1_2 = 9;

int m2_1 = 10;

int m2_2 = 11;

int cont = 0;

void Forward()

{

digitalWrite(8,HIGH);

digitalWrite(9,LOW);

digitalWrite(10,HIGH);

digitalWrite(11,LOW);

}

void Backward()

{

digitalWrite(8,LOW);

digitalWrite(9,HIGH);

digitalWrite(10,LOW);

digitalWrite(11,HIGH);

}

void STOP()

{

digitalWrite(8,LOW);

digitalWrite(9,LOW);

digitalWrite(10,LOW);

digitalWrite(11,LOW);

}

void Left()

{

digitalWrite(8,LOW);

digitalWrite(9,HIGH);

digitalWrite(10,HIGH);

digitalWrite(11,LOW);

delay(2000);

}

void Right()

{

digitalWrite(8,HIGH);

digitalWrite(9,LOW);

digitalWrite(10,LOW);

digitalWrite(11,HIGH);

delay(2000);

}

void setup()

{

//put your setup code here,to run once;

pinMode(6,INPUT);

pinMode(8,OUTPUT);

pinMode(9,OUTPUT);

pinMode(10,OUTPUT);

pinMode(11,OUTPUT);

}

void loop()

{

//put your main code here,to run repeatedly;

if (digitalRead(sound)==0)

{

cont +=1;

delay(2000);

if(cont==5)

cont=0;

switch (cont)

{

case 0:

{

STOP();

}

break;

case 1:

{

Forward();

}

break;

case 2:

{

Backward();

}

break;

case 3:

{

Left();

}

break;

case 4:

{

Right();

}

break;

}

}

}

Step 5: Results

how to make this projects step by step??...

this video helps you properly ...so plz visit this link and watch this video of our channel s_r tronics on yountube.

plz subscribe our channel and share our projects alsoo...

enjoy this video... dont forget to share, like, comments..

thank you...

plz click this button for subscribe

https://www.youtube.com/embed/u78h7_0YFLc?sub_confirmation=1

Share

    Recommendations

    • Make it Move Contest

      Make it Move Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Casting Contest

      Casting Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments