- battery
- microcontroller
- speaker
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.
Remove these ads by
Signing UpStep 1: Parts Required
- 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)
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:
- Basic soldering skills - Soldering Tutorial
- Programming microcontroller - AVR Tutorial






































Visit Our Store »
Go Pro Today »




wouldnt adding a simple NPN transistor in between the attiny, the batteries and the speaker make the volume *much* higher??
* I am still learning about electronics
* I like the simplicity of just a chip with only power and output (speaker) (see these projects )
* It is loud enough for the 'victim' to hear, and yet not be able to locate
or at least, it might
my watch for instance has a pretty loud beep for its alarm, but you can't hear where its coming from
i *think* (no expert, so not sure) that thats becouse normally a sound is a wave form and a beep is more monotonous
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
or something like that, and im amazed if anyone would figure out my crappy explanation xD
im still learning too, but thats what sites like this are here for ^^
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?
More information of programming the micro-controller can be found in this tutorial (it is how I learned to program a micro-controller): http://www.ladyada.net/learn/avr/
"make: *** No rule to make target `minipov.hex', needed by `all'. Stop.
Build failed with 1 errors and 0 warnings..."
I modified the Beep.c file to increase the max wait to 15 minutes (from the original 10 minutes).
Usining the original "makefile" file I receive the above error when building in AVR Studio 4.18.
Thanks!
You should type: "make program-beep"
If you only type "make", you will get the error you describe.
This is an artifact of the fact the I used the same make file for several projects. When you simply type "make" it tries to build ALL of the projects. Since you do not have the other projects (minipov for example), you get that error.
How do I control the limits of the timer -- that is, can I make it beep randomly between, say, 3 and 9 seconds?
unsigned int secMin = 180; // Minimum number of seconds until beep
unsigned int secMax = 600; // Maximum number of seconds until beep
You can change the pitch by changing the following line in the beep.c file (about line38):
unsigned int freq = 6000; // Frequency of beep in Hz
Recompile the code with the Make file, and download to chip.
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)
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.
There are many options for the programmer. The USB programmer I used (USBtinyISP) costs $22. It requires assembly/soldering.
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:
Programmable LED
USB Capslocker
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.
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).