SPARROW is an IoT platform built on top of Birdnet and Birdnet-Pi that utilizes GSM capabilities to create a real-time bird-tracking network.
To set up SPARROW, you will need the following:
- A laptop
- An internet connection
- A Raspberry Pi Zero 2W with GPIO pins (Soldering will be required if unsoldered version ordered)
- An SD Card
- An SD Card Reader
- A USB Microphone and Sound Card
- A GSM Shield
- A SIM card
- A Micro-USB cable
- A 12V to 5V buck converter
- A Lead-acid Battery
- A Lead-acid Battery charger
- A housing for the device
- Some wires
Follow these steps to install SPARROW:
-
Prepare SD Card:
- Install Raspberry Pi Imager from Raspberry Pi Software.
- Insert the SD Card into the card reader and connect it to your laptop.
- Click on "Choose OS" then go to "Raspberry PI OS (other)" and select "Raspberry Pi OS (Legacy, 64-bit) Lite" with the Debian Bullseye port.
- Click on "Choose Storage" and select the SD card that Sparrow will use.
- Click the gear icon in the bottom right to open the "Advanced options" menu
- Set the hostname to "sparrow". Now the installation will then be reachable at "http://sparrow.local" since that is the hostname that is set during this step.
- Select "Enable SSH" and select "Use password authentication".
- In "Set username and password." set credentials for the system.
- Configure the system's connection to WiFi by entering the network's name (SSID) and the password used to connect to that WiFi.
- Adjust the locale settings for your Time zone and Keyboard layout.
- Finally, you can save the settings and click "WRITE" to write the image to the SD card. Select "YES" and enter to allow your host system (the computer you're on now) to write the SD card.
-
Boot Up Raspberry Pi:
- Insert the SD card into the Raspberry Pi and connect the microphone and GSM shield holding the SIM card.
- Power on the Raspberry Pi and allow it a few minutes to boot up.
-
Connect to Raspberry Pi:
- Open the terminal on a Windows laptop by searching and opening "Terminal". Ensure that the laptop is connected to the same wifi as the Raspberry Pi!
- Connect to the Raspberry Pi using SSH:
ssh sparrow@sparrow.localor your configured hostname. You can paste code on the terminal using right-click on your laptop/computer.
-
Modify System Settings:
- Paste the following code into the terminal and press Enter.
sudo sed -i 's/CONF_SWAPSIZE=100/CONF_SWAPSIZE=2048/g' /etc/dphys-swapfile && sudo sed -i 's/#CONF_MAXSWAP=2048/CONF_MAXSWAP=4096/g' /etc/dphys-swapfile && sudo sed -i '/^exit 0/i sudo iw wlan0 set power_save off' /etc/rc.local - Paste
sudo raspi-configinto the terminal and press Enter. A configuration screen will open up. - Use the arrow keys to navigate to "Interface Options" and press enter.
- Now navigate down to "Serial Port" and press enter.
- To "Would you like a login shell to be accessible over serial?", navigate to and type the Enter key on "No".
- To "Would you like the serial port hardware to be enabled?", navigate to and type the Enter key on "Yes".
- Navigate to and type enter on "Finish".
- Reboot the Raspberry Pi when prompted.
- Paste the following code into the terminal and press Enter.
-
Run Installation Script:
- Reconnect to the Raspberry Pi via SSH.
- Paste the following command into the terminal:
curl -s https://raw.githubusercontent.com/madham97/SPARROW/main/newinstaller.sh | bash
-
Finalize Installation:
- After installation, the system will automatically reboot. Installation can take a while.
- Access SPARROW using the defined hostname (e.g., "http://sparrow.local").
- Go to "Tools" and provide credentials (default username is "birdnet" with no password).
- Open the "Select a Model" dropdown and select the "BirdNET_GLOBAL_6K_V2.4_Model_FP16" model. Set the "Species Occurence Frequency Threshold" to 0.0005.
- Set the Longitude and Latitude for where you want to deploy the device.
- Configure settings, including model selection, occurrence frequency threshold, location, and notification preferences.
- In Notifications select the "Notify each new detection" option and deselect the other options.
- Click on "Update Settings".
- Click on "Advanced Settings.
- Set "Minimum Confidence" to 0.5.
- Click on "Update Settings".
- Reconnect to the Raspberry Pi via SSH.
- Paste
nano /home/sparrow/BirdNET-Pi/scripts/utils/open.pyin the terminal. - Use the arrow keys to go to sim_pin and edit the replace the string with your sim activation pin.
- Press Ctrl+X. It will ask to confirm changes. Press Y and then Enter.
- Reboot the device for changes to take effect.
-
Device Setup:
- Charge the lead-acid battery using the charger.
- Connect wires from the lead-acid battery to the buck converter at the correct poles.
- Connect the micro-usb cable from the buck converter to the Raspberry Pi.
- House the equipment in the housing.
- Deploy at the desired location!
-
Observing results:
- You can see the live incoming classifications on the Thingspeak platform at the link: https://thingspeak.com/channels/2367077/