A VIRTUAL
LABORATORY
SIMULATION
(Simulating Mechanical Systems)
by John Blankenship and Samuel Mishal
The simulation techniques discussed in this article can
move the laboratory environment into the classroom
where students can immediately see the relevance of the
material being presented. Distance learning curricula can
be enhanced immensely because even students without
access to a laboratory can be given assignments to develop
algorithms for interesting applications. Hobbyists can
experiment with a wide variety of situations without the
frustrations and expenses associated with constructing
physical models.
The last time I taught a college-level microprocessor lab, the students
were struggling with a motor-control project — but the struggles had
more to do with time limitations than they did with electronics or
programming. In order to make the assignment more exciting and
relevant, each group of students had to construct a miniature elevator
shaft that spanned three floors. They had to interface a motor, six floor-call buttons,
and three elevator buttons to a computer or microcontroller, and create a program
to make the model respond like a real elevator.
They could use any type of motor to move the elevator, but most groups chose
a stepper or DC gearhead motor. If they chose a stepper motor, they had to provide
some sort of limit switch to allow the motor to be automatically moved to a known
starting position. The limit switch also had to be monitored to detect (and correct)
any slippage that accumulated during the motor’s movement.
If they chose a DC motor, they had to provide some form of feedback to
know when the elevator reached each floor. The feedback could take many forms
including mechanical switches, infrared beams, or even Hall-effect detectors. As you
can see, a project of this nature has many characteristics that make it suitable for
teaching control-oriented programming.
Unfortunately, many students in this situation spend the majority of their time
on the construction aspects of the project. Remember, students often don’t have
a workshop available to them so getting the elevator to move properly without
jamming can be more difficult than you might imagine. Getting the elevator to
reliably trigger appropriate floor detectors can be even harder.
There are situations (senior-level projects, for example) where it can be a
tremendous learning experience for students to get personally involved with the
SERVO 06.2009
47