Arduino

Clap Switch using Arduino

In this project we are going to make Clapper circuit using the concept of ADC (Analog to Digital Conversion) in ARDUINO UNO. We are going to use a MIC and Uno to sense the sound and trigger a response. This Clap ON Clap OFF switch basically turns ON or OFF the device, by using the clap sound, as switch. We have previously built Clap switch and Clap ON Clap OFF switch, using 555 Timer IC.

clap-switch-using-arduino

On clapping there will be a peak signal at the MIC which is much higher than normal, this signal is fed to the amplifier, though a High Pass Filter. This amplified voltage signal is fed to ADC, which converts this high voltage into a number. So there will be a peak in the ADC reading of the UNO. On this peak detection we will toggle an LED on the board, on each clap. This project has been explained in detail below.

MIC or Microphone is a sound sensing transducer, which basically converts sound energy into electrical energy, so with this sensor we have sound as changing voltage. We usually record or sense sound through this device. This transducer is used in all mobile phones and laptops. A typical MIC looks like,

condenser_mic

Determining the polarity of Condenser Mic:

MIC has two terminals one is positive and another is negative. Mic polarity can be found using a Multi-Meter. Take the positive probe of Multi-Meter (put the meter in DIODE TESTING mode) and connect it to one terminal of MIC and the negative probe to the other terminal of MIC. If you get the readings on the screen then the terminal of positive (MIC) is at negative terminal of Multi-Meter. Or you can simply find the terminals by looking at it, the negative terminal has two or three soldering lines, connected to the metal case of the mic. This connectivity, from negative terminal to its metal case can also be tested using continuity tester, to find out the negative terminal.

Components Required:

Hardware:

  • ARDUINO UNO, power supply (5v), a condenser mic (explained above)
  • 2N3904 NPN transistor,
  • 100nF capacitors (2 pieces), one 100uF capacitor,
  • 1K Ω resistor, 1MΩ resistor, 15KΩ resistor (2 pieces), one LED,
  • And Breadboard & Connecting wires. Software: Arduino IDE – Arduino nightly. Circuit Diagram and
  • Working Explanation: The circuit diagram of the clapper circuit is shown in below figure:
Clap Switch using Arduino

We have divided the working into four parts, that is: Filtration, Amplification, Analog-digital conversion and programming to toggle the LED

Whenever there is sound, the MIC picks it up and converts it into voltage, linear to the magnitude of sound. So for a higher sound we have higher value and for lower sound we have lower value. This value is first fed to the High Pass Filter for filtration. Then this filtered value is fed to the transistor for amplification and transistor provides the amplified output at the collector. This collector signal is fed to the ADC0 channel of the UNO, for Analog to Digital conversion. And lastly Arduino is programmed to toggle the LED, connected at PIN 7 of PORTD, each time ADC channel A0 goes beyond a particular level.

Read More Details:  Clap Switch using Arduino

Tags

Leave a Reply

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

Back to top button
Close
Close