IEEE ©2001 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.

Return to Table of Contents


Modular Microprocessor Kit for Undergraduate Laboratory on Industrial Automation

Jun Okamoto Jr., Member, IEEE, Julio Cezar Adamowski, Member, IEEE, and Tomaz Mikio Sasaki


Abstract - Teaching microprocessors to mechanical engineering students has become part of the new curriculum of the Escola Politécnica of the University of São Paulo, since 1988. The theoretical discipline, where microprocessor small systems design is taught, is complemented with laboratory activities where the student faces a one-semester project for solving a problem with a modular microprocessor kit on the subject of industrial automation.

The concept of modularity introduced in this microprocessor kit allows the student to propose his or her own project and configure a system that allows the students to have contact with three basic issues concerning industrial automation: actuation, sensing and I/O commands. The kit is composed of several modules, that can be interconnected between themselves and a linear position system with two actuators versions, one with DC motor and encoder and other with stepping motor. Each module consists of a PC board of 100x130 mm of dimensions and, except for the motor's drivers, they can be connected to each other by flat cable or by the piggy-back method which creates a stack of boards.

This paper describes the Modular Microprocessor Kit and its application to an undergraduate laboratory to solve industrial automation problems.


I. Introduction

The Escola Politécnica of the University of São Paulo, in Brazil, began a new set of courses for the new curriculum of the undergraduate course on Mechanical Engineering in 1988. The main goal with the introduction of this new set of courses was to bring the knowledge of electronics, microprocessors and application of computers in mechanical engineering to the traditional course of mechanical engineering.

Teaching microprocessors to mechanical engineering undergraduate students was a challenge since the beginning mainly because of two reasons: depth of knowledge and motivation towards the subject. To face the first issue, it was decided that the course would not only be informative, as most mechanical engineering students would like, but would teach a methodology for designing small dedicated computer systems that could be applied to mechanical systems, such as the ones present in automobile fuel injection systems and axis controllers for numeric control machines. To meet the motivation issue, the laboratory work with microprocessors was recently redesigned with the application of the Modular Microprocessor Kit to solve problems related to industrial automation.

The Modular Microprocessor Kit was conceived as a solution for updating the laboratory work that was based on a non-modular kit using 8085 microprocessor and had some experiments in programming the microprocessor board. The previous laboratory work had no relation to industrial automation that is considered the main subject from where the mechanical engineering students will benefit most. The modularity concept and the industrial automation elements introduced in the Modular Microprocessor Kit were meant to break the creativity barrier of the students, so they can always be pushed to go one step forward in relation to what was done in a previous semester. The students are motivated to create new functions for their proposed system and even proposing new modules to be implemented for the Modular Microprocessor Kit.

Another aspect about the implementation of the Modular Microprocessor Kit is that it is not restricted to any particular microprocessor chip as long as it is an 8-bit microprocessor. The first microprocessor module developed had the 8085 microprocessor due to its use in the previous laboratory kit. However, new microprocessor modules are planed to be designed, first using a 8032 microcontroller and later a 68HC11 microcontroller. The peripheral modules are ready to interface with Intel chips, as well as Motorola chips. The main programming tool is based on C Language cross-compilers the can generate code for a great variety of 8-bit microprocessors and microcontrollers. Considering the particular characteristics of the microprocessors and microcontrollers, the student will be able to choose the one that best solves the problem that he or she is interested in.

A. The Industrial Automation Context

Industrial automation is the end of this century paradigm for automating manufacturing processes. The technology applied in this field, however, is present in our everyday life more than ever. The computers that control robots and numeric control machines bear the same elements as the computers that control vehicle cruise control, ATM machines, home VCR functions, and many others.

Three basic issues are involved in almost every industrial automation system: actuation, sensing and I/O commands.

Two different types of actuators are available for a linear positioning system: a DC motor and a stepping motor. The sensors available are a magnetic and an optical sensor for detecting the end of the movement area of the linear positioning system. The I/O commands can be used to signal system status for the user through LEDs, send text messages through a LCD display, accept user input through switches and communicate with a terminal through a RS-232C interface.


II. Courses on Microprocessor in the Department of Mechanical Engineering

The Mechanical Engineering courses on microprocessors are offered twice a year with a set of two courses that are to be taken on the same semester: the theoretical course of Microprocessors and the Laboratory on Microprocessors for Industrial Automation. This set of courses is intended for fourth year students, in a five year engineering curriculum, with background in basic analog and digital electronics.

