Building a Raspberry Pi-powered Barkometer, Part 1

I recently had a visit from my local animal control department. A youthful, uniformed guy rang the doorbell and handed me a letter. He told me that there had been a complaint from a neighbor (he, of course, was not at liberty to reveal the identity of the neighbor) about my dog barking.

This was unexpected because my dog, Harvey (he’s an Australian Shepherd), doesn’t bark that much and when he does, it’s usually just a couple of midrange yelps. He mostly barks when he exits the back door (he always assumes that there’s some critter that needs to be dealt with) and occasionally, if the birds dare to land on our trees, he’ll shout a few times but even then, it’s a brief protest rather than a drawn out rager. I’d argue that other neighbors’ dogs are far noisier than my dog.

Anyway, the nice young chap (he had that polite, wet behind the ears affect that makes old dudes like me want to call him “sonny” … I resisted the temptation) started to explain what I could do to control my dog whereupon I thanked him, took the letter (given the time and effort to personally deliver it, that letter must have had a value north of $100; good to see our tax dollars at work), shook his hand, and sent him on his way.

I’m pretty sure I know who made the complaint; it was one of our immediate neighbors who has been feuding with us on and off over the last year or so. I won’t bore you with the history of the conflict but it turns out other people have had problems with them so their complaining to animal control would not be out of character.

According to animal control, if there are more complaints they “will take action,” which raises the question of what, exactly, constitutes evidence of a dog barking “too much”? I figured it was time to go digital on the case …

Here’s my plan: Create a wireless Internet of Things device that records the sounds in my back yard and transfers time-stamped samples to a network attached storage device in my home office for analysis. I shall call this system the “Barkometer”

Raspberry Pi 2 Model B

There are three parts to this plan, the first of which was assembling the hardware. As I’ve been extensively covering the Internet of Things and most particularly Raspberry Pi technology, I had a Raspberry Pi 2 Model B ($35 from Element14) to hand, so that was the obvious choice. Note that because high input data rates are required to handle audio, an RPi 3 Model B might have been a better choice as we will see later.

gadgets

A Sabrent USB 2.0 External 2.1 Surround Sound Adapter and a Micro Innovations Mini Microphone

The RPi 2B has both digital and analog audio outputs but it doesn’t provide any audio input so my next task was a trip to Fry’s (the nerd’s equivalent of trip to Disneyland) for a USB audio adapter. The only USB adapter available a was a Sabrent USB 2.0 External 2.1 Surround Sound Adapter ($12.99) and I purchased a Micro Innovations Mini Microphone ($6.99) to go with it. Here’s the whole system assembled:

barkometerMark Gibbs

The Barkometer

 

So far, so good, and in the next part, I’ll discuss recording sound on the Raspberry Pi which, as you will learn, isn’t as easy as you might assume …

Comments? Thoughts? Connect to me or comment below then follow me on Twitter and Facebook.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top