Embedded Systems Design Course: From Biofuels to Better Photos

By Tiffany Fox, (858) 246-0353, tfox@ucsd.edu

Note: In Part Two of a two-part series, we feature two projects from CSE 145, which teaches students how to use software and hardware to build an embedded systems. Read the first part here.

San Diego, Calif., June 26, 2014  A bioreactor that costs just $500. An aerial balloon camera platform that can take photos from any angle. Robots that can fly around the room autonomously or solve a Rubiks’ Cube in under 30 seconds.

These were just a few of the projects designed by students in Embedded Systems Design, taught by Computer Science Professor Ryan Kastner. The goal of the class is to teach students the end-to-end process of building an embedded computing system, including the fundamentals of microcontrollers — such as Arduino and Beagle Bone Black — as well as sensors, actuators and other hardware and software tools.

Stephanie Conley built a bioreactor that can grow six samples of algae strains for just under $500—similar devices cost thousands of dollars.

“It’s about putting research in the hands of people,” Conley said. “It’s also a really good DIY project, especially for someone who wants to make their own biofuel.

Conley’s set-up combines six long glass tubes hooked up to an air pump. The pump provides the agitation the algae need so they won’t clump up on the sides or bottom of the tubes. A valve opens and closes a tube that delivers nutrients and water to the culture. Another tube flushes out extra liquid. The system also is equipped with a photo resistor sensor that detects how much light passes through the algae—the less light, the more the algae is growing.

The system is controlled by an Arduino Mega circuit board that Conley programmed and hooked up to her bioreactor’s various elements. The information from the sensors is transmitted in real time to a Google document, which users can access on any device with WiFi.

Conley would like to turn Cyanostat into a start-up. But first, she needs to graduate. She has one more year to go. She plans to reach out to research groups investigating biofuels from algae here at UC San Diego, such as the California Center for Algae Biotechnology, led by UC San Diego molecular biology professor Stephen Mayfield.

Students in the Embedded Design course are making an impact not just inter-disciplinarily, but internationally. A group of four Norwegian students dubbed “Team Norway” enrolled in the course through the UC San Diego Extension program and will return this summer to matriculate once again at the Norwegian University of Science and Technology (NTNU).

The students – Thomas Emil Dagsvik, Alexander F. Fosseidbraaten, Kamilla H. Bolstad and Frederik de Lichtenberg – are majoring in industrial economics and technology management, which requires two years of economics and two years of mechanical engineering, environmental engineering or computer science and engineering (they chose the latter).

For the Embedded System Design course, the students decided to improve upon an existing design for a stabilized aerial camera platform, which they now call “Project Spectre.” Spectre is essentially a stationary aerial balloon equipped with a rig that holds a high-resolution DSLR (digital single lens reflex) camera. The rig can be programmed to aim the camera in any direction.

“Previously, we had to use a laptop and a radio transmitter to manually steer Spectre to point the camera in the direction we wanted, but we felt that was time-consuming,” says Fosseidbraaten. When a team used the balloon to document the excavation of the remains of famed racehorse Native Diver, for example, “they had to take photo manually every 30 seconds. That’s way more complicated than it needs to be. We should be able to press play and have this automated, and that’s one of the things we’ve done.”

Thanks to work by Fosseidbraaten and Bolstad, the team now uses GPS coordinates and barometer data to calculate the balloon’s position and altitude, which allows them to triangulate the target point. They also automated the rig’s ‘panorama’ function. “We used to have change the direction of the camera manually and then take a picture, turn the camera, take a picture,” explains Dagsvik. “Now we just state how wide the panorama should be, push ‘play’ and the camera does the rest.”

Another issue the team tackled was the problem known as ‘gimbal lock.’ A gimbal is a pivoted support that allows the rotation of an object around a single axis. A set of three gimbals may be used to allow an object mounted on the innermost gimbal (in this instance, the camera) to remain stable regardless of the rotation of the rest of the rig. Compasses, for example, are often mounted in gimbal suspension rigs.

“Gimbal lock,” Fosseidbraaten explains, “is a state where the automatic stabilization of the rig won’t work because the system gets confused. Whenever we would turn the camera to a certain angle, the rig wouldn’t know which motor to use because two motors control the same gimbal axis for that moment in time, until the camera moves again. It means that we’d be locked in a certain angle, lose one degree of freedom and have to reset the device.”

He cites a well-known incident involving gimbal lock: the Apollo 11 mission to the Moon. Rather than using a fourth gimbal to prevent gimbal lock of the spacecraft’s platform, engineers chose an alternative solution that unfortunately ended up freezing the platform. The spacecraft had to be manually moved away from the gimbal lock position, and the platform had to be manually realigned using the stars as a reference.

To solve the gimbal lock problem for the Spectre, de Lichtenberg wrote new stabilization and control code for the platform using ‘quaternions,’ which required understanding the complicated mathematics behind these complex numbers. Implementing quaternions made it possible for the camera to move in any direction.

Or photograph any stage during Coachella. (Provided they can convince someone to shell out $100 for the helium).

Media Contacts

Tiffany Fox, (858) 246-0353, tfox@ucsd.edu

Related Links

Computer Science and Engineering Department