Imagine being paid, or getting Princeton credit, for playing with trains and Legos™.
For more than 25 years, Professor Michael G. Littman, of Mechanical and Aerospace Engineering at Princeton, has taught MAE 412 Microprocessors for Measurement and Control, a course about microcomputer control.
In the class, students design single-board microcomputer controllers, and apply them for the automation of a modular n-scale model railroad. For example, a computer might be used to automate railroad switches to prevent collisions, facilitate traffic flow through a ladder network of tracks on a project board, or even regulate the loading of pipes onto train cars.
In a three week portion of another course, EGR 194, freshman engineers program a LEGO™ Mindstorms controller to automate a LEGO™ vehicle to explore the environment. The LEGO™ Mindstorms controller is based on a single-chip PIC microprocessor. The student laboratory vehicle is a scaled-down version of the Mars Rover that has been exploring the surface of Mars for many years.
Littman believes that the use of the toys helps to engage students in important engineering concepts. Common to both courses stand-alone computers that are “embedded” as components within the toys. These components are akin to those contained within many engineering devices such as automobiles, aircraft, electronic instruments, and appliances.
In MAE 412, Littman makes use of a system that comes from England, the Hornsby Railway Company. Hornby, the English equivalent of our Lionel, has a digital train system that facilitates command and control of train set-ups. The system uses computers both in the master control unit as well as within the locomotives, to control both the speed and direction of up to six different engines. Each gains an identity, making it possible to talk to them individually. There are also “wayside” computers that are used for controlling switches or signal lights.
In the first demonstration, he sent a locomotive in motion, altered its speed remotely, and then sent a signal to switch the train to a different track. The train layouts support up to 99 accessories, permitting some very complex endeavors by the students, though Littman encourages them rather to design and execute simple tasks very well. He asks them to plan their systems, design them, build them, and then operate them. All designs and construction must meet specific standards, and all systems must comply with a set of rules.
In DC train layouts, you normally send voltage to a track, and the polarity determines the direction of the train. Trains facing each other would still go in the same direction, one forward, and one backward, at a speed determined by the voltage. By contrast, in the Hornsby system, since each locomotive has its own computer, you can command any car to move in either direction.
The tracks themselves form a broadcast network that carries both power and data. To change the speed, or to alter a signal, you change the data that the computer receives rather than altering the power to the tracks. Littman showed a live oscilloscope trace of the signal on the tracks. The repeating bursts of data each contain 32 bits, containing the speed and direction for four locomotives (four consecutive bursts control up to 16 locomotives), the state of a switch or signal, and a packet checksum to verify the integrity of the data.
Students learn to build a computer, they learning programming skills, and they get experience in planning, building, and operating a multidisciplinary engineering system. By the end of six weeks, the students will have designed, built, and tested a single board microcomputer that is able to receive instructions (data) from the track signals. The computer development is carefully orchestrated - they first build a minimal computer using only a clock, a display, an EPROM, and a processor. They then add additional new capabilities, one at a time the RAM, then Interrupts, then input/output registers, and then a programmable gate array.
During the final six weeks, they design, build, and implement circuits and mechanisms for sensing and control. Topics include how to use a transistor to control an electric motor; how to read a data sheet; how to select a transistor based on switching requirements and power dissipation; how to wire up project so that it is not plagued with electrical noise between circuits. And integrated projects typically employ optical, magnetic, mechanical, and thermal sensors.
He showed one student project that solved a variation of the Towers of Hanoi. The idea was to resort the cars of a train while avoided collisions with ongoing traffic along the line.
EGR 194 provides an introduction to the various disciplines of engineering and the relationship to the principles of physics and mathematics. For their projects, the class uses Lego Mindstorm systems that employ robotic remote sensing. Littman demonstrated one project, a robotic vehicle that navigated by itself over a twisting dark-colored path.
“Why toys?” Littman posed. “Because I really like toys, and because it breaks down barriers. Students are often afraid of complicated equipment. If it’s a toy, they’re not afraid to touch it”
Michael G. Littman is a Professor of MAE. He received his BA in Physics from Brandeis in 1972 and his PhD in Atomic Physics from MIT in 1977. In 2005, he received the Engineering Excellence Award from the Optical Society of America. His research interests include Laser Spectroscopy, Tunable Lasers, and Quantum control and Robotics.
Posted by Lorene Lavora