My next door neighbors have recently been playing their music really loud so that I can hear it through the walls. I've gotten tired of having to bang on the walls each time to get them to quiet down, so I decided to automate some payback. The premise is that my device will listen for loud music playing through the wall, and when the volume breaks a pre-defined threshold and hears sustained music for 10 seconds it will start playing a CD player with annoying music and blast it back at them. After playing for a certain period of time it will pause the music and go back into monitoring mode. If the neighbors are still loud it will blast the music again and again indefinitely.

Watch the video to see the device in action!

Step 1: Supplies

I used the following items for this device:

1  Breadboard
1  Arduino  Uno
1  5v power source to power the Arduino (I powered it through USB from my laptop)
1  Electret microphone
1  Green 10 LED bar graph (individual LEDs will work too)
1  Red 10 LED bar graph (individual LEDs will work too)
1  Orange LED (or any other color)
1  NPN Transistor 2N3904 or similar
2  0.1uF capacitor
1  100k ohm resistor
2  10k ohm resistor
13 220 ohm resistor (Or whatever will run your LEDs at 5v)
1 CD player
2 Big ol' speakers
Connector wire

I ran out of outputs with the Arduino Uno so my volume meter only uses 2 of the red bars. An Arduino Mega would provide more outputs and make a better volume meter.

Step 2: Setting Up the Circuit

I fed the electret microphone signal through a simple preamp circuit that I found online, then into an analog input on the Arduino. The LEDs are driven directly by the Arduino outputs. To control the music I tapped an output into the play/pause button on my CD player. With my particular CD player the signal needed to be held high at 5V and dropping it down to ground activated the button.

You can download the Fritzing file of the circuit I set up.

Step 3: Programming the Arduino

You can download the attached sketch and load it onto your Arduino. The program will automatically run on powerup.

Some important notes about the code:

Line 7
const int threshold = 320;
This sets the threshold for triggering the playback. It should be low enough so that the neighbor's music makes our graph go into the red, but high enough so ambient noise won't set it off (like a loud car outside). Play around with this value to set it just right.

Line 9
These are all of the outputs that make up the LED bar graph. If you use more than I did, you will need to add the extra ports here.

Line 14
const long waitTime = 10000.0;
This is the 10 second wait period to avoid false alarms. You can change this as needed (the value is in milliseconds).

Line 15
const long cancelTime = 4000.0;
This is what defines "continuous" music during the waiting period. If the music stays below the threshold for 4 seconds then it cancels the waiting period and goes back to monitoring. You can change this as needed (the value is in milliseconds).

Line 16
const long playTime = 30000.0;
This is how long the annoying music will be played. It is set for 30 seconds but you can change this as needed (the value is in milliseconds).

Line 37
digitalWrite(playPin, HIGH);
This is the CD player control output. With my CD player the play/pause button needed a constant 5V and dropping it to ground would trigger the button. So here I am setting the pin high initially. If your CD player signal needs to be normally low, you can just delete this line.

Line 46
ledLevel = map(sensorReading, 200, threshold, 0, ledCount);
The 200 here eliminates ambient noise. When it was 0 the first couple LED bars would stay on constantly.

Line 83-85 and 91-93
digitalWrite(playPin, LOW);
digitalWrite(playPin, HIGH);
Again, this is for m y CD player which needed a normally high signal. If your CD player signal needs to be normally low, you need to swap the LOW and HIGH.

Step 4: Installing the Device

Once the circuit is all wired up and the Arduino is programmed, you are pretty much ready to go. I used masking tape to attach the microphone to the wall facing the neighbors. Make sure the CD player is on so that pressing the play button once will start the music. 

