Building Bio-Inspired Prototypes with Personality

ECE lecturer Hunter Adams holding a “chipsat.” Below, the lab is set up for remote work.

From the ECE Connections magazine.

ECE 4760 Designing with Microcontrollers deals with microcontrollers as components in electronic design and embedded control. It’s long been one of the more popular courses with students, due in no small part to the energy and enthusiasm the teachers bring to the material. Retiring Senior Lecturer Bruce Land taught the course for many years, and recently has handed the baton to one of the newest ECE faculty members, Hunter Adams.

We asked Adams to describe the course, what he hopes students will get out of it and why it’s important in the ECE curriculum.

Hunter Adams' ECE 4760 lab is set up for remote work.
Hunter Adams' ECE 4760 lab is set up for remote work.

I spent much of my Ph.D. designing and building very small spacecraft called “chipsats.” These devices are essentially printed circuit boards outfitted with a suite of sensors, processors, and radios that make them useful in space. In graduate school, I found that my happiest days were those spent in the laboratory prototyping with electronics. I love this sort of work, so I feel very lucky to be instructing 4760.

The microcontrollers course is often the first opportunity students have to build something complicated and that comes entirely from their own imaginations. This is always exciting and often a bit jarring. Most of the technologies with which we interact in our daily lives “just work.” The lights turn on when you flip the switch and your phone nearly always makes calls. 

Through 4760, many students come to the uncomfortable realization that it is really hard to get things to work. Many come to another realization, however, that it is also really fun and outrageously rewarding.

The first eight weeks of the course consist of four guided lab exercises, each lasting two weeks. These are designed to add additional tools to the students’ toolbelts, to introduce them to new concepts, and (where possible) to change the way that they view and understand the natural and constructed worlds. Then in the final four weeks of the course students are welcome to build anything they want using the knowledge they've gained through the lab exercises.

LAB ONE: Bird Call Synthesis

The lab starts by studying birdsong spectrograms from the Cornell Lab of Ornithology, specifically the Northern Cardinal. We match the frequency sweeps in the spectrogram to mathematical functions, and the students implement an algorithm which generates those same frequency sweeps with the microcontroller. The result is a shockingly realistic simulation of a Northern Cardinal singing—realistic enough to fool both humans and birds!

Each lab is designed to be extensible. A student that is fascinated with the lab and wants to run with it should have interesting places to run to. In this lab, students may attempt more challenging birds or different animals. Students report that they notice and take interest in birds singing after this lab.

LAB TWO: Boids

Lab two is a computer graphics and optimization exercise. Students implement an algorithm called Boids, an artificial life program that generates shockingly realistic animations of flocks of birds based on rules for interaction among a collection of animated particles. This lab is exciting because students create something that surprises them.

The algorithm has a few controllable parameters. As you change these parameters, the emergent flock behavior changes. The default values make the collection of particles look like a flock of birds, but change them a little bit and suddenly, for reasons that aren't entirely obvious, you have a school of fish. It transitions from bird-like motion to fish-like motion; and then you change the values again and it starts to look nonorganic, like robots, or the particles gather into crystalline-like structures. There’s a competition element to this lab. The student with the biggest flock (i.e., the most optimized code) wins.

 

It's another exercise that gets students to see the world in a different way. When they see a group of starlings over Ithaca some evening, they can say, “I understand what's happening there!” Students report that they notice and pay attention to flocking behavior in the natural world after this lab.

LAB THREE: Spectrogram

Students build a real time audio spectrogram generator in the third lab. They communicate sounds into the microcontroller, the microcontroller computes the frequency content of those sounds, and an attached screen displays that information as a spectrogram. Students talk and sing into the microcontroller to observe the frequency content of their voices. They play their favorite songs into the device, animal calls and sound effects. The results can be surprising.

For example, students are often surprised by the spectra of stringed instruments, which produce very ordered and evenly spaced harmonics going up the spectrogram. This is something students would have learned about years ago in physics, but it's very cool to see it happening in real time. 

LAB FOUR: Servo Robot

A robot that gets bored in Zoom meetings.
A robot that gets bored in Zoom meetings.

The fourth lab is a bit different from the previous three. In each previous lab, students build a scientific tool or a tool for understanding some natural phenomenon. In the final lab, students are asked to build something that makes them and other people smile. This year, it’s a robot that gets bored in Zoom meetings. 

Each student remotely accesses a variety of hardware in 4760. This hardware includes two servo motors that are oriented in a pan/tilt configuration and that carry a passive piece of hardware to indicate the robot’s direction of attention (googly eyes). Students must control the two servos to point the eyes at the camera, have the robot look around when nobody is speaking, and point back at the camera when anyone yells at it. It’s a simple behavior, but the effect is really endearing.

Students are challenged to give this little robot as much personality as they can manage, and they implement a variety of clever motor controls to make the robot appear bored, sad, anxious or excited.

_____

Watch more videos of student projects in ECE 4760.

More Spotlights