BirdNet-Pi: Techonology, AI, Nature and DIY all in one Project

BirdNet Logo

 I just got up and running with a new DIY project that absolutely amazes me.  It is called BirdNet-Pi and it is a software package running on a Raspberry Pi that uses AI analysis of audiograms to automatically identifies birds by sound in real time.  It is designed to run 24/7 and collects data on all of the birds it hears around your house.  It can even generate notifications that I can receive on my cell phone so I can come running if it detects a bird I haven't seen in my yard before.  Almost as amazing, it is a free, open-source project!

BirdWeather PUC Photo

I was clued in to this project by a Facebook ad for a BirdWeather PUC (shown above).  This is a standalone device that does much of the above- listens and identifies birds that it hears.  It is fully integrated with the BirdWeather website and shares its data to the BirdWeather database.  You can look up real time ID results for any PUCs that are shared on their map.  Pretty cool!  I wanted one, but at $250 it was expensive enough that I wanted to dig in deeper and make sure it could do everything I would want it to- primarily alert me in real time when it hears a species that is new to me or my yard.  It turns out it can't at this time, but they tell me that is an upgrade they are working on for the future.  

In browsing the Birdweather website, I came across info on BirdNet-Pi.   It is an open-source software program designed to run on a Raspberry Pi (an inexpensive single board computer based around an ARM processor with many peripherals and used by tinkerers for all kinds of projects).  It uses the same bird ID engine that the PUC and BirdNet use and packages it into a nice website that you access on your local wifi network.  If you want, you can integrate it with the BirdWeather website so the sightings and audio recordings are available to everyone.  Best of all, it supports a bunch of messaging services so it can alert you on your cellphone through one of the services.

Raspberry Pi Marketing Photo

To get started, I ordered an appropriate Raspberry Pi kit.  The BirdNet-Pi software supports Model 3b+ and Model 4b hardware.  I didn't see any mention of the latest Raspberry Pi 5 in the official documentation, but I believe some people are running on that.  Since I didn't already have any Raspberry Pi support stuff, I got a full kit with a Raspberry Pi 4b with 2GB of RAM, case, power supply, micro-SD card, micro-HDMI cable and heat sinks from e-bay for $63.  I planned to use an old USB webcam with a built-in microphone for the mic.  Here is the entire setup:

My Birdnet-Pi Raspberry Pi Setup with webcam mic


The kit arrived and I started my project.  This is where things start to get amazing.  If you've read some of my previous rants, you know I have little patience for bad software and command line interfaces that make you remember a bunch of flags or have to look up the command you need to accomplish even the most basic task.  I was a bit worried this project was going to devolve into that kind of stuff, but it didn't.  The first step was to image the Raspberry Pi OS onto the SD card.  This was accomplished from my Windows computer via an imager program with a nice GUI.  It worked flawlessly without having to use a single command line.  Because I am running the Lite version of the OS that doesn't have a desktop, I didn't bother hooking up a monitor or keyboard/mouse to my Pi.  Instead, I SSH'd into it via the network and a PuTTY terminal on my Windows machine.  This is a little more advanced but something I was familiar with already as an electrical engineer.  One note- the Pi OS imager allows you to set your host name and provide the credentials for your Wifi when you create the image, so the Pi booted right up and was able to connect automatically to my wifi network so I could access it via PuTTY.  I've never had any OS install go so smoothly!

PuTTY setup for SSH into Birdnet-Pi

The next step was to install the BirdNet-Pi software onto the Pi.  This did involve a command line fed in through the terminal.  It was a copy and paste from the installation instructions, but it was just one line, and it worked perfectly.  It took a few minutes to install and reboot, but once that was done, my bird identifier was up and running.  I plugged in the webcam microphone and it started listening.  I pulled up the web interface and hit my first problem.  Because it doesn't use the HTTPS protocol, just HTTP, my browser didn't like it and would only open it in a browser window signed in with my work ID and not my personal ID.  I have no idea what is up with that.  To test the installation, I played a Black Capped Chickadee call from my phone next to the mic... and the Pi identified it as some kind of woodpecker found in Thailand.  With an 84% confidence.  Uh oh.  I went into the settings and checked the longitude and lattitude for my location.  It looked basically correct, but I updated it more precisely to 4 decimal points and saved the settings.  On my next try, it correctly identified the call as a chickadee rather than a bird that has never been seen in my area.  I guess it just needed a reboot for the location info to kick in.

I moved my setup to a window and stuck the microphone outside under an eave and kept the Pi box plugged in inside.  It was dark by this point and all the birds had gone to bed.  The next day, a big storm with wind and rain raged all day.  I didn't pick up a single bird call.  I used the time to configure the notifications.  I picked Discord as the service to use since I already have an account and have it installed on my phone.  (It's the best way to get ahold of my kids these days 😏)  I needed to set up a Discord server and enable webhooks.  I plugged the ID info into my BirdNet-Pi settings and was able to send some test notifications that were received on my phone.  Sweet!  You can configure the notifications to just be sent on specific species, to exclude specific species, just notify on infrequent species, etc.  It appears to have enough options to keep my happy.

BirdNet-Pi Notifications Setup


Finally the weather cleared and I started picking up bird calls.  A Carolina Wren was first, followed by a Raven.  The Pi keeps the recordings so you can play them back and hear what the program identified.  It keeps charts and all kinds of frequency data.  Now, three days later, the weather is finally a bit nicer and birds are coming back to my feeder.  The Pi is picking up lots of regulars, plus an American Tree Sparrows which would be a new bird for the year for me if I can go ID it myself.

Here's an example of what the Birdnet-Pi has heard so far this morning:

BirdNet-Pi Overview of my detections


Here is an example of another page tracking the stats for all birds it has identified since I plugged it in 3 days ago:

BirdNet-Pi Species Overview



For the record, I have ID'd 71 species of birds from my yard as of the publishing date of this post.  New species are hard to come by, so hopefully this Pi will alert me to new ones and help me grow my list.  I am already planning to tinker and upgrade this setup.  I ordered a small, sensitive electret microphone and am going to solder up a low-noise, shielded wire and connect it to the Pi via a new USB sound card (adds another ~$15 to the cost of this project).  So, for $173 less than the BirdWeather PUC, I have a setup that is more capable (can send notifications in real-time) and configurable.  If you are at all interested in this kind of thing, I can highly recommend this as a fun and worthwhile project.

Comments

Popular posts from this blog

Dolphin S200 Pool Cleaning Robot Drive Motor Repair

A Call to End Discrimination

Car Shopping in 2023