Blog

  • On the Trail of the Black Swift

    On the Trail of the Black Swift

    Rock-climbing researchers use clever dataloggers to solve a migration mystery and help save a species.

    by Mike Grusin

    This essay was originally published at Sparkfun.com on March 21, 2012

     The black swift (Cypseloides niger) leads a secretive life. These small, sleek birds are rare to begin with, and their numbers appear to be declining due to climate change and habitat loss. They live in remote locations, choosing to nest high on wet cliff faces, often behind waterfalls. This makes them a challenge to observe (they’re a prize on any birdwatcher’s list), and even more difficult to study. The biggest mystery about these birds was where they were spending the winter. They’ve long been recorded returning to the same nesting sites each spring, but no reliable winter observations had ever been made; they simply vanished, literally into thin air, for seven months every year. Given the extraordinary migrations of many bird species, they could have been wintering almost anywhere (and since this information is vital for conservation efforts, there is some urgency to this research). But this decades-old mystery was recently solved, thanks to highly-dedicated researchers, and some very clever engineering.

    Glen Tepke

    In 2009, at a nest site near Ouray, Colo., researchers from the Rocky Mountain Bird Observatory and US Forest Service captured four black swifts, fitted them with tiny datalogging backpacks, and released them back into the wild. Similar dataloggers had been used in the past by the British Antarctic Survey to study albatross, which may not return to dry land for years at a time. However, albatross are some of the world’s largest birds; an urgent need to track smaller species drove an intense effort to shrink these devices, and it is only recently that they have been made small enough to be comfortably carried by diminutive birds such as the swift.

    The following year the researchers returned to the nest site, and amazingly, managed to retrieve three of the four backpacks. When they downloaded and analyzed the data, for the first time in history they were able to follow the swift’s yearly migration to a remote area of the Brazilian rainforest. The researchers found that the birds log around 350km (217 miles) per day when they’re on the wing, travel 7000km (4350 miles) each way, and surprisingly, spend the winter in lowland rainforest, not the mountainous environments that they prefer during their summers in North America.

    Terry Gray

    The study was a huge success, and the information gained will greatly help in conservation efforts for this bird. (And now that people know what to look for, there have even been a few possible sightings in their winter range.) What’s neat from an engineering perspective is the simplicity of the backpacks. Surprisingly, they do not use GPS. In fact, the backpacks have only one sensor, light level, along with a real-time clock. Can you guess how these two inputs are used to determine the bird’s location?

    “Light-Level Geolocators” or “Geologgers” use the light sensor and real-time clock to record the times when sunrise and sunset occur locally each day. When (and if) the device is recovered, one can process the data to determine the approximate location of the bird on any logged date. Longitude (east-west location) is calculated from the time of the local sunrise and sunset; these will occur later the further west you travel. Latitude (north-south location) can be determined from the length of daylight, which will vary according to the location and time of year. The uncertainty is on the order of 300km (186 miles), which is a reasonable number in this field, especially considering that the simplicity of the design allows the creation of an instrument package weighing slightly more than a gram. Such a small device greatly increases the number of species that can be studied using this technique; for perspective, the black swift only weighs about 50 grams itself.

    Todd Patrick

    So what engineering lessons can we take from this?

    When approaching complex problems, we’ll often jump straight to complex solutions. For a tracking problem like this one, GPS has become such a go-to technology, you might not even consider other options. And, since most times you don’t get the package back, you might decide that it’s necessary to transmit real-time information using radio, GSM (cell phone) or even satellite modem. Once you’ve convinced yourself this is the right way to go, your task then turns into miniaturizing those components until they’re (hopefully) small, light, rugged, and long-lived enough for the task at hand.

    However, if you step back and honestly analyze what you actually need to do, distilling the task down to its bare essentials (this is known as “scrubbing the requirements”), take advantage of things the environment already gives you, and add a bit of interdisciplinary imagination; you might come up with an extremely elegant solution like this one. And maybe help some natives in the process.

    Thank you to photographers Glen Tepke, Terry Gray, and Todd Patrick for their kind permission to include their work above.

    More information:

    “The Northern Black Swift: Migration Path And Wintering Area Revealed” Jason Beason, Carolyn Gunn, Kim Potter, Robert Sparks, and James W. Fox, Wilson Journal of Ornithology, March 2012 (abstract only, full text available for purchase)

    “Birders take black swift mystery under their wing” Nancy Lofholm, The Denver Post, 3/5/2012

    Black Swift Research Project and news story at the Rocky Mountain Bird Observatory

    The Geologgers used in the black swift study were manufactured by Biotrack UK under license from the British Antarctic Survey (more detailed information here). The Migratory Connectivity Project has an overview of geologging and other tracking techniques, with a list of additional hardware and software manufacturers.

    An overview of a software package (and technique) used to process raw tracking data: Jensen Software Systems MultiTrace

    “A miniature daylight level and activity data recorder for tracking animals over long periods” Vsevolod Afanasyev, British Antarctic Survey (includes a schematic for a PIC-based geologger)

    Requirements scrubbing from a software development perspective (but it works for all kind of things): Achieving Leaner Software, Steve McConnell

    And check out this earlier SparkFun.com news post about a larger GSM-based project: Solar-Powered Bird Tracking

  • stupid project: PID heater

    During one of our recent disasters, the county gave out free electric heaters as it was winter and our gas service was out for a couple of weeks while they repaired the lines. These heaters were understandably cheap stamped-metal affairs, but they served their purpose.

    Fast forward a couple years and I’m trying to come up with a backup plan to keep my bird room warm if (when) the elderly furnace goes out. (I had already replaced the computer in that furnace but that’s a story for another time.)

    The aforementioned Free Heater suggested itself, but when I auditioned it on a cold night the mechanical bimetallic thermostat did a pretty terrible job of regulating the heat. I like to keep the bird room at 70F, but even after adjusting the touchy control knob to turn “off” at exactly 70, there was so much hysteresis the room might end up at 65F or 75F.

    Then I remembered that I had once gotten a couple of generic industrial PID temperature controllers in a trade. They even had built-in relays! Surely it would be easy to hack one of these into the cheap heater for precision control.

    Narrator: it was not easy

    I won’t bore you with every detail of this build, but here are the highlights:

    • The PID controller ran on AC (good) and had an internal relay (good), but the internal relay was only rated to 1A (bad, as the heater coil was 1000W so needed around 9A).
    • Since the internal relay wasn’t beefy enough, I decided to slave it to an external 10A relay. I found some on Amazon with the right specs, but when I installed one, whenever it was energized it made a loud buzzing sound. I checked everything and couldn’t find anything wrong. Luckily I had bought a pair, and when I tried the second relay it worked properly. Success! Except… a critical part having a 50% failure rate doesn’t instill confidence in something hot that will be left unattended at night.
    • As noted, the original bimetallic thermostat sucked, but it did have an integrated gravity switch that would turn off the heater if it tipped over. Unfortunately it was tightly integrated into the original assembly so there was no way to include it in the new build. Another safety feature gone.
    • The wiring turned into quite a rats nest, and since it was all high-voltage high-current AC, the connections HAD to be reliable. I ended up using crimp rings and a large bus terminal to make all the connections, which took up yet more room but was worth it.
    • After all the trouble of installing it, it turned out that my PID controllers had a maximum cycle time of 100 seconds (I was hoping for more like five or ten minutes). Which implies that the relays will also click on and off every 100 seconds.

      Relays are mechanical devices that wear out, and cycling them 864 times a day was troubling. I could (and may) replace the 10A relay with a solid-state relay, but I’d have to either find one with a 120V “coil”, or find a way to add a safe low-voltage supply to the already-full box. SSRs are also prone to failing “on”, which is yet another thing to worry about or design around (a surprisingly hard problem).

    So what happened?

    After all that, it’s worth noting that the hacked heater did work quite nicely, impressively holding the heat at a constant 70F or wherever you set it. (And this was without me fooling with the PID defaults; good job China!)

    It also seemed reliable enough, but knowing how the sausage was made I don’t know if I’d be 100% confident leaving it running unattended overnight, which was the whole point of this endeavor. I could keep working on it to make it safer and more reliable, but at this point it might just be worth investing in a better heater.

    Some projects proceed smoothly towards an elegant design; others, like this one, bounce like bumper cars from one problem to another, with the “solution” to each problem adding complexity and more things that can fail. I’ve run into this with spacecraft systems; if a backup system is likely to cause more problems than it solves, it’s usually a sign that you should rethink your original premise.