Play a prank on your friends (enemies?) by hiding a high-pitched beeper which sounds off at random time intervals. This instructable uses minimal parts. All that is required is:
  • battery
  • microcontroller
  • speaker

Why don't I just use a 555 timer chip? You certainly could. I like this method because:
1. The ability to beep at random intervals
2. Minimal parts needed (simplicity/elegance of design)
3. I wanted to use a microcontroller (because I recently started the journey of learning about microcontrollers)

This project was inspired by an article in MAKE magazine about making a similar device with a 555 timer chip.

After making my prototype, I searched instructables.com and found the Raven, which is a similar beeping thing using a microcontroller. I decided to add my instructable because it uses less parts and has random intervals.

Step 1: Parts Required

Besides the 3 basic components, I used a couple of other parts to help assembly. Here is a full parts list required for my final version:
  • ATtiny13 microcontroller (Sparkfun.com)
  • AA batteries (3)
  • Battery Holder with switch (Digikey part # SBH-331AS-ND)
  • 8-pin socket for microcontroller
  • Speaker (small 8 Ohm or piezoelectric buzzer)
  • Silicon adhesive (RTV)

You can make this project with almost any battery, microcontroller, speaker combination. The pictures for this step show parts I had around the house.

I made this entire project from parts I had in the house. You can use almost any battery(s) that has a voltage within the microcontroller's range (1.8-5.5 Volts for the ATtiny13). The higher the voltage, the louder the beep.

Almost any small speaker will work. You may want to experiment with different small speakers. I chose the speaker with the plastic membrane because it didn't make a click noise at the end of the beep like some other small speakers.

You can adapt the source code for other microcontrollers. It would potentially only require a change to the timer register settings.

Skills Required:
<p>I will pay for someone to build one. I need to install in a police chiefs vehicle. ASAP evil grin</p>
Ok, so I followed all the instructions and it would beep for ten seconds and then not beep again. I tried reprogramming the chip and even tried changing the intervals and frequency. Tried 3 different chips, and now as soon as I apply power, I get 2 faint clicks from the speaker and that's it. Tried 3 different speakers and I get the same thing. I've spent several hours trying to troubleshoot it and all I get are clicks. Help please!
Is there a way to make the frequency higher so humans can't hear? Either to stop dogs from barking, or giving someone a head ache from the waves... that they can't hear, haha. Let me know, thanks!
Yes, you can make the frequency higher so humans can't hear. Most adults can't hear 20000 Hz. Simply change the frequency value near the top of the source code and rebuild.
i was thinking...<br>wouldnt adding a simple NPN transistor in between the attiny, the batteries and the speaker make the volume *much* higher??
Great idea! I didn't add a transistor for 3 reasons:<br> * I am still learning about electronics<br> * I like the simplicity of just a chip with only power and output (speaker) (see <a href="http://www.evilmadscientist.com/article.php/ledholiday">t</a><a href="http://www.evilmadscientist.com/article.php/ledholiday">hese projects</a> )<br> * It is loud enough for the 'victim' to hear, and yet not be able to locate
well, i dont think louder will make it easyer to locate<br>or at least, it might<br>my watch for instance has a pretty loud beep for its alarm, but you can't hear where its coming from<br><br>i *think* (no expert, so not sure) that thats becouse normally a sound is a wave form and a beep is more monotonous<br>we hear where a sound is coming from by the slight delay from when it reaches the ears, and a beep might be monotonous enough so that the delay doesnt work<br>or something like that, and im amazed if anyone would figure out my crappy explanation xD<br><br>im still learning too, but thats what sites like this are here for ^^
I have a great idea for this.<br>Maybe if we set the time between the beeps to 1 second, duration to 5 milisecond, we could get something like the C4 from Counter-Strike, right?
Is that what the socket thingie is for?
Using the socket allows me to solder the parts together and glue them down, but easily remove the micro-controller and re-program it when I want to change sound pitch or the minimum or maximum time between beeps.<br> <br> More information of programming the micro-controller can be found in this tutorial (it is how I learned to program a micro-controller): <a href="http://www.ladyada.net/learn/avr/">http://www.ladyada.net/learn/avr/</a>
You're awesome.
Funny and spooky. I made one of these beepers from a 555 back in 1989 or so. I found that placing it under their chair was the best place -- they could not figure out where the noise was coming from! It's interesting to see how different people react. One guy just sat and stewed in misery. Another - my boss (yes, I was that dumb) - also wrote down all the times on a Post-It note! In fact he (experimentally and statistically) found the beep period to a greater accuracy then I had calculated it! He had removed ceiling tiles in his office looking for it. Oh, was he pissed at me! Fortunately, I was not fired.
Thanks! That did the trick. I was using AVRStudio initially and it was trying to run the whole file. Going linux, in a terminal session built the .hex with no problems, calling out &quot;make program-beep&quot;. Now it looks like I have to reset the fuses on my ATTiny13. I breadboard tested yesterday and got nothing - but I had the fuse settings incorrect from a previous project. Thanks again for the help.
Any idea, why I would receive the followng error? <br> <br>&quot;make: *** No rule to make target `minipov.hex', needed by `all'. Stop. <br>Build failed with 1 errors and 0 warnings...&quot; <br> <br>I modified the Beep.c file to increase the max wait to 15 minutes (from the original 10 minutes). <br> <br>Usining the original &quot;makefile&quot; file I receive the above error when building in AVR Studio 4.18. <br> <br>Thanks! <br>
Are you sure you typed the make command correctly (Step 3, #3)?<br> You should type: &quot;make program-beep&quot;<br> If you only type &quot;make&quot;, you will get the error you describe.<br> <br> This is an artifact of the fact the I used the same make file for several projects. When you simply type &quot;make&quot; it tries to build ALL of the projects. Since you do not have the other projects (<a href="http://www.ladyada.net/make/minipov3/download.html">minipov</a> for example), you get that error.
Hi--<br><br>How do I control the limits of the timer -- that is, can I make it beep randomly between, say, 3 and 9 seconds?
If you open the beep.c file (from step 3), change the following lines near the top of the &quot;main&quot; loop (approximately line 36-37):<br><br> unsigned int secMin = 180; // Minimum number of seconds until beep<br> unsigned int secMax = 600; // Maximum number of seconds until beep<br>
How shall I make the sound go up and down?
&nbsp; Do you mean a change in pitch/frequency?<br /><br />You can change the pitch by changing the following line in the beep.c file (about line38):<br />unsigned int freq = 6000; // Frequency of beep in Hz<br />Recompile the code with the Make file, and download to chip.<br /><br />If you want the pitch to change after each beep: this could be done but would require changing the code to support that (change the above variable, freq, as it is running instead of being constant)<br /><br />If you are asking about volume: this is a function of the input voltage (batteries) and the speaker used. Increase the voltage, but do not exceed max voltage for the chip. Try different speakers to get louder sound.<br />
This is another "log" from another office victim. Note the times: 8:40, 55 (8:55), 58, 03, 11 (9:11) The random interval really pays off.
i like how u combined the battery case and power switch along with mounting the entire circuit right on top of it.... all together
LOL how much do usb micro controllers cost? i suck at programming -__-
The chip itself costs $1.94 from <a rel="nofollow" href="http://www.sparkfun.com/commerce/product_info.php?products_id=211">Sparkfun</a>. However, there is the one time cost of the programmer.<br/><br/>There are many options for the programmer. The USB programmer I used (<a rel="nofollow" href="http://www.adafruit.com/index.php?main_page=product_info&products_id=46">USBtinyISP</a>) costs $22. It requires assembly/soldering.<br/><br/>Once you have the programmer, the AVR family of chips are very inexpensive ($2-$10), and have a lot of features for the money. A couple of my favorite projects are:<br/><a rel="nofollow" href="https://www.instructables.com/id/Programmable-LED/">Programmable LED</a><br/><a rel="nofollow" href="http://macetech.com/blog/?q=node/46">USB Capslocker</a><br/><br/>You do not need any programming skills for any of these projects. The binary file to upload to the chip with the programmer is included.<br/><br/>For my Annoying Beeper project, it is easy to change parameters such as tone, duration, etc. The values are assigned to variables near the top of the file. Change values, build, and go (annoy people).<br/>
awesome im going to have some fun with this
I made one of these many years back and you can really drive people mad with them {evil grin}. The noise mine made was a short ascending frequency burst so it sounded a bit like a cicada. My design used a PAL (Programmed Array Logic) which was a predecessor to the microcontrollers in use today.
1st victim today. My coworker said the beeping was "driving me crazy". She could not figure out where it was coming from. She mentioned it to 2 others, but I was the only one who happened to be in her office when it beeped. When it beeped while I was in her office, she immediately wrote down the time. This image shows her time log of every beep while she was in her office. This is where the random interval was great. Near the end of the day, I sat in her office and said I thought I knew where it was coming from. I reached under her table and ripped it free from the Velcro. She screamed and was shocked that it was caused by me all along. We got a good laugh, as well as the people in the surrounding offices.

About This Instructable




More by samirsky:Bug in the toothpaste prank Annoying Beeper 
Add instructable to: