September 24th, 2019

Project: Chrysafly

Breathing life into a giant mechatronic butterfly.

If you'd told me six months ago that I'd be spending the weekends of my 2019 Summer term pulling all-nighters in the back of an 8000 square-foot lab, living exclusively off of donated pizza, poke, blueberries and Yerba Mate, and writing the firmware to control four motors on a steel butterfly of unimaginable proportions, I don't know what I'd have told you.

In fact, I'm still not very sure how to describe the experience other than downright otherworldly. Chrysafly is the brainchild of Nico Woodward and Nathyn Sanche, an artist and a pyrotechnician, and they tasked my friends and I with tackling the motor control and all related electronics.

The Motors

The motors donated to this art project came, quite literally, straight from the heart of another one. Before they moved Chrysafly's wings, they were used to make a giant mechatronic heart beat in one half of the famous Embrace sculpture at Burning Man 2014. Absolutely bomb-proof and able to deliver impressively high torque at a whopping 13rpm, these donated motors worked seamlessly with our Pololu Dual G2 High-Power Motor Driver Arduino shields.


The Encoders

My friend Michelle and I instantly nerded out over the MAE3 Absolute Magnetic Kit Encoders provided to us to help keep track of motor positions. While not perfectly spec'ed for counting rotations (the output was a continuous pulse width modulation, or PWM, signal with a duty cycle proportional to how far it was in a single rotation), our team whipped up a quick functional check to update positional information with each cycle of our microcontrollers.


The Controls

We decided on a moving-setpoint positional PID system to control each of the four motors moving the wings. Each pair of wings follows its own time-dependent sigmoidal setpoint path that slows it down as it approaches its fully-open and fully-closed positions, and these paths can be easily adjusted to modify the cascading motion to be faster, slower, or more spaced apart relative to the rest of the system.


More Information

A video highlighting our contributions to the project can be viewed here . Our complete controls implementation is about to undergo an upgrade as we prepare for this year's annual Lumiere Festival in Vancouver, Canada. Visit our project Github to see our working codebase.