Bird Feeder Monitor using Arduino

Bird Feeder Monitor

This is a project to monitor the number of birds that visit my bird feeder, as well as record the amount of time spent feeding. I used an Arduino Yún and a capacitive touch sensor, Adafruit CAP1188, to detect and record the birds feeding. On a routine basis, the accumulated data is sent to a Google Docs spreadsheet to record the number and time spent by the birds visiting the feeder.

Data is only transmitted during a set period of time prior to sunrise and after sunset.

Step 1: Step 1: Parts

Bird Feeder Monitor

These are a list of the parts that I used to assemble my project. You could use a variety of project boxes to create your project, but these are the items I had on hand at the time.

1 6x3x2″ Project Enclosure
1 3x2x1″ Project Enclosure
1 roll 1/4″ Copper Foil Tape
CAP1188 8-Key Capacitive Touch Sensor
1 Arduino Yun
1 micro-SD card
2 DB-9 male connectors
2 DB-9 female connectors
1 Bird Feeder (CedarWorks Plastic Hopper Bird Feeder)
1 Tail Light connector from automotive supply store

Step 2: Step 2: Wiring

The Arduino Yun and the CAP1188 are wired to provide a hard reset of sensor at startup. There are other capacitive touch sensors available with either one, five or eight sensors. I chose eight because my bird feeder has six sides.


CAP1188 SDA == Yún Digital 2
CAP1188 SCK == Yún Digital 3
CAP1188 RST == Yún Digital 9
CAP1188 VIN == Yún 3.3V or 5V
CAP1188 GND == Yún GND
CAP1188 C1-C8 == Connect to wires on each perch

Power for the Arduino was provided externally, by running a wire underground from my garage, and up through the pipe used as the bird feeder stand. The wire was connected to a 5-VDC power supply in the garage. This project should work with batteries, but I didn’t want the hassle of changing batteries on a routine basis.

I constructed a 16″ long cable with DB-9 connectors on both ends to connect the Project Box with the Arduino Yun and the box containing the CAP1188. The capacitive sensor needs to be located as close to the perches as possible.


Step 3: Step 3: Installing Python Packages and Scripts

The CAP1188 requires that you download and install the libraries for this sensor. The library can be found at the following site:

Instructions for installing the library and examples are located in a README.txt file within the zip container.

This program monitors the sunrise & sunset for your specific location, and begins counting and timing at a specified time before sunrise and for an equal amount of time after sunset. Before and after that time, no data is sent to your spreadsheet. This project uses a python script to read the sunrise and sunset information from Yahoo! weather each evening or at startup get these times.

The following python library needs to downloaded and installed on the Arduino Yún.

pywapi –

Instructions for installing this library is located at the above website.

Python Scripts
The location ID in the ‘’ python script needs to be modified to include your location. It is currently configured for Missouri City, Texas. One way to find your ID is to go to the following website:

Enter your location, and your location ID will appear as part of the URL address. Replace the USTX0905 in the line of the script with your location ID.

result = pywapi.get_weather_from_yahoo(‘USTX0905‘,’imperial’)

This will allow the script to fetch the sunrise and sunset for your location. Instructions for modifying ‘’ are located in Step 6.

Once both scripts have been modified you must move them onto the micro-SD card directory ‘/mnt/sda1/’ of the Arduino Yun.

Step 4: Step 4: Wiring the Bird Feeder

Each of the perches on the feeder was covered with 1/4″ wide self adhesive copper foil tape. A small hole was drilled through the tape and perch, and a wire was soldered to the foil tape and routed beneath the feeder.

Note: With the bird feeder shown above, I recommend a gap between the ends of each foil stripe of 1 1/4″ – 1 1/2″. I discovered that the larger birds, such as grackles and doves, are capable of touching two foil strips at the same time if they are placed to close together.

A block of wood was shaped and glued to the bottom of the feeder to provide a level area to mount the Project Box containing the CAP1188. Velcro tape was applied to the Project Box as well as the wooden block to provide a means of attaching.

In order to refill the bird feeder, I unplug the power inside the garage. Next, I disconnect the DB-9 connector from the Project Box attached to the bottom of the feeder, which allows me to lift the feeder off the pipe with the Project Box still connected to the bottom. Once the feeder has been refilled, I place it back on the pipe stand; connect the DB-9 cable; and plug in the power.

Bird Feeder Monitor

Step 5: Step 5: Creating a Google Doc Form

In order to send data a Google Docs spreadsheet, you must first create a Form with all of the required fields. In my example, I have six ‘cnt’ fields and six ‘time’ fields that are integer input. For example, the fields are named ‘cnt1’, ‘time1’, ‘cnt2’, ‘time2’, etc. Once your finished with the Form, you click “View live form” to see the finished form. While viewing the Form, right click the page and select “View page source”. Search and find all of the HTML “input” fields in the source code. Make a note of the name for each of the fields you entered on the form. This information is needed to create your Scenario in PushingBox.

Step 6: Configuring PushingBox

Make a note of the url address of the Form you created previously (while viewing the completed form), and copy that address. It should look similar to this address:


This address is used to create your PushingBox Service, except that it must end with ‘/formResponse‘ instead of ‘/viewform‘. Finally, be sure to change the Method used by the Service to POST.

Creating a Scenario in PushingBox will require the data gathered previously from the form for each of the input fields. Create a CustomURL type Scenario as seen in the photo above. It should look similar to this:


Each entry should match the ‘cnt’ and ‘time’ fields of your form. End the string on fields with ‘&&submit=Submit’ as seen above.

Read more: Bird Feeder Monitor using Arduino

Leave a Comment

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