These steps are optional if you use an already built Arduino microcontroller. However, since you are only using a small amount of its capabilities it makes more sense to make a barebones version of an Arduino that is much smaller and cheaper to reproduce. This section might be slightly difficult for someone with no electronics experience, but should be easy for anyone who has assembled a simple electronics kit. A "schematic" sketch for the electronics is attached. The schematic is highly derived from David A. Mellis's Atmega8 Standalone schematic
. If there is interest I will make a dedicated Instructable for this step. The decoupled power circuit is from Tom Igoe's Physical Computing book.
I included picture of the PC board version (with sensor/buzzer not connected) as well as a prototyping version built on a breadboard for reference. The breadboard version also shows how to connect the Arduino board as a USB programmer for the microcontroller chip. Since I used a DIP socket for the chip, I can also remove the chip and put it in an Arduino board to program it, but it can be tricky to pull the chip out without bending all the pins -- thats why i included the female header pins for the tx/rx. Even though the board is very cramped, you can see that all of the pins of the controller have a solder pad available to connect to. Since they aren't necessary for this project I did not solder female headers to the unused pins but if they were, you would have the full capabilities of an Arduino Diecimilia except on-board USB in a very small package. The width of the board is approximately one half of the Diecimilia board and about the same length. (here is a similar setup
.) It is optional to use a transistor to power the buzzer, the Arduino can provide enough current from the pin itself. However, using the transistor allows you to use other sound making devices other than a buzzer if you have one.