About This Project
This is a device that simply listens for loud sounds, like barking, and looks for motion present and records the events. I created this project because one day I came home to my dog barking and thought how long had he been barking. I could hear him down the hall when I walked into the building. I live in condos btw so I don’t need him barking all day long and making my neighbors upset. Or more to the point why is he barking??? So I thought, “Hey, I got these mic boards laying around from a sensor kit; lets see if I can catch if he is doing it a lot! Oh and I got this PIR motion detector, lets slap that on also!”
When i created the first iteration it only had one mic board for sound detection but I was having problems with it either being way too sensitive or not sensitive enough. I couldn’t find the ‘sweet spot’. So my solution was to not only add another mic, but to add adjustable thresholds for when they consider the reading to in fact be barking. I have one mic board turn pretty sensitive but with a higher threshold and the other with low gain and a lower threshold. It works pretty good together. Also on the first iteration I had a lot of problems with the mics picking up the radio rx/tx because it was so close to the esp8266 module. It also created voltage fluctuations slightly which wasn’t helping. I added 2 capacitors & lowered the esp8266 tx power and it almost got rid of it all. Just recently when I was testing a couple new ESP8266-01S chips, i noticed that the “S” chips completely eliminated the noise from the tx signal & voltage fluctuations. Yay
The settings/how to run it are as follows:
- Arm - resets all counts & starts recording event counts for motion & sound. Both mics must detect the sound at once for it to register as a bark.
- Notify - turns on text messaging & will send a text when motion is detected.
- Raw Values? - This live updates the raw values to the dashboard - This WILL slow down polling interval of the mics/motion substantially possibly missing barks or motion events. Just to test & see your average levels
After some playing around with the threshold settings I got it pretty tuned in to identifying when he is barking or not. Turns out overall he is a good dog.
This project currently used:
Arduino Uno R3
2x Analog sound microphones
Motion Detector HC-SR501
plus some small parts- AMS1117, capacitors, etc…
Triggers & Alerts
I didn’t use too much for alerts or triggers with this project. Just one trigger that is used for notifying me, if intrusion/motion is detected & I have the “notify me” button enabled. I may add a LED on the board to indicate when motion is detected or bark detected. Maybe a Neopixel strip that also counts the events?
I have the device arm itself everyday at 9am and disarm at 4pm otherwise I always forget to turn it on and then it won’t keep count.
Photos of the Project
no video yet…