Clap counter using 8051 microcontroller
Introduction: The connections of different modules are
shown in the circuit diagram. The data pins of the LCD are
connected to port P2, while the control pins (RS, R/W & EN)
are connected to pins 1-3 of port P1of AT89C51, respectively.
The microcontroller receives sound pulses through the first pin
of port P0.
A condenser microphone is used to sense the sound produced
by the clap. This mic is connected to a two stage transistor
amplifier. The mic output is thus amplified to a suitable level so
that it can be detected at the TTL logic. A switching circuit
made from a single transistor is also employed after the
amplifier. The purpose of this circuit is to convert the analog
signals into discrete digital signals, which are used as input for
the MCU.
The output of the amplifier is coupled with a transistor switch.
Whenever a high voltage output is received from the amplifier,
it generates a pulse. The transistor switching circuit also
ensures that a high TTL logic is not received at the
microcontroller due to noise signals.
The pulse, from the switching circuit, is fed to the
microcontroller, which is programmed to detect the pulses.
Every time a pulse in detected, the count value is increased by
one. The output is displayed on a 16×2 LCD screen.
The sensitivity of the sound sensor can be increased by
improving the circuit of the amplifying unit. An op-amp can be
used to increase the sensitivity.
Circuit diagram:
Project Components:
    AT89C51 Microcontroller
    Condenser Microphone
    LCD
    Preset
    Transistor BC547
    Transistor BC548
Advantages:
1. The primary applications involves an elderly or mobility impaired
person.
2. We can turn something (eg.lamp) on and off from any location in the room
(eg. While lying in the bed) simply by clapping our hands.
3. Low cost and reliable circuit.
4. Complete elimination ofman power.
5. Energy efficient.
Disadvantages:
 1. It is generally cumbersome to have to clap one’s hands to turn something
    on or off and it is generally seen as simpler for most use cases to use a
    traditional light switch.
 2. Unless we use a filter in the circuit. It is not that advantageous. So that
    circuit activates only for clap of particular frequencies and then it becomes
    accurate.
Applications:
 1. Clap activated switch device will serve well in different phono controlled
    application.
 2. Clap switch is generally used for a light, television,radio or similar
    electronic device that the person will want to turn on or off from bed.
 3. The primary application involves an elderly or mobility impaired person.
                                    By,
                                    Sai vibhav- 17071A1099
                                    Varun reddy- 17071A10A0
                                    Rajiv nandan sangem- 17071A10A5
                                    Dhana sai-18075A1021