Things used in this project

Hardware components:
Mfr 25frf52 10k sml
Resistor 10k ohm
×5
Mfr 25frf52 100k sml
Resistor 100k ohm
×2
Kemet c315c103k1r5ta image
Capacitor 10 nF
×1
Panasonic eca 1hhg010 image
Capacitor 1 µF
×1
Texas instruments lm358ap image
Texas Instruments General Purpose Dual Op-Amp
×1
Mfr 25frf52 1k sml
Resistor 1k ohm
×1
Bourns 3362p 1 103lf image 160px
Single Turn Potentiometer- 10k ohms
2k pot is enough.
×1
1063 00
Adafruit Microphone Amplifier Breakout
General Electricite microphone is more than enough, we can make our own amplifier using above components.
×1
Software apps and online services:
Ide web
Arduino IDE

Schematics

Mic along with amplifier
here schematic circuit is attached. Before connecting to arduino an amplifier & offset zero level is used to make convenient to arduino.
Xer65nmgkwdbkw06i3il

Code

Leds dance to audio inputArduino
Interfacing microphone with Arduino. Generally, microphone can give output ranges of millivolts, but Arduino has scale range of 0-5 V. In this experiment to amplify the microphone signal, LM358n IC used. It's need single power supply so it can best suitable to Arduino platform. Some adjustments are made according to offset value which is absorbed on oscilloscope.
/*
 Mic is connected to arduino analog pin 2. red green blue leds are connected to digital pins of arduino.
 before connecting to arduino, use oscilloscope to check the input audio signal level and offset levels. Arduino has scale range of 0-5v 
 so we need to check offset value and according to that level map analog readings.

 3,5 ,6 are Pwm pins of arduino.. so can adjust in the range of 8 bit scale..
 */

#define microphonePin A2
#define Red 3      
#define Green 5
#define Blue 6
int sound;
int sound1;
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(microphonePin, INPUT);
  pinMode(Red, OUTPUT);
  pinMode(Green, OUTPUT);
  pinMode(Blue, OUTPUT);
}

void loop() {
   sound= analogRead(microphonePin);  // getting input audio signal readings
  
  Serial.print(sound);    // input audio signal readings to Serial display
  Serial.print(" ");
  if (sound>415)
  {
    sound1=map(sound,415,750,140,255);  //  mapping higher frequency values which are above offset to  the scale of 150 - 255
    }
    else if (sound>340 && sound <415)   // keeping offset reading to zero scale..here offset value in the range of 340 - 415(offset value at 1.45v) ..its depends on componets used in circuit..
    {
       sound1=map(sound,340,415,0,9);
      }
      else if (sound<340)
      {
       sound1=map(sound,0,340,10,139);// keeping below offset readings to scale of 1-139..
      }
     
      
   if(sound1>240)
        {
             digitalWrite(Red,HIGH);   // set the LEDs on
             digitalWrite(Green,HIGH);
             digitalWrite(Blue,HIGH);
        }  
        else if((sound1)>200)
        {
             digitalWrite(Red,LOW);   // set the LED off
             digitalWrite(Green,HIGH);
             digitalWrite(Blue,HIGH);
            
        }
        else if(sound1>160)
        {
             digitalWrite(Red,HIGH);   // set the LED on
             digitalWrite(Green,LOW);
             digitalWrite(Blue,HIGH);   // set the LED on
             
        }
         else if(sound1>120)
        {
             digitalWrite(Red,LOW);   // set the LED off
             digitalWrite(Green,LOW);   // set the LED off
             digitalWrite(Blue,HIGH);
             
        }
        
         else if(sound1>80)
        {
             digitalWrite(Red,HIGH);   // set the LED on
             digitalWrite(Green,HIGH);   // set the LED on
             digitalWrite(Blue,LOW);
             
        }
          else if(sound1>40)
        {
             digitalWrite(Red,LOW);   // set the LED on
             digitalWrite(Green,HIGH);   // set the LED off
             digitalWrite(Blue,LOW);
             
        }
          else if(sound1>10)
        {
             digitalWrite(Red,HIGH);   // set the LED on
             digitalWrite(Green,LOW);   // set the LED off
             digitalWrite(Blue,LOW);
             
        }
         else
        {
             digitalWrite(Red,LOW);   // set the LEDs off
             digitalWrite(Green,LOW);   // set the LEDs off
             digitalWrite(Blue,LOW);   // set the LEDs off
            
        }

  Serial.println(sound1);
 
  delay(10);
}
  

Credits

W6obyxyovjldregdcdqb
Babu Vaka

Passionate about new technologies, Want to explore as much as possible & wanna do some crazy things from scratch.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Reducing Arduino Power Consumption
Intermediate
  • 1,167
  • 98

Protip

One the most important feature of portable electronics should be long battery life. We can reduce the current drawn by several ways.

Smart Payment System for Parking Area Using RFID
Intermediate
  • 636
  • 11

This project makes a simple, cheap and secure payment system using RFID that is suitable for small businesses.

Ultrasonic Sensor
Intermediate
  • 250
  • 3

This project shows you how to use the Ultrasonic for meter distance.

RING PONG
Intermediate
  • 1,964
  • 8

A simple Ping Pong game played on a NeoPixel Ring with Arduino.

 Monitoring Working Time of Employees Using RFID
Intermediate
  • 538
  • 10

Full instructions

This helps monitor the working time of employees, storing information in database.

TV-B-Gun
Intermediate
  • 939
  • 12

Full instructions

A super-cool OFF remote for any TV: we take the famous TV-B-Gone kit and mount it inside an NES Zapper!

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login