HeaderProjectsReverse EngineeringContactHome

Sound Annoyer Title

Annoy main

     This project was born from my need to get back at a co-worker. He had been playing pranks on me for quite a while so I wanted to get him back. I had seen the "Annoy-a-tron" at Think Geek, but (1) it was too expensive and (2) it wasn't small enough. Also, I though it would be a pretty easy thing to make. I was right!


    This "Annoyer" basically emits a high pitched "beep" randomly every 2-15 minutes. The beep is very high pitched so it is impossible to find where this beep is coming from. No matter where you walk around the room, because of the pitch of the beep, you cannot tell if you are closer, farther, or even what direction it is coming from. The beep is just loud enough to annoy anyone near it -just ask my wife :) It runs off of a 3v cr2032 coin cell battery. I don't know exactly how long the battery will last, but mine has been going for 2.5 months in my co-worker's office and is still going strong (yes, I am evil :0) The Annoyer is based on a Pic10f202 microcontroller. This is a very cheap uController (about $.50). This project has very few parts as most of the work is done in software. I built the entire thing for about $2. Besides the battery and the microcontroller, it has a coin cell battery holder (I stole mine from a small electronic toy, but they can be purchased here at Sparkfun.) I also added a .01nF capacitor to cutdown on noise in case it is put near electronic equipment. I covered the top and the battery holder with liquid tape to make it black and keep the speaker from hitting the battery holder which is made out of metal. And lastly, besides a little wire to hook the stuff up, I used a very small piezo speaker. I got mine at Digikey, but just about any piezo speaker will do. I tried several and they all worked about the same, but I used this one as it was the smallest. Oh, and I also attached a strong tiny magnet to the speaker to stick this little devil to anything metal.




Annoy diagram 1

Here is a profile shot of the Sound Annoyer. You can see that overall it is very small. The top is the circuit board. I used a prototype board as it was such a simple design. Under that is the battery holder, which is soldered onto the pcb on top. On the bottom is the very thin piezo speaker. 

(Click on any image to enlarge)

Here is another profile shot from the back (and before the liquid tape was put on the pcb.) You can see the liquid tape between the metal battery holder and the metal piezo. You can also see the +3v and Piezo wires connecting to the battery holder. The ground wire has not been put on yet.

Annoy diagram 3
Annoy diagram 2

This is the PCB. You can see the 2 wires hooked up to the Pic: +3v and Piezo data line. The ground is soldered directly to the underside of the PCB.

This is the sound annoyer right before adding the liquid tape onto the top. As you can see, it is pretty small.


 

     The schematic is very simple. Basically the Pic is provided with Ground and power. GPIO0 triggers the piezo and a .01uF capacitor cuts down on noise.

Schematic
     

     The asm code and project can be downloaded here, but I wanted to mention a couple things. First of all, I started by programming an LFSR for the random number generator, but I then found a more novel way to create the random numbers. I wanted to be able to get a random number between 2 and 15 (the amount of minutes between each beep) but it dawned on me that the sequence does not have to be truly random. In other words, once started (ie the battery put in) it should be random, but it can have the same sequence everytime the unit is started as it would probably be turned on and left on. The way I accomplished the randomness was to take a number to start with, say "0', add 11 each time, mask out the upper 4 bits, and this would be my new random #. So if you started with 0 (which means 0 minutes when it first starts, hence beeping right away when you put the battery in it) and then add 11, mask out the upper 4 bits, you would then have 11 as your next number (obviously.) Then you would add 11 again, masking out the bits would leave you with 6:

Decimal      Binary

0               00000000             -1st random #

11             00001011             -add "11", which is the 2nd random #

22             00010110             -add "11" again gives you "22" but this is too high so...

6                00000110             -mask out the high 4 bits and you have "6"

     Continuing with this, the first several random numbers are: 0,11,6,1,12,7,2,14,8. This seems pretty random to me! Here is the listing that does this:

    movlw    0x0B                    ; We will add 11 each time   
    addwf    LFSR, f                 ;   to the LFSR
    movlw    b'00001111'         ; Make it 4 bit
    andwf    LFSR, w               
    movwf    count                    ; And just use that for count variable
    incf    count, f                      ; Add a couple so they're not too
    incf    count, f                      ;   close together - ie. "0" minutes
    incf    count, f

     So basically, we get a random #, wait that many minutes, and then sound the speaker with a quick beep. Simple as can be. Have fun annoying your loved ones!!!