How to Deal With Noisy Neighbors





Introduction: How to Deal With Noisy Neighbors

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.



  • Epilog Challenge 9

    Epilog Challenge 9
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
  • Paper Contest 2018

    Paper Contest 2018

We have a be nice policy.
Please be positive and constructive.




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.

How did you connect the CD player to the arduino?
My CD player has 220v normal electricity connection while on the breadboard I have 5V due to Arduino.
So I can't figure how to play pause using Arduino. Could you explain?

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 "learned" not to turn up his stupid stereo, and finally took it into the shop where they said "nothing is wrong with your stereo" - he was enraged that they didn't believe him that whenever he turned it up there was this thundering bassy sound :-)

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 :-)

Would had been better to get one of those TV be gone switches. Turn it off on him when it is too loud.

Dude this was in the 1980s - no such thing as a TV be gone switch then (though the 7400 chip oscillator was close...)

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.

Not a one time fix, would end up paying for it in more ways than one. Going to jail and being sued for damages.

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?