The circuit consists of four major modules, namely, a sound sensor, an amplifying circuit, a control circuit and a display module. A switching circuit is also employed after the amplifier.
Any sound, say clap, is detected by a microphone (condenser mic) which acts as the sound sensor. 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.
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 pulses, from the switching circuit, are fed to the microcontroller AT89C51's pin which is programmed to detect the pulses. Whenever a high pulse at microcontroller input is detected, a message ‘HELLO WORLD’ is sent to a 16x2 LCD. The message remains on the LCD display for a short duration after which it is cleared again. The message is repeated whenever a high pulse (due to clap sound) is received by the controller.
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 P1, respectively. The microcontroller receives sound pulses through the first pin of port P0.