Background

I enjoy watching hummingbirds at the feeder on my back porch, but I would like a way to track activity at the hummingbird feeder while I'm not watching. Specifically, I would like to know the precise time of a hummingbird visit as well as weather conditions at the time of visit so that I can view long-term trends of hummingbird activity related to time of year and the surrounding environment.

Precise tracking of bird feeder activity seems like a difficult task without some sort of machine vision system; hummingbird feeders, however, are unique in their design in that they present a limited number of feeding points, each with an opening only a few millimeters wide. This construction means that one must only track accesses to the feeding points to gain both an accurate and precise understanding of activity at the feeder.

Feeder Tracking System Overview

System Diagram

The layout of the system and how all of its components interact is shown below:


Outdoor Embedded System

Microcontroller - I plan to use a PSoC 6 Dev Kit to manage the sensor array at the hummingbird feeder. This microcontroller will be responsible for interfacing with all of the system's sensors, which includes those used to detect birds, measure temperature, and track humidity. Power will be supplied to the device via batteries.

The microcontroller is also in charge of transmitting collected data to the online data storage and analysis system. It will do this through my home Wi-Fi network. Because this connection may not always be fully reliable, I will take advantage of the PSoC's onboard non-volatile memory to store data until a connection can be established.

Sensors - The primary sensors employed will be infrared break beam sensors. There will be a transmitter/receiver pair placed at each feeding location, with the beam crossing the opening for the hummingbird's beak. When a hummingbird uses the feeder, its beak will break one of the beams, and the microcontroller will read the beam break as a feeding event.

In addition to the feeding sensors, there will also be temperature and humidity sensors at the location of the feeder to take measurements of the environment at the time a feeding event occurs. Though weather measurements can be retrieved from other web APIs, I would like to know the exact conditions at the feeder so that I can gain an even more precise understanding of how weather conditions affect hummingbird activity.

Cloud Data Collection

I plan to use AWS IoT to collect data from the PSoC-run sensor array over Wi-Fi, as previously mentioned. Data is received from the PSoC in raw form; the PSoC records one feeding event each time one of the IR beams is broken, so a single hummingbird could generate multiple feeding events in a row. This should be recorded as a single visit to the feeder. AWS will be use to analyze received data and determine how many visits the data represents.

Once the data from the PSoC is fully interpreted, it should be displayed on a web dashboard that graphs visits over time, with specific information about each visit available. Each hummingbird visit will be associated with the exact date and time it occurred, the weather conditions at the time of the visit, and even more information drawn from the raw data, such as duration of visit, number of feeding events, etc. Most likely this will also contain information about the battery powering the system, so the user knows when it needs to be recharged.

Physical Implementation

Shown below is a picture of the prospective general layout of the outdoor embedded system:

Wires are enlarged to show how connections are made, and will ideally be much less obnoxious in the final build. I am also exploring the idea of mounting the enclosure for the PSoC underneath the feeder to improve cable management, however this may require a more complex mounting scheme.

Design Considerations

As alluded to in the above physical diagram, the outdoor system will need to be fully waterproofed. I live in an area where the weather can change very rapidly, including high winds and heavy rains. The PSoC will need to be securely mounted, with exit points for wires sealed to be water-tight. I will also have to consider waterproofing when selecting which sensors to use.

Sensors on the hummingbird feeder could potentially alter the appearance of the feeder significantly. The feeder's current appearance is designed to attract hummingbirds, so I will have to minimize the physical alterations made to the body of the feeder itself. The feeder should also remain easy to refill, with my particular feeder being refilled from the top:

Finally, hummingbirds can see a wider spectrum of light than humans, including ultraviolet light. I am unsure if infrared light has any effect. To test their perception, I will have to perform manual observation tests comparing the activity of hummingbirds both when the system is off and when the IR beams are on to see whether they affect the birds. If they do, I will have to fall back to a secondary detection method, perhaps using several ultrasonic distance sensors paired with a microphone to pick up the sound of a hummingbird's wings.

PSoC 6 Dev Kit Choice

I would like to use the PSoC 6 WiFi-BT Pioneer Kit for this project. The Pioneer Kit serves my needs perfectly, as it will allow for rapid prototyping and implementation of the system given its pre-soldered headers, user buttons/LEDs, and the included e-ink display for quick debugging. I will need to develop quickly, as testing the system will require weeks of observation that will cut into development time. The choice of the Pioneer Kit comes at the cost of a larger form factor for waterproofing, but the size of the device is not my top priority, so this tradeoff works fine for me.

AWS IoT Integration

I plan to use AWS IoT to collect, store, and analyze data from the PSoC-run sensor array over Wi-Fi. Processing data from the PSoC will not be as simple as collecting and displaying it. The data will arrive in a raw form, showing each instance of the IR beam being broken (a feeding event). A hummingbird may drink multiple times in a single visit to the feeder, however. AWS will thus analyze the raw data and infer how many individual visits the data represents.

Once the data from the PSoC is fully interpreted, it should be displayed on a web dashboard that graphs visits over time, with specific information about each visit available. Each hummingbird visit will be associated with the exact date and time it occurred, the weather conditions at the time of the visit, and even more information drawn from the raw data, such as duration of visit, number of individual feeding events, etc. 

Prior Embedded IoT Experience

As a student, I have some prior experience in embedded IoT from my coursework. I have used an ESP32 module to interface with APIs and databases, using HTTP requests to send queries and receive information. I will admit that I am not the most experienced in this area, however, and I am excited to learn more about implementing a real IoT system.

What I lack in IoT experience I make up for in experience with PSoC hardware. I have used both the PSoC 4 Pioneer Kit and the PSoC 5LP Dev Kits to create projects utilizing their wide array of programmable hardware capabilities. I am excited to use these programmable hardware capabilities to enhance the hummingbird feeder tracking project.