From Card Readers To Blinking Lights, Students Unlock The Secrets of Digital Logic

04/12/2016

A small cube made of lights that dance around in hypnotic patterns certainly has a magical quality to it. Less obviously magical is a credit card reader, or a Coke machine.

But in Introduction to Computer Engineering, taught by Prof. Jakub Szefer, the everyday and the fantastic combine to reveal the secrets of circuitry and digital logic that affect our lives in ways often taken for granted. With the help of research support specialist Kevin Ryan, Szefer has taken to using everyday applications to teach the programming of algorithmic tasks. Last year, for instance, they bought a Coke machine from Craiglist, customized it, and now use it to teach logic synthesis.

As consumers, most of us give little thought into how information is transferred from your credit card at a gas station. But faced with the task of designing logic for controlling a card reader or a soda machine to dispense a can of soda, students gain a real appreciation for the intricacies of everyday life.

It also gives the students a better sense of the concepts they're studying. Without real-world applications, Szefer said, there's not much feedback.

"Now it's more hands on," he said. "You can actually touch things when you swipe a card through reader or hold an LED cube."

The card readers are hooked up to an oscilloscope, which acts as a sort of de-bugging device, and a Field Programmable Gate Arrays (FPGA) board that stores the logic. An FPGA board is an integrated circuit that can be re-
programmed, which allows students to program the card reader to determine a card's number, expiration date and other information.

"The basic premise is that the students learn digital design," says Ryan, who assists SEAS faculty with electronics and electrical engineering systems.

The FPGA board is also what allows the students to build rather striking creations, such as blinking LED cubes, made of nine LED lights arranged in three columns. Building logic for controlling the cubes is a way to teach about finite state machines, which transition between states based on programmed input. In this case, the state machines iterate the turning on of the different LEDs in a cube to create an animation.

"With the LED cube, you can control individual lights," Szefer said. "It works by persistence of vision, so you light up each one in sequence very quickly, so to us, it looks like the LEDs are on, but it 's actually going back and forth and lighting up."