SHOWALL FUN PRANKS HIGH VOLTAGE LAZARUS-64 PHOTOGRAPHY SPY GADGETS VIDEO GAME
Figure 2 - This is the basic Clap Snap schematic using an ATMega-88
Figure 2 - This is the basic Clap Snap schematic using an ATMega-88

The schematic is very simple, only using the ATMega-88, an LM386 audio amplifier and a few other semiconductors. Any high gain audio amplifier that can boost the output from the electret microphone would work, but the LM386 seemed to be very good at the task and is a common component. An electret microphone is a tiny "microphone in a can" that also includes a sensitive amplifier built in, and these can be found in just about any consumer device that requires a sound input. Old telephones, answering machines, tape recorders, and many toys have an electret microphone so check your "scrap pile" before looking to purchase a new one. An electret microphone will usually be about the size of a pencil eraser and have two wires on the underside, or two points to solder wires. One point will always be connected to the can, and this is the negative or ground side. This polarity is very important since the electret requires its own power source as shown in the schematic.

< Here is the Clap Snap AVR assembly source code>

< Here is the Clap Snap ATMega-88 HEX file>

The 10 K variable resistor biases the output from the LM386 amplifier to VCC so that the level of sound can be adjusted to help minimize false triggering if there is a lot of ambient background noise. The program code does a great job of detecting and counting three claps, but if the noise if overwhelming the ADC, there will be false triggering. The adjustment makes it easy to set the unit for proper operation in just about any environment. I added my variable resistor the PCB and only set it once, but I have not yet needed to make any changes. Adding it to the cabinet with a knob would allow fine tuning at any time.

The other components in the schematic make up the visible LED status lights and the infrared output that the Nikon camera will respond to. The visible LEDs are actually optional, but it does make it easier to see if the unit is operating and how it is responding to the sound. I also added a beeper that would alert me as to when the photo was being taken just in case I had to get ready for the shot. The toggle switch allows the system to work in sound activation mode or nonstop 10 second timer mode when you need to do some time lapse photography or just want a lot more than one image.



Figure 3 - Breadboarding a home built device makes debugging very easy
Figure 3 - Breadboarding a home built device makes debugging very easy

Even if you plan to build your version of The Clap Snap exactly as shown, it is highly recommended that you first build it on a solderless breadboard before attempting to hard wire the circuit. This makes it easy to program the microcontroller, test the operation of the unit, and of course make any necessary modifications to suit your needs. There are several free pins on the microcontroller and the program hardly uses any of the flash memory, so there is plenty of room for improvements and modifications to this project. My next version is going to have a full LCD and menuing system, but maybe you will beat me to it by expanding this project?

The values of the resistors on each LED shown in the schematic are based on the operating characteristics of the LEDs I have, so you will probably have to change them to get optimal brightness form your own LEDs. Try the 1 K resistor with the infrared LED at first and if you find that the Clap Snap does not work within 10 feet of the Nikon remote control eye, you can either study your LED datasheet to calculate the optimal value or drive the infrared LED with a transistor. Range is not a goal here since the Clap Snap is designed to be within a few feet of the camera, so the 1 K value should be enough to drive the infrared LED. Again, experimentation is the key, so mess around with the values and change the design as needed.

Back Home Last Next
You are Viewing... Page 2 of 11
Lucid Science Electronics from the Fringe AtomicZombie Hack-a-day SparkFun