bird feeder monitor v2.0
This is a project to monitor, photograph and record the number and time of birds visiting our bird feeder.
Multiple raspberry pies (RPi)
For this project.
A photo used as a capacitive touch sensor Adafruit CAP1188 for detecting, recording and triggering bird feeding.
Another RPi is configured to control the operation of this monitoring system and to store and maintain data for monitoring and analysis.
* For wind proof cases printed in 3D, this is a monitoring system designed to count, record and photograph birds fed in our bird feeder.
My previous version of the bird feeder monitor uses Arduino Yun and stores the data in a spreadsheet on my Google Drive.
This version uses multiple Raspberry Pi, MQTT communications, and local storage of data and photos.
The bird feeder is equipped with Raspberry Pi Zero W and capacitive touch sensor (CAP1188).
Any bird in the habitat starts the touch sensor, which starts the timer to determine the length of time each event lasts.
Once the touch is activated, the bird feeding monitor posts the \"Monitor/feeder/picture\" MQTT message.
This message informs the Raspberry Pi camera to take pictures.
If the MQTT Server issues a \"monitor/feeder/getcount\" message, the bird eater monitor will respond using the \"Monitor/feeder/count\" MQTT message that the server will store.
The MQTT Server performs several tasks.
It requests and stores data from the bird feeder monitor and controls the operation of the monitor.
It activates the display at dawn and turns it off at dusk.
It also controls the time interval for requesting data and monitors current weather conditions through DarkSky.
Weather conditions were monitored for several reasons.
First, rainfall can affect the sensor.
If this happens, the sensor will be re-calibrated regularly when it rains.
The second reason is to monitor and record weather conditions related to bird count data.
The Raspberry Pi camera is the RPi Raspberry Pi camera module.
Camera software for this project is not suitable for USB webcam.
The RPi camera is equipped with WIFI and is running the MQTT client software.
It subscribes to the \"monitor/feeder/picture\" MQTT message and takes pictures every time it receives this message.
Photos are stored on RPi cameras and managed remotely.
Install the latest version of raspberry Lite on Raspberry Pi Zero W
I suggest following the steps belowby-
Instructions for the steps that can be found in Adafruit\'s Raspberry Pi Zero headless quick start.
The instructions above contain the following steps, but it is worth repeating: connect to the RPi via ssh and run the following commands: the above commands take a while to complete, but running these commands ensures you-to-
Date of the latest package.
Next, run the following command to configure the RPi software: change the password, enable SPI and I2C, and expand the file system.
Once these are done, then exit raspi-config.
Raspberry Pi W (RPi)
The CAP1188 is wired using I2C.
There are other capacitive touch sensors with one, five or eight sensors.
I chose eight because my bird feeder had six sides.
Wiring: the power supply for the RPi is provided from the outside, running a wire from the ground floor of my garage, and then passing through the pipe used as a bird feeder holder. A 2-
The wire ends used to connect the RPi bird feeder monitor connect the Pin waterproof connector.
The other end of the wire is connected to the melted 5-
VDC power supply in garage.
This project should work with the battery, but I don\'t want to replace the battery in my daily life.
I built a 16 \"long cable to connect the windbreaker containing the RPi to the windbreaker containing the cap1188.
The capacitor sensor needs to be as close to the habitat as possible.
RPi Zero and CAP1188 could have been packed in a weatherproof box, but I prefer to pack it separately.
Log in to Raspberry Pi Zero W and perform the following steps.
Install pip: install Adafruit CircuitPython: check the I2C and SPI devices: you should see the following response: Next install the package of GPIO and Adafruit blinka: check the I2C address using the above tools: if CAP1188 is connected, you will see the same response as shown above, indicating that the sensor is located at the I2C address 0x28 (
Or 0x29, depending on your choice of I2C address).
Mosquitoes, mosquitoes-
Customer and paho-
Mqtt: I recommend using Adafruit to configure MQTT on Raspberry Pi, configure and set up MQTT on this RPi.
Install the bird feeder monitoring software: create a log Directory: connect the CAP1188 sensor to the RPi and do the following to test the system after the MQTT Server is running: replace the values of \"oip_host\", \"mqtt_user\", \"mqtt_pw\" and \"mqtt_port\" to match the local settings.
Exit and save the changes.
Still in the/home/pi/rpi _ bird _ monitor directory.
Include the following text in the launcher.
ShExit and save the launcher.
We need to make the script executable. Test the script.
Next, we need to edit the crontab (
Linux Task Manager
Start the script at startup.
Note: We have created the/logs directory before.
This will bring the crontab window as seen above.
Navigate to the end of the file and enter the following line.
Exit and save the file and restart the RPi.
The script should start the feeder_mqtt_client.
Py script after RPi restart.
You can check the status of the script in the log file located in the/logs folder.
These STL files are the 3D printed parts I created for this project, all of which are optional.
Waterproof housing can be manufactured or purchased locally.
The \"mounting wedge\" of the Cedar bird feeder is also optional.
This part is required to install the CAP1188 sensor housing.
After installing Raspbian, follow the configuration mentioned earlier and test the RPi and CAP1188 sensors, it is time to install these devices in the case of wind and rain.
I used two waterproof enclosures I printed to install the RPi and CAP1188 sensors.
First, I drilled a 1/2 hole at one end of each box.
Drill holes in the RPi housing opposite the side with SD card.
Install the nylon cable gland joint with adjustable locking nut in each hole.
Run four conductor cables between each case.
As mentioned above, install and weld the 2-pin automotive waterproof electrical female connector to the RPi.
Weld the Red Line to 5VDC pin 2 of the RPi and the black line to GND or pin 14.
For other connections used on the RPi, see the wiring diagram.
Pass the other end of the four wires through the gland joint on the CAP1188 housing and connect the wires as shown in the wiring diagram.
All 8 of the CAP1188 capacitive touch sensors are welded to the 8-pin master DuPont connector.
This connector is recessed into the side of the housing to enable a waterproof seal when used at the top.
Note: the top of both cases may need to be modified to allow the nut on the gland connector.
Before closing, I applied silicone caulking around the edges of each case and the wires of the gland joint to seal the case.
I also added silicone to the back of the DuPont connector to seal from the element.
Each bracket on the feeder is covered with 1/4 wide self-adhesive copper foil tape.
A small hole was drilled through the tape and bracket, a wire was welded on the foil tape and wired under the feeder.
Each wire is connected to a male 6-
DuPont connectors.
Note: Using the bird feeder shown above, I suggest that the gap between the ends of each foil is 1 1/4 \"-1 1/2\".
I found that the larger birds, such as the Eagle mouth bird and the pigeon, were able to touch both foil at the same time if they were placed together.
The \"installation wedge\" mentioned earlier is printed and glued to the bottom of the feeder to provide a horizontal area for installation of a weatherproof tank containing cap1188.
Velcro straps are used to wrap the tubing and RPi boxes to hold them under the feeder.
When the bird feeder is still on the pipe holder, refill the bird feeder with the sensor attached to the bird feeder and the RPi.
Luckily, I\'m 6\'2\' in height and can reach the container without much effort.
If you are already in the internet of things, you may have started and run the MQTT Server on your network.
If you do not, I would recommend using Raspberry Pi 3 on the MQTT Server, as well as \"Node-\" on the Andreas Spiess website-
Red, InfuxDB & Grafana installation \".
Andreas also has an information video 255 node on this topic-
Red, InfluxDB and Grafana tutorials on Raspberry Pi. Once the Node-
Red Server is running, you can copy ~ Data in/rpi_bird _ Monitor/json/Bird _ monitor _ flow to import the Bird feeder Monitor stream.
Json, and paste the clipboard into a new stream using Import> clipboard.
This process requires the following nodes: weather data at your location is provided via DarkSky.
I am currently monitoring and recording \"Cliff strength\", \"temperature\", \"humidity\", \"wind speed\", \"wind\", \"gusts\" and \"clouds \".
\"Cliff strength\" is important because it is used to determine if the sensor needs to be recalibrated due to rain.
The big timer node is the Swiss army knife for the timer.
It is used to start and stop data recording at dawn and dusk every day.
InfluxDB is a lightweight, easy-to-use database of time series.
The database automatically adds a timestamp each time the data is inserted.
Unlike SQLite, fields do not need to be defined.
They are automatically added when data is inserted into the database.
The JSON file mentioned above will load a process that needs to be adjusted according to your requirements.
Bird _ flow includes the user interface (UI)
Access MQTT Server via mobile phone.
The display can be turned off or turned on to recalibrate the sensor or take a photo manually.
The total sensor \"touch\" is also shown, which will give you a general idea of the number of birds visiting the feeder.
\"Grafana is an open source suite of metrics analysis and visualization.
It is most commonly used to visualize time series data for infrastructure and application analysis, but many use it in other areas, including industrial sensors, home automation, weather and process control.
\"Refn: Grafner document.
This package is included in the Andreas Spiess image file used to create my MQTT Server.
After configuring the InfluxDB database on the MQTT Server, you can configure Grafana to use this database as shown in the above figure.
Next, the dashboard used for this project can be from ~ /Rpi_bird _ monitor/JSON/bird _ monitor _ graf _ loaded in the json file found in grafana. json.
Can \"node-\" at Andreas Spiess\'s website-
Red, InfuxDB & Grafana installation \".
As mentioned earlier, Adreas Spiess has a great guide and video to give you an idea of the configuration of InfluxDB.
Here are the steps I take to configure the database.
First, I logged in to my MQTT Server via SSH and created a user: Next, I created a database: After creating the database on you, you can configure the InfluxDB node in the node-Red.
As shown above, I named the measurement \"feeder \".
After data initialization, this can be seen in InfluxDB: one of the many features of InfluxDB is that field configuration is not required.
Fields are automatically added and configured when data is entered.
Here are the fields and field types for this database: Here are some entries in the database: I would recommend using my Instructure, remote CNC Stop, and Monitor to assemble the Raspberry Pi camera.
Perform all the steps except 6 & 8 to create the camera.
Please note that my camera uses an old Raspberry Pi, but it works really well from my store window.
Upgrade Rasbian: install PIP: install paho-
Mqtt: install git and Bird monitoring software: If you want to make a video from an image taken by the camera, install ffmpeg: configure the permissions of the Bird feeder monitoring software: individuals, I do not recommend using make _ movie.
Sh on RPi camera.
Running on RPi requires a lot of resources.
I suggest transferring the image to your PC and running ffmpeg there.
Log in to RPi and change to/RPi _ bird _ monitor der _ monitor directory.
Include the following text in the launcher.
ShExit and save the launcher.
We need to make the script and executable. Test the script.
Create the log Directory: Next, we need to edit the crontab (
Linux Task Manager
Start the script at startup.
This will bring the crontab window as seen above.
Navigate to the end of the file and enter the following line.
Exit and save the file and restart the RPi.
The script should start the camer_mqtt_client.
Py script after RPi restart.
You can check the status of the script in the log file located in the/logs folder.
We like to watch birds, but we can\'t put the bird feeder in one position for maximum enjoyment.
The only place most of us can see it is from the breakfast table and not everyone can see the feeder from there.
So with the bird feeder monitor, we can enjoy the birds at a convenient time.
One of the things we found on the monitor was the frequency of birds landing on one habitat and jumping to the next until they bypassed the entire feeder.
Therefore, the number of birds is far from the number of individual birds visiting our feeder.
A feeder with only one or two narrow roosts may be the best option for \"counting\" birds.
Comments
Post a Comment