This is a tiny circuit that anyone can build to annoy friends and family. It features a piezo buzzer to provide unwanted auditory stimulation, and an LED to blink in the wee hours of the night. The circuit board is small and simple enough that anyone can assemble it in a matter of minutes, yet diverse enough that you can have fun creating different programs for weeks. Improve your soldering, programming, and inventing skills with this easy project!
Order the Circuit Board
You can purchase the printed circuit board (Figure A) from OSH Park. You by no means need to use an ATtiny or my own PCB; this circuit would take a grand total of about 20 minutes to assemble on any breadboard. If you want the circuit to be tiny, however, I would go with the PCB option. If breadboarding it or perf boarding it does interest you, the breadboarded version is shown in Figure B. You could swap out the ATtiny85 for any microcontroller.
Solder the Non-Polarized Components
The slide switch, resistor, and DIP socket in this build are all non-polarized. This means that the orientation in which you solder them doesn’t matter. Solder these onto the PCB (Figure C) and make sure the connection is solid, then clip the excess leads off the back of the PCB.
Solder the Polarized Components
The LED (Figure D) and buzzer (Figure E) are both polarized, so the orientation of these components does matter. The shorter, negative (–) lead of the LED goes through the hole opposite the white rectangle on the PCB, and the longer, positive (+) lead through the closer hole. The shorter lead of the buzzer (the side marked negative) goes through the square solder pad, and the positive lead through the round pad. Clip off the excess leads once again.
Solder the Battery Holder
The only tricky part of this project is getting the battery connector soldered. Make sure you solder all the components on the front ﬁrst. You can then solder the ground pin of the battery connector (Figure F) to its pad through the hole in the center of the DIP socket. The positive lead is easy by comparison. Now place the battery.
I have also included a white silk-screen rectangle on the PCB in case you want to write your prankee a small message. If you would like to customize the PCB, just duplicate my circuits.io design ﬁrst.
Explore the Software
I have created a variety of different example sketches that you can use with this circuit. Don’t just use my provided sketches, though! Try and come up with some of your own. For example, you could improve upon my initial design by using the LED as a light sensor to only chirp at night.
Program the ATtiny
Before placing the ATtiny85 into the DIP socket, plug it into a breadboard ﬁrst so you can program it (Figure G). There are a wealth of tutorials online that show you how this can be accomplished with an Arduino Uno, but I like this one in particular.
Put the ATtiny85 into your PCB
The orientation of the ATtiny85 in the DIP socket is extremely important. The dot in the top left corner of the ATtiny85 needs to be on the side of the socket closest to the slide switch and not the LED (Figure H).
You now have a fully functional annoying machine! Depending upon where you source your parts these babies can cost you less than $5; it’s relatively inexpensive to make many of them.
Planting this device is half the fun. They’re small enough to be placed in potted plants, small boxes, pillows, inside lamps, on desks, and anywhere else you can imagine! Add a magnet and try throwing it someplace metallic and out of reach. If you use a watchdog timer to put the ATtiny to sleep, your circuit can run for over a year on a coin cell battery.