DIY clapper is the ideal gift for the laziest person in your life


If you haven’t yet wrapped up your Christmas shopping, you may want to consider building [AlanFromJapan’s] implementation of the ever-classic “Clapper”. With its theme song burned into the brain of anyone old enough to remember the 80s, the clapper was a wonderful device that certainly put the “L” in laziness.

Looking for an excuse to play around with an opamp and microphone [Alan] decided to build his own version of the Clapper based off this similar circuit, which he calls the ClapClap. He built the device using an electret mic that feeds a signal through a small amplifier on the way to the ADC of an ATmega328 microcontroller. The mcu constantly polls the ADC looking for the sound of clapping hands, a solution that works, but isn’t as clean as [Alan] wanted.

He went back to the drawing board, this time building a circuit around an ATtiny2313 microcontroller. Most of the other components remained the same, though the new, smaller design sports some nice PCBs he had made at Seeedstudio. Rather than constantly polling the ADC, this version of the ClapClap looks for peaks in the signal coming from the mic to identify the clapping of hands.

He says that the newer version works great, though he still has a software bug or two that need fixing before he parks himself on the couch for all eternity.

18 thoughts on “DIY clapper is the ideal gift for the laziest person in your life

  1. Out of curiousity, what can that blank/unlabled relay handle in the means of current?

    And please don’t “RTFM” me, I just worked a 8 hour night shift, and still have not been to sleep. What has everyone else here been doing all night? Jerking off?

    I say that because I know there will be at least one nay-sayer going “RTFM” MANNNNN. Maybe people will think twice now before they caustically explode at someone else in the comments here :)

    1. Not quite sure which you ‘mean’?

      The small black 8 pin chip is a ‘Holtek audio amp HT82V739′. On the opposite side of the board that big black thing looks like an Omron 5v 250v/Xa relay to me. Course many manufacturer use the same footprint/package but I am going to guess that is a G2RE (or G2R2) pad layout. Probably something like a G2R-24-DC5 (

      Does that answer your question?

  2. It would be more useful if one clap would activate one output, 2 claps second output, 3 claps something else. You could have several functions in this way.

    Board could wait for a few seconds once first clap is detected to “see” whether there will be more claps coming.

  3. Why do people feel the compulsive need to use a microcontroller on almost every single electronic project? This must be one of the instances were it is overkill surely? Fair enough for the ease of expansion but delays are for capacitors?
    The only reason I could possibly think of for a need on a microcontroller in a clapper would be if it was waiting for a computer to finish a task. clap to turn on and wait until done before shutting off to save power (not impossible in pure hardware but a lot easier in software (:

  4. How is this design so much better than the clappers of the 80’s that didn’t use a micro-controller but like, maybe 4 transistors ?

    Now if those 20 MIPS were used to recognize a specific sound, so as to make insensitive to, say, gunshots, dog barks or slammed doors, then it would be really interesting.

  5. Why NOT use an MCU? With the current design he can re-purpose the board to do something else, with little more than a firmware update.

    ‘Good’ programming style says you should write your code to be portable and re-usable, why not your hardware?

  6. As above…why not use an MCU? The cost is very close (if not cheaper in some cases), the capabilities are easily changed via firmware updates(as opposed to total redesign of the circuit), and (if you are smart and use ic sockets for the chip) you can easily reuse the MCU in another project if needed.

    Maybe an MCU is overkill….so are quad and 6 core CPU’s for the average user…so what?

  7. Why do people feel the compulsive need to denounce MCU use?

    Comparing it to discrete designs from the 80’s? Seriously, that was 30 years ago. Back then, were the same people complaining things weren’t done with vacuum tubes? :)

    4017 decade counters? One of those alone now costs half as much as the cheapest MCUs in my parts bin, which will typically replace several other components as well in any circuit I use them in.

    Want to add noise filtering, or other functions like a timed on period triggered by a specific clap pattern? With an MCU, it’s just a matter of updating software, not reworking most or all the circuit.

    And learning to use an MCU effectively is of far greater benefit to the average person than working out a design in analog or discrete logic.

    But I’m quite happy this isn’t made from a pre-built Arduino in shield format, like far too many other projects. That often is both wasteful and lazy. It’s so easy to get a bare MCU working, especially in DIP format.

    Regarding [AlanFromJapan]’s comment that an ATMEGA328 is too big, but necessary due to need for an ADC: I don’t know much about Atmel parts (I’m a Microchip man), but many MCUs have comparators that can be used as low sample rate integrating ADC with the addition of an RC circuit, even if the chip doesn’t have a real ADC.

    1. You are right to a certain point.

      The tube analogy is quite pertinent, but not in the way you think: it’s not because it’s old tech, that it is necessarily bad tech. Tube amps still sell well, and there are still tubes in radars and your microwave oven.

      I guess everybody is just disappointed that this project is really nothing original, at least not something that surpasses the capabilities of 30 year old hardware, with a half million more transistors, and still more expensive, and more difficult to build on top of that: you have to program the chip.

      Now, show me a programming prowess that actually makes something interesting and useful with the same limited platform, and I’ll be in awe.

  8. People use microcontrollers in everything for three reasons:

    First, the industry as a whole is shifting in that direction. Vendors find it easier to make products that can be debugged or reconfigured after all the soldering is done, and uCs make that theoretically possible, if not always easy. Moore’s law has made uCs cheap and small, so they’re becoming ever more cost effective.

    Second, a single uC can replace a whole pile of components. Doing complex logic in hardware usually takes lots of chips, plus caps, resistors, and diodes to get specific results. Traditional logic isn’t the best way to handle every problem, it’s just the set of stock pieces that people used to approximate uCs before they were cheap and plentiful.

    Third, uCs save you the trouble of having to actually design a circuit. You just wire up a few obvious connections, then start grinding code until you get something that does what you want.

    Neither discrete circuits nor uCs are automatically ‘better’ than each other, they’re just different approaches.

    I personally like to look for discrete solutions whenever possible because it keeps me thinking about how to solve specific problems. If I spend too much time coding, I tend to get sloppy. I spend two hours banging away at the keyboard only to discover that I’ve implemented a flip-flop or one-shot in software.

  9. Hi,
    I’ll try to answer a few questions as far as I was concerned.
    -> Why a MCU and not some RC + transistors or delay chip or …?
    As many said before me in this thread, mostly because I’m lazy (hence the whole project) and my limited electronic knowledge. I’m basically a software engineer, not electrical engineer. With one chip an a few lines of codes, I have the same results of 10+ basic components.
    -> ATmega328 is an overkill if you want an ADC?
    Yes indeed, now, I know. Attiny13 (8 pin package) is perfectly fine with lots of ADC. I even planned to redo the project with an Attiny13 but it would be 3rd iteration of the same stuff … maybe later.
    -> This is not better than 30 years ago stuff…
    Maybe, but depends how you think it. 30 years ago I bet some engineers dreamed of just “writing 2 lines of code and have the thing work instead of this mess of equations and solder for just turning that light on!”
    -> Multiple clap sequence and multiple results?
    Yeah, thought of it too, but I didn’t got the use at the time. By reusing this as a base project it can be very nice ! Keep me posted if you do it.
    -> This is not new.
    Yes, and ? To me it is :P

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s