Sound Sensors

Robotics Sensors Two

Robotics

sound sensors

Sound sensors (called auditory sensors) uses are  pretty much self explanatory including clap, voice, safety and noise activated applications

Sound SensorsRobotics Clap Control

The programming for the Arduino microcontroller uses a switching threshold of 10.  The threshold can be adjusted depending on the load.   Switching of a plethora of possible load devices is made by using a relay module. The following code is to make the Arduino UNO control a 115volt lamp using a 5volt relay activated by sound.

// sound sensors

void  setup ()  {
serial.begin (9600) ;                         //Using serial port to check Analog value
pinMode (2,  OUTPUT) ;                //relay on Digital pin 2
}
void  loop ()    {
int  analog_val :                                 //analog value read from A0
static bool  relay_state  =  false;  //current state of relay
analog_val  =  analogread  (A0) ;
if  ( analog_val  > 10 )   {                  //trigger threshold
    // toggle  relay
    if  ( relay_state )   {
         relay_state =  false ;                    //relay was on now off
         digitalWrite  (2,  low) ;
          serial .println (analog_val) ;    //Print  analog value for debug purposes
      }
    else {
         relay_state  = true;
           digitalWrite (2, HIGH) ;            //Relay was off, now on
           Serial .println (analog_val) ;
       }
         delay (50)  ;                                        // wait for clap noise to subside
     }
}

Voice recognition is another great sound sensing capability available. EasyVR makes a multi-purpose speech recognition module kit designed to add versatile, robust and cost effective speech and voice recognition capabilities to virtually any application.

My next post will cover even more robotics sensors. these can also be used in conjunction with a microcontroller to add valuable features to the hobby or industrial Robots.

Please feel free to continue exploring my website. I will be adding more electronics and robotics concepts that will confirm or supplement your understanding of today’s technology.  Before leaving this post, I’d like to ask you to review two rules/laws needed in circuit analysis.  First the physics law of charges (Coulomb’s law) and second the direction conventional current versus electron flow.

Return to Robotics Posts List

Robotics Project

Back Pain Relief

Leave a Reply

Your email address will not be published. Required fields are marked *