
Mixed-Signal
Z183
Driven to Design 2000 Contest Abstract
Ez-Stunt
Practical experiments are a must to teach system-
control theory, closed loops, pole placement methods and real-time regulation. Usually, experiments are either based on very trivial systems, or are only simulation based. In both cases the learning performance is poor.
Having that in mind, I developed an experimental platform demonstrating a non-trivial controlled system. eZ-Stunt is a didactic and fun platform targeted to system-control students.
Mechanically, eZ-Stunt is a standard low cost model car, with an added vertical bar freely articulated on the top of the car. The bar is of course, unstable. The game (in other words, the required control loop) is to automatically move the car back and forth to keep the bar as vertical as possible, even if someone gently touches the bar!
EZ-Stunt hardware architecture
:
The mechanical basis for the eZ-Stunt platform is a standard $15 toy class RC car, including a full 4-channel radio control (useless in this project but…), and NiCad batteries and charger. I kept the original on-board radio receiver and power drivers, and just cut some tracks on the PCB between the receiver chip and the transistor based power amplifiers. The main modification of the car, except the addition of the processor board, is the addition of an articulated vertical 40-cm (15") aluminum bar, fixed onto the axle of a high-precision potentiometer.
eZ-Stunt’s onboard controller board is a miniature board built around a Zilog Z80S183 mixed signal micro-controller. The processor gets the current angle of the vertical bar with a potentiometer and the integrated 10 bits ADC of the Z80S183. It then drives the motor of the car backward and forward with PWM signals generated by its programmable output generator (POG).
The control board prototype was home-built on a very small double-sided PCB (3" x 1.9").
This project involved also a lot of theoretical works. The first task was to establish the mechanical model of the system, then to check that the system is indeed observable and reachable (two complicated tasks to prove that all that stuff is really possible and that this bar can really be kept vertical with a linear feedback). The last step was to find the linear loop gains, using the pole placement theory. All the matrix maths were done using the freeware MuPAD linear algebra software.
Here under a global flowchart of the real-time control algorithm:
The embedded software use floating point, and is exclusively written in C, using the Z88 Development Kit (Z88DK), an open source development framework for Z80 compatible systems.