That's pretty much it! You can leave the system on while you are at home (although your own noise might trigger it), or set it and forget it when you leave.
I thought maby a thermal camera and a directional speaker but I can't afford that
I thought maby a thermal camera and a directional speaker but I can't afford that
This still doesn't fix my problem of my naibour repeatedly slamming there door early in the mornings.
Hey, <br>How did you connect the CD player to the arduino? <br>My CD player has 220v normal electricity connection while on the breadboard I have 5V due to Arduino.<br>So I can't figure how to play pause using Arduino. Could you explain? <br>Thanks
Fantastic - I have had noisy neighbors over the years and have used various amusing techniques to get them to shut up. Borrowing the kilowatt linear amplifier from the local ham radio club was a winner: I put the VOX (voice operated switch) on to a sensitivity such that once the noise got annoying it would key up the transmitter in AM mode and overload the stereo. The guy &quot;learned&quot; not to turn up his stupid stereo, and finally took it into the shop where they said &quot;nothing is wrong with your stereo&quot; - he was enraged that they didn't believe him that whenever he turned it up there was this thundering bassy sound :-) <br> <br>One guy played his TV too loudly so I wired some SN 7400 gates up with a capacitor to make an RF square wave oscillator with lots of nice harmonics. I just needed to tune the capacitor and poof - TV signal gone. Wouldn't work with cable obviously :-)
<p>Would had been better to get one of those TV be gone switches. Turn it off on him when it is too loud.</p>
<p>Dude this was in the 1980s - no such thing as a TV be gone switch then (though the 7400 chip oscillator was close...)</p>
Wouldn't it be easier to punch him in the face and tell him if he ever plays it loud again you'll be back angrier? One time fix. 0 Dollars.
<p>Not a one time fix, would end up paying for it in more ways than one. Going to jail and being sued for damages.</p>
Rather than punching him/her, would you not be better to borrow a dB meter and keep a record, so that you can have the neighbor charged with endangering your own hearing?
First, annoying noises are rarely loud enough to be dangerous. Second, there are surprisingly few legal remedies for noise pollution (especially if it's from a business)
Death Metal played at 90 dB isn't just &quot;annoying&quot;.
Yeah, except that it's an assault and/or battery charge if they decide to report it.
And then when you wake up in hospital with multiple broken bones and permanent disfigurement, you're told by the police that the guy you punched is actually a long time boxer.
thassaj, t=your comment below....can you explain how to do this and what to buy to put it together? I need help....now, urgent! <br>thassaj says: Jun 14, 2012. 11:24 AMReply <br>Fantastic - I have had noisy neighbors over the years and have used various amusing techniques to get them to shut up. Borrowing the kilowatt linear amplifier from the local ham radio club was a winner: I put the VOX (voice operated switch) on to a sensitivity such that once the noise got annoying it would key up the transmitter in AM mode and overload the stereo. The guy &quot;learned&quot; not to turn up his stupid stereo, and finally took it into the shop where they said &quot;nothing is wrong with your stereo&quot; - he was enraged that they didn't believe him that whenever he turned it up there was this thundering bassy sound
<p>I wish I had had your ingenuity. I asked everyone I knew for advice and everything failed. Smart, I agree with Honda 100 thumbs up.</p>
<p>OMG, I had this problem. The kid next door played his stereo loud, living in a condo, the walls are thin and others didn't know exactly where the noise is from unless it is your wall that is vibrating, kept calling the cops on me. I tried something similar to what you are doing. It didn't work. The kid started turning his stereo on as loud as possible and leaving the house. His mom worked at the post office and one day when she came home I tried to talk to her about it but she just shrugged me off. Cops at the house several times pounding on their door. It made the noise that much louder. They never did anything about it. Unless the parents experience the same thing they aren't going to do anything. They moved out of their room and gave the kid access to the room closest to our adjoining wall. I couldn't even put my condo up for sale because any prospective buyers wouldn't even consider living next to them. I had many walk away. I ended up where I stopped paying my mortgage, lived there as long as possible and later filing bankruptcy. Bancruptcy sounds worse than it actually was. Nothing was as terrible as living there. I hope that kid grew up and had horrible neighbors like he was.</p>
did it help?
I give this 100 thumbs up I hate annoying neighbors like that. I had some that lived under me that would blast their TV at 3am I started stomping around so hard it knocked their stuff off the walls and their light fell off the ceiling.
Try taking a Vibratory Sander, (with the sandpaper removed) mount the sander to a 3/16 thick 12&quot;x12&quot; steel plate. Then mount that steel plate to the wall or ceiling facing your neighbor&rsquo;s unit. Now make a circuit that activates the sander &ldquo;off beat&rdquo; to the beat being projected by your neighbor. Now you have a wall, that will vibrate &ldquo;off beat&rdquo; to your neighbors tune, essential screwing up every tune he plays too loudly.
People actually think that FREEDOM OF SPEECH extends to forcing others to listen to loud music and that is NOT THE CASE. Say what you want, just don't blast some crap music and think that everyone is going to enjoy it the way you do... Enjoy....
what I want to know is how do i make one for the a holes across the street that blows his stereo at 3am.
Umm. No they can't blast the stereo at 3AM. That's against the law in just about every town in the USA and the UK. And if it's from a car boomer, well, if it's the state of Florida, you're going to get a ticket. Call the cops.
Same rig, but mount the speaker at the end of the feed horn of an old satellite antenna so it becomes a directional parabolic speaker. You might need a second satellite antenna to make the microphone somewhat directional so the system only responds to sounds from that direction (more or less), or set it up so your mic and speaker are in the same place, but the rig cuts off the mic when it's driving the speaker.
Personally, I could justify an EMP cannon in this instance. Make sure they can't drive off before the cops can arrive. :)
Dude, this is freakin' awesome. Nice job!
I can see not many people think your design is practical.... I however spent atleast the past 3 minutes laughing on the floor... this is funny because THEY will think your sitting there with a boom box or whatever waiting for them to jack up there tunes. I can see them while your at work thinking they will be able to get away with it... lol... snope..
I would just call the cops.
Nice comment would be to say .. . it works. Yes, in theory and practice it works. Their music played, yours played too. To what end I don't know, theirs was STILL PLAYING. <br> <br>Here's an idea, go next door and ask them to turn it down? If they don't I am sure the Police will come and issue a noise violation . . . <br> <br>Yes, it works, nice setup, but I still think there are better ways.
Um yeah...... that works <strong><em>IF</em></strong> the offender isn't a marine celibrating the corps birthday and the cop that comes isn't also a marine a just takes the cd/ album away for the night..... knew a guy that had a brother that every year had a party for the corps and played the anthem untill dawn then would call up the &quot;Kommondaunt&quot; to wish him a Happy Birthday&quot;. Dang loud with 40 Marines next door....<br> &nbsp;
He clearly says in the instructable that he's asked them multiple times to turn it down. I've had neighbors like this, too, and once you've tried being funny, polite, firm, _and_ angry, then calling the landlord and complaining until she calls him about it -- and he's STILL loud -- there's not much left to do in the diplomatic column. Not every police department inundated with noise complaints has the resources or energy to respond to all of them.
Hey Dude- I'm the neighbor from downstairs. Just wanted to let you know, there is one final flaw to your elaborate system: Now I have TWO inconsiderate neighbors playing loud music above my head. Should I get one of your sensors so I can be number three, or should I just keep a record of the noise you two keep carrying on with and properly report it to the appropriate parties? <br> <br>Jus Sayin'-
It would be hilarious if two neighbors built a system like this. :)
Great Job Could it make silent dog whistle sound I have a very annoying ankle biter next door that goes berserk each time I open my door would like to be able to play sound at intervals when I am not around must be undetectable to the human ear.
A 40 hz test tone is really annoying. It's not really audible, but easily felt. Or, go to the other end of the spectrum. Depending on age, a high frequency tone is really annoying. There are web sites that demonstrate this. We tried this out at work. At my age (49) I couldn't hear a tone above 11-12 khz. A young woman, about 21 years old, walked into the office, with her fingers in her ears, trying to find the source of the painful screeching sound. Depending on the age difference between you and your neighbors, you may be able to set this so that they can hear it, but you can't. This might be a fun tool for a school teacher, or a librarian, or anyone else who deals with children. <br> <br>Age and cunning will always emerge victorious over youth and innocence.!
Obviously my ear-care protocol during my teenage did me some good. I'm close enough to your age, and I could clearly hear 14.5kHz, 15+ I could hear start and stop but not the actual tone. I don't know whether to blame my ears or the sound system (cheap computer speakers).
The 'higher' pitch is probably harder to drive through the wall though. 40hz is much easier, but obviously harder on the drivers. Unless you want to put a sizable woofer in the air vent next to the neighbor wall. Then things might start getting real interesting.
I always heard that ''Old Age and Treachery will always win out over Youth and Vigor'' I have used the 'high pitch' noise trick before, but just to aggravate my own kids.
SSB cb radio works well, put antenna against the wall, key up and yell, can you turn the stereo down please, works a treat!
His plan will not work. The doubling of the noise will only irritate the neighbor with the gun and then everyone with a speaker is dead meat. Easier to just get earplugs, or work some white noise that appeals to your personal taste in noise to flood your dwelling with during the neighbor's fit of music. Otherwise, just move to a different building to a corner room where you have NO neighbors to deal with...
Totally disagree there, sorry. My mother took that approach and ended up living in the loungeroom on a mattress on the floor listening to her own TV through headphones. <br> <br>I still like the idea of playing the offending material back at the offender, preferably at 4am.
I had a similar incident some years ago with some downstairs apartment neighbors. <br> <br>My solution was accomplished by using the following: <br>1) 75 Watt per channel stereo with volume almost to max (so I would not blow my amplifier or speakers). <br>2) CD player, with recording of Tchaikovsky's 1812 Overture (paused/cued up to about 10 seconds before the cannon's go off). <br>3) Pair of Big 18&quot; 3-way speakers placed with front side face down against my floor. <br> <br>When their music go too loud next time, I just un-paused the CD and let it &quot;rip&quot; until the cannons were done firing. Paused CD re-cued back to just before start of cannons again, waited a minute and NEVER had to do use it again! <br>
Pml!!! That is just so &quot;Clockwork Orange&quot;. I love it. Just thinking... I could do that with 1600 watts.
Here's the next step: <br>Use a small microphone to record what they're playing, and use a surface transducer mounted on the wall to play their own audio back at them, but delayed by .7 second. <br> <br>They will go insane in short order. <br> <br>you'll need to record from a position far away from your own transducer to avoid a feedback loop, but putting a hole in your own wall (.5&quot;), and putting the mic in the wall hopefully right behind their audio source will do it. Just isolate the mic with some foam around the cord where it touches the wall. Put your transducer as far away as you can while still being on the shared wall. <br> <br>I know this will work. Really.
This is exactly my thought. It doesn't have to be music. It can be domestic arguments, the sport on TV, anything that is disruptive. I like the .7 second delay, but then you have to filter that out of your own input, else you'll get a feedback loop that could turn into an increasing echo instead of decreasing.
LMFAO! Have it playing them cussing themselves trying to figure out what's going wrong would be the icing on the cake as well! It almost makes for a sitcom.
This is a good system, but music vs music isn't a good idea, i though in this: search his phone number on the phone book, or call to get it, then, adapt this system, instead to the CD player, to an old cellphone which has fast dial, you can hide your number, and when he plays the music, it will automatically call infinite times until the neighbor turn the music down. :D
I have a solution that works great. It's called, &quot;Scotts Grey Pipes &amp; drums&quot; played at a higher level. Warn the neighbours first. ;-)

About This Instructable




More by jamilinventioins:How to Deal with Noisy Neighbors 
Add instructable to: