5.7 Putting It All Together
In order to make the project fully functional, we need to package up the Arduino+XBee hardware assembly inside a weatherized, protected layer within the bird feeder, mount the photocell near the base of the feeder, fill the feeder with seed, attach the Arduino+XBee hardware to a power source, and place the feeder outdoors but within range of the paired XBee radio attached to the computer.
Unless you live in an area with little rainfall, you will need to protect the electrical assembly from water damage. I have found double bagging the components in a small plastic freezer bag does a sufficient job of weatherproofing the Arduino+XBee. However, unless you plan on powering the electronics with a 9V battery that can be contained within the bundle (it might be good for short data collection sessions but won’t last very long before its charge is exhausted), you will need to account for an external cord to attach to the Arduino so that continuous power can be delivered.
Cutting a small opening in the bag to allow the cable to enter works, but doing so exposes the insides to potential moisture condensation. To minimize this risk, tightly wrap the freezer bag and cable exit point with a continuous sheet of plastic wrap, climbing high enough up the power cord to ensure a good seal that won’t slip or loosen with weather changes.
Using a weatherized power cord (such as those sold for outdoor decorative lighting purposes) may be less expensive and easier to test in the short term. However, environmentally conscious individuals may prefer instead to spend a bit more money up front for a longer, more sustainable energy alternative in the form of a photovoltaic power supply.
When searching for an adequate, portable solar power solution, make sure it can deliver 5 volts, is built for rugged durability, and has a built-in rechargeable battery when backup power is needed. Products like the Solio Bolt provide a relatively inexpensive solution for short-term measurements.[55] If you prefer photovoltaic solutions that offer greater internal battery charging capacities and voltage, be prepared to spend a bit more for the added capabilities. Companies like Sunforce Products offer a variety of solar backup power maintainers, trickle chargers, and controllers designed to take on greater loads.[56]
You should mount the solar panel far enough away from the feeder to gain maximum sun exposure. If possible, mount the panel at a ninety-degree angle to the sun for optimal energy capture. Depending on your location and average level of daylight intensity, you may need to seek alternatives such as consumer-grade wind turbine chargers or even pedal-powered dynamos.
We have accomplished quite a number of new objectives this project, from using photocell and homemade sensors and learning how to pair and wirelessly communicate between XBee-attached hardware to writing a script that records structured data, responds to events, and submits posts to Twitter via Twitter’s API. We have also taken into account standalone Arduino+XBee radio energy requirements and ways to adequately shield our electronics from environmental changes.
We will reuse these valuable lessons with some of the other projects in the ensuing chapters.