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.

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

Arduino (Trinket) Twinkle Lights
Intermediate
  • 58
  • 2

Full instructions

Two or more strands of LEDs in a glass jar. Arduino-powered app that fades one up as the other fades down, then they flip roles.

Twitter Smart Home
Intermediate
  • 418
  • 7

Full instructions

Tweet to your timeline and control anything using a Raspberry Pi, Arduino, and the Twitter API.

Rocky Rover: Robotic Vision System PixyCam & Arduino 101
Intermediate
  • 4,858
  • 51

Full instructions

Using PixyCam and Intel Arduino 101 to drive this rover. Easy Robotic Vision system using PixyCam, rover reacts to the ball using Pan/Tilt.

Robot for supercool indoor navigation
Intermediate
  • 1,076
  • 13

Full instructions

The robot navigates indoor, in a pre-defined path, with high accuracy, and allows its real-time tracking on a phone. No GPS, No WiFi, No Map

Swimming Pool Lap Counter
Intermediate
  • 1,569
  • 11

I love swimming, but I tend to lose count of the laps, so I made this lap counter with an Arduino.

Replenisher
Intermediate
  • 1,379
  • 6

Work in progress

"You just say what the thing does and then you add '-er'." Replenisher keeps your fridge, office...stocked! Just scan! "I'm going on break!"

ProjectsCommunitiesContestsLiveJobsFree StoreBlogAdd projectSign up / Login
Respect project