Saturday 21 January 2012

clap switch circuit


CLAP SWITCH CIRCUIT

A clap switch circuit is a classic beginner’s project. Equipment can be switched on and off by just clapping your hands. Add a tiny microcontroller and you can easily build-in some more useful features.
The microcontroller in this circuit makes it a simple job to add some useful features that are not seen on other clap switch designs:

Clap Switch circuit diagram– Changeover relay contacts enable the unit to be wired in conjunction with a manual changeover switch so

that manual override of the switched equipment is always possible.
– The unit is only responsive to a specific sequence of sounds i.e., two claps within a defined time window.
– A safety feature masks the input for a given time window if misuse (repeated commands) is detected (useful if children have discovered how it works).
The safety feature and two-clap sequence detector can be built using TTL or CMOS flip-flops but by using a single microcontroller the circuit can be greatly simplified. A mains power supply is included so no additional power source is required.
The Microchip flash PIC12F629 microcontroller is a neat device; the small 8-pin package contains a complete microcontroller including clock generator, reset circuitry, Flash ROM, RAM and EEPROM. Two of the eight pins are used for the supply connections while the remaining six are general-purpose I/O pins. A few of these pins have special function like the comparator inputs. The sound sensitivity of the circuit can be adjusted by programming the comparator threshold level in software.