In the theoretical course, the students have an introduction to the design of microprocessor based small systems, such as fuel injection control in automobiles, anti-locking break systems and numerical control machines [1]. This course follows the analog and digital electronics course, given in the previous semester, and starts with sequential circuits [2], then gives a brief introduction to generic computer architecture [3], followed by a methodology for designing microprocessor hardware using static RAM, EPROM and I/O devices for several functions [4].

In parallel with the theoretical course, the Laboratory on Microprocessors offers the student the opportunity to configure a microprocessor system for an industrial automation application and to program it in C Language and assembler. Also, the student can check the signals in the hardware with an oscilloscope, as described in the theoretical course.

The idea of a one-semester project is suited for the fourth year student that is prepared to follow a tight schedule for carrying on the project and is also capable of managing the laboratory's free hours during the week. This laboratory is also an important introduction to microprocessor practical utilization, prior to the final graduation  project in the fifth year. The students can use the same modules, that they are familiar with, mainly the processor modules, and develop their own interface modules for the application of the final project.

The courses are balanced so that in the end of the semester the student is able to design the hardware of small microprocessor controlled systems and to program the system at a very low level. Also, the knowledge acquired during the courses have prepared students to design IBM PC interfaces for data acquisition and actuator control, digital control algorithms, real time controllers, among many others.


III. The Modular Microprocessor Kit

The Modular Microprocessor Kit is composed of several modules that can be interconnected between themselves so that the student can configure his or her own system. Each module is implemented on a 100 mm by 130 mm Printed Circuit board with flat cable connector on the left side and stacking connectors on both sides of the board, as shown in Figure 1.

Fig. 1. Example of a module

The motor driver modules have only the flat cable connector and cannot be stacked because of the high currents present in the boards. The modules can be interconnected in any order and have their address space configured by jumpers. The only restriction is that the LCD display modules are the top ones when the modules are stacked together.

Besides the address space configured by jumpers all peripheral modules can have their functions configured by jumpers. There are no external wires except for the ones that have connectors on the right side of the modules for connecting sensors, motors, power supply, etc. As an example of the configuration jumpers, in the I/O and Timers module, the Timers can be configured to generate interruptions to the microprocessor module. This has helped particularly to produce a real time clock for the system, from miliseconds to hours.

Connecting the modules with a flat cable is convenient for the students to investigate the hardware signals in the microprocessor's read and write cycles for memory and I/O. These signals are analyzed in the theoretical course that is taught in parallel with this laboratory. Figure 2 shows an example of connecting the modules with flat cable.

Fig. 2. Example of connection with flat cable

Another option of interconnection of the modules is by stacking them in a piggy-back fashion. This is done after the students have the understanding of the hardware signals so each module does not have to be accessed from the component side individually. Also, stacking the modules integrates the whole system into one piece that resembles an industrial automation instrument, like a panel PID controller or a measurement instrument. On the module on top of the stack, the student have the user interface with a LCD display, buttons and LEDs. The motor drivers can be connected by a flat cable to any of the available connectors on the left side of any module. The Figure 3 shows an example of the connection stacking the modules in piggy-back fashion.

Fig. 3. Example of connection stacking the modules in piggy-back fashion

The linear positioning system has a 500 mm long high precision screw ball with a side rail to mount the sensors. The reduction ratio allows 5 mm of displacement for one turn of the screw ball. The linear positioning system has two versions of actuators, a DC motor with encoder for closed loop control and a stepping motor. Shown in Figure 4 is the linear positioning systems, still under some refinements, with the stepping motor mount and a magnetic sensor to the left and an optical sensor to the right. The design of the linear positioning system has included constructive parameters to resists to the students programming mistakes and improper handling.

With this device the students can develop algorithms for high precision positioning, in both closed loop digital control and open loop, algorithms for acceleration and sensor detection of the movements.

Fig. 4. Linear Positioning System

Figure 5 shows from left to right the 8085 microprocessor module, I/O and timer module, LCD display with switches and LEDs module and stepping motor driver module. Other available modules are the DC motor driver module and the A/D and D/A module. Still under the design process are the graphical display module, the 8032 microcontroller module and the 68HC11 microcontroller module, both microcontroller modules with I/O and Timer functions incorporated in the modules.

Fig. 5. Some of the Modular Microprocessor Kit modules: (left to right) 8085 Microprocessor Module, I/O and Timer Module, LCD display with switches and LEDs Module and Stepping motor driver Module

All modules are designed with EDA software and have programmable logic circuits to minimize space. This is important to keep the same form factor in all modules and to produce any number of modules that become necessary. Another important issue is the possibility of maintenance of the existing modules and the addition of new modules as required. The documentation plays an important role in the maintenance and expansion of the Kit so it is kept up to date and in electronic form, being available for the students that are interested in it.

A. Programming the system

After the configuration of the system hardware, it can be programmed by downloading a program to the microprocessor module's memory. The microprocessor module has a RS232C serial port for connection to an IBM PC emulating a terminal (TTY). The microprocessor module has a small monitor built in EPROM that initializes the module and sets up the communication with the terminal, accepting some commands for memory edition and downloading programs. Figure 6 shows the connections with the microprocessor module for programming.

The programs are developed in C language and in the specific microprocessor's assembly language in the IBM PC microcomputer with a cross compiler. Students are encouraged to mix C code with assembler code, particularly for the digital control algorithms for gaining performance.

Fig. 6. Connections of the Microprocessor Module


IV. Student's Project

In the beginning of the semester, the students are supplied with the documentation of the Modular Microprocessor Kit and several elements that the project must contain to be approved for implementation. Some elements are the use of a motor for actuation, use of sensor input, use of one interruption, use of the serial channel.

The students have approximately two weeks to present a proposal of the problem that they want to solve, in the industrial automation context, including the configuration of the system and a detailed description of the system functions to be implemented.

A pre-defined schedule for the implementation is supplied and must be followed by the students. The professor has weekly meetings in the laboratory for supervising the student's work and helping with the different implementation options for the problems presented by the students.

At the end of the semester, the students present their working project and submit a written report that contains the detailed discussion of all the implementation issues solved and the software documentation. It is required that the students organize the software implementation with some methodology.

A. Configuring a Project

Figure 7 shows a system map from which the student can choose mandatory modules from left to right and between options from top to bottom. For example, a possible configuration for the system would be a 8085 micropocessor module, I/O module, LCD display module, stepping motor driver module and stepping motor positioning system.

Fig. 7. System Map for configuration of the proposed system

After the configuration of the system, the student defines the addresses to be used in each module and can start testing low level algorithms for displaying messages in the LCD display, sending and receiving strings to and from the terminal, detecting sensors and sending commands to the motor driver interfaces.

With the low level routines tested, the student starts developing the main routines that add the desired functionality to the system. For coping with the more interested and advanced students, the initial proposal can be supplemented with additional functions, such as motor acceleration, alternative control algorithms, graphical display for speed, position and acceleration.

B. Testing a Project

The first step in testing the project is to connect the modules with the flat cable and write very simple routines following the test points in the modules. This procedure helps the student to understand the relation between the commands in software (C language or assembler) and the actual signals involved in the hardware.

Testing the routines can be done with the modules stacked together or connected with the flat cable. The I/O module has one 8-bit port with LEDs to help the students with status output in some parts of the program and the monitor in the microprocessor module has breakpoints at assembly language level. Usually the students develop 3,000 to 6,000 lines of C language programs mixed with assembler for the project. With this size of code, sophisticated debugging tools are not necessary.

C. Finishing a Project

By the end of the semester the students finish the project presenting a working system that is verified by the professor responsible for the course to meet the initial proposal and the required basic elements. The students also produce two pieces of documentation: a technical document and a user's manual.

The technical document contains all the details of the implementation and discussion of the solution presented. Software documentation is also required, with a complete program listing with routines headers and comment. It is required that the students apply some methodology for developing the software and also the documentation.

The user's manual documents the user interface adopted for the system. This includes the functions the system has, the commands the system accepts by serial link, which messages it produces, functions of the switches, meaning of the LEDs. The commands and system behavior are checked by the professor when the project is presented.

As an engineering course, the one-semester project is treated as an engineering project from the beginning to the end. This approach is very important to the students to develop a project from the specifications, to the final product, including the documentation and also following a pre-defined schedule. The evaluation takes into account the problem proposed, the code developed, the solutions found, the additional features, the documentation and the delay about the dead lines.


V. Conclusions

A Modular Microprocessor Kit was developed in the Department of Mechanical Engineering of the Escola Politécnica of the University of São Paulo to be applied to an undergraduate laboratory on industrial automation. The kit is composed of several modules that can be interconnected allowing the student to configure his or her system to solve an industrial automation problem.

The Modular Microprocessor Kit is used for a one-semester project in a laboratory course, together with a theoretical course on microprocessors for fourth year students in a five year mechanical engineering curriculum. This set of courses gives the students the necessary knowledge to design hardware and software for small systems with microprocessors. The laboratory project is carried out as an engineering project, including specifications, a project proposal, implementation and documentation.

More modules for the kit will be developed in the coming year. The kit is planned to be used also in the fifth year final project as an aid to the students to focus on the subject of the final project instead of starting to build microprocessor and microcontroller based systems from scratch every time a new final project begins.

As a prize for the best students, their project can be burnt into EPROM as an example for the forthcoming semester students. With this policy, it is expected that a momentum is created among the students to push new ideas forward. Finally, the framework created with the Modular Microprocessor Kit is open so that student contributions for new modules are accepted and can be implemented becoming part of the Modular Microprocessor Kit.


Acknowledgments

The development of the Modular Microprocessor Kit had the support of CAPES, in the PADCT program, subprogram of Instrumentation, under grant 47/95. We also would like to acknowledge the effort and dedication throughout the project of engineers Cristina Toshie Motohashi Matsuzaki and Julio Arakaki, and electronics technician Antonio Fernando Maiorquim.


References

[1] R. Shoureshi and P, H. Meckl, "Teaching Microprocessors in the 90's and Beyond", ASME Winter Annual Meeting, New Orleans, Louisiana, 1993

[2] A. Malvino, Electronic Principles, McGraw-Hill, 1993

[3] J. P. Hayes, Computer Architecture and Organization, McGraw-Hill, 3rd Edition, 1998

[4] P. Horowitz and W. Hill, The Art of Electronics, Cambridge University Press, 1989


Author Contact Information

Jun Okamoto Jr. (http://www.mcca.ep.usp.br/~jokamoto/index_i.html)
Department of Mechanical Engineering (http://www.mcca.ep.usp.br/welc_en.html)
Escola Politécnica of the University of São Paulo
Av. Prof. Mello Moraes, 2231
05508-900 São Paulo, SP
Brazil
Voice: +55 11 818 5516
Fax: +55 11 813 1886
E-mail: jokamoto@usp.br

Julio Cezar Adamowski. (http://www.mcca.ep.usp.br/~jcadamow/index_i.html)
Department of Mechanical Engineering (http://www.mcca.ep.usp.br/welc_en.html)
Escola Politécnica of the University of São Paulo
Av. Prof. Mello Moraes, 2231
05508-900 São Paulo, SP
Brazil
Voice: +55 11 818 5516
Fax: +55 11 813 1886
E-mail: jcadamow@usp.br

Tomaz Mikio Sasaki
Department of Mechanical Engineering (http://www.mcca.ep.usp.br/welc_en.html)
Escola Politécnica of the University of São Paulo
Av. Prof. Mello Moraes, 2231
05508-900 São Paulo, SP
Brazil
Voice: +55 11 818 5575
Fax: +55 11 813 1886
E-mail: tmsasaki@usp.br


Author Biographies

Jun Okamoto Jr. graduated in Electrical Engineering from Escola Politécnica of the University of São Paulo, Brazil, in 1983, obtained his Master of Engineering degree from Tokyo Institute of Technology, Japan, in 1987, and his PhD degree from Escola Politécnica of the University of São Paulo, Brazil, in 1994. Currently, he is Assistant Professor at the Escola Politécnica of the University of São Paulo, where he is responsible for the microprocessor undergraduate courses of the Mechanical Engineering Department. His research interests include integration of multiple sensor data, computer vision, robot real time control, and application of microprocessors in industrial automation.

Julio Cezar Adamowski was born in Parana, Brazil, on December 18, 1954. He received the degree of Aeronautical Mechanical Engineer from Instituto Tecnológico de Aeronáutica of São José dos Campos, Brazil, in 1980, and the degree of Master in Precision Machinery Engineering from the Faculty of Engineering of the University of Tokyo, Japan, in 1985. He started his academic career at the Mechanical Engineering Department of Escola Politécnica of Universidade de São Paulo in 1988, and in 1993 he received the Doctor's degree from this University where he is a Full Professor. His main research interests are in the field of sonic and ultrasonic transducers and industrial applications of ultrasound.

Tomaz Mikio Sasaki, graduated in Electrical Engineering from Escola Politécnica of the University of São Paulo, Brazil, in 1991, obtained his Master of Engineering degree from Escola Politécnica of the University of São Paulo, Brazil, in 1997. He is currently working as a Research and Development engineer at the Escola Politécnica of the University of São Paulo and is participating in several research projects that include application of neural networks on object recognition, robot real time control systems and application of microprocessors in industrial automation.


Return to Table of Contents