This tutorial is based on the really useful project pages on the BirdNet-Pi Github repo and the BirNet-Pi project page. You could just jump straight over there and follow those instructions. What follows is a slightly modified set of instructions when doing this with a group of students.

Birdnet-pi homepage Page

To get started we need to get some software to setup the RPi - if you already have this then jump to the next step.

Download the Raspberry Pi Imager.

Raspberry Pi software

First off we are going to get the RPi fired up, to do this we setup an SD Card with the appropriate RPi OS.

Open up the RPi imager software (we used v1.7.2 for these notes).

Raspberry Pi OS

Select the checkbox and set what you think is a unique hostname (we will have 20 pis on the same network so need to call them something different!) and enable SSH.

Scroll down and set a password for you pi - make a note of this you will be using it today!

For the SSID use these settings:

and then hit save and click on Write. Be patient, this will take around 5 to 10 minutes.

Once you get the eject your card message then take it out and insert into the RPi, plug in the microphone and power it up.

Next step, power up your RPi and let's see if we can connect!

Use Terminal on a mac or Putty in windows (download Putty HERE) to connect to your RPi. The device is "headless" which means it doesn't have the software installed that allows it to draw pictures to a display.

On a mac this looks like:

SSH to Pi

At the command line enter:

ssh pi@rpi-birdneti2s-ucjtdjw.local

where HOSTNAME is replaced by (in my case) rpi-birdneti2s-ucjtdjw - the hostname you defined in the set-up phase.

If everything works correctly, you should now be in your RPi (inside the home directory of your RPi).

Open the link at BirdNet-Pi Github, copy the curl command half way down the page:

curl -s https://raw.githubusercontent.com/mcguirepr89/BirdNET-Pi/main/newinstaller.sh | bash

We sometimes need to fiddle with the microphones but we have found the USB Movo mics we are using tend to work straight away. Test the microphone using the following:

aplay -L
arecord -D default -c2 -r 44100 -f S16_LE -t wav -V mono -v file.wav 

the first command will list out the audio devices the RPi recognises, the second will record some audio, showing a volume so you can test if the mic is working and will record the audio to a .wav file.

If you want to test the .wav file open a new terminal window and copy the file across to your laptop and play it there using your laptop speakers (since the RPi doesn't have speakers!)

scp pi@rpi-birdnet-ucjtdjw:/home/pi/file.wav ~/Desktop/file.wav

Next open up Alsamixer to configure your sounds settings:

alsamixer

to edit the sounds settings:

USB microphones seem to default to pretty decent settings - we found we had to tweak these much more with the I2S microphones.

Open up Tools > Settings (the username is "birdnet" with no password)

Enter the lat long for the location where your device will be deployed.

Tools>Settings

The BirdNet-Pi webpage you are looking at is available on your local network - ie you need to be on the same network. There are some instructions for making the web page public but this requires you make the RPi on your network visible to the outside world and requires some network settings to be changed on your home network - this will not be covered here but the instructions on the repo are great!

To share the data you are recording we are going to use things:

We use a tool called MQTT Explorer download

To configure MQTT using Apprise we first need to install paho-mqtt and restart as per note here - run the following lines of code in the terminal, one at a time:

~/BirdNET-Pi/birdnet/bin/pip3 install -U pip wheel setuptools
~/BirdNET-Pi/birdnet/bin/pip3 install paho-mqtt
sudo reboot now

Once done configure in Birdnet setup using these settings:

mqtt://birdnet:PASSWORD@mqtt.cetools.org:1884/student/birdnet/YOUR_UNIQUE_ID

Copy and paste this into the Notification body and remove all text from the notification title.

{sciname: $sciname, comname: $comname, confidence: $confidence}

MQTT

If your device is up and running you should start to see classifications being made.

You can also see messages from other device using a tool called MQTT Explorer - install the tool and create a new connection using the following settings:

MQTT explorer

and you should see something like:

MQTT screen

As a final step we need to make sure your RPi can connect to your home network. We do this through editing a file which contains the list of networks your device can connect to. Enter the following in the terminal to access the "wpa_supplicant" networks file:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

You should see something similar to:

wpa_supplicant

Add a new "network" setting - copy everything from "network={" to the corresponding "}" and then add in your SSID details.

If you cannot remember your home SSID or password then there are a couple of things you can do when you go home:

From both of these run sudo raspi-config to enter the RPi configuration menu and set the wireless network in the "networks" settings.

Now that the RPi is working. Let's build the enclosure so you can install it outdoor at home.

You should have the following parts in front of you:

Step 1: Screw the cable gland on the side of the plastic enclosure, the longer part towards the outside.

enclosure1

enclosure2

Step 2: Pass the microphone through the cable gland, the microhpone head should be outside of the plastic box. Then, pass the USB cable with the USB C connector towards the inside of the plastic box.

enclosure3

enclosure4

Step 3: Cut a piece of double-sided tape and add it along the back of the RPi Enclosure. Stick the enclosure in the plastic box with both microphone and power cable already connected to the Rpi.

enclosure5

Step 4: Get the microphone head in the circle hole of the wooden bird's face. Then double-sided tape the back of the plastic enclosure to the back of the bird's face.

enclosure6

Step 5: Along the edge of the bird's face (at the back of it), make a thin line of wood glue. Take the bird's edge and place it around it, in the little holes. Press on it a little bit before adding the bird's back.

Make sure the cable gland is tight. Take the remaining part of the power cable and pass it through the hole in the back of the bird. Add delicately the back to the edge. Press on it for a while to allow the glue to dry.

enclosure7

enclosure8

Step 6: Now, add the pick to the bird. Use some wooden glue to hold it in place.

– End