Design of a Microprocessor-based Control System of a Compression Molding Process

George K. Adam, “Design of a microprocessor-based control system of a compression molding process”, In Proceedings of the 9th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS’04), pages 207-212, IEEE Computer Society Press, ISBN 0-7695-2109-6, 14-16 April, 2004, Florence, Italy.

Design of a Microprocessor-based Control System of a Compression Molding Process
George K. Adam Technological Educational Institute of Larissa, Larissa, Greece gadam@teilar.gr

Today a microprocessor-based control system is a fundamental component in many of the industrial control and automation applications. In this paper is presented the design and implementation of a microprocessor-based computer system for the control and operation of a compression molding process system. The application circuit developed is a specific design of a low-cost embedded system. Simulation and analysis tests were carried out to verify the design of the prototype circuit board. Final evaluation of system’s performance was conducted in real-time experiments.

1. Introduction
Embedded systems are ubiquitous, and they represent the major market for microprocessors [1]. As many recent studies have shown, the microprocessor-based controller is one of the primary units in industrial control systems [2], [3], [4]. Modern industrial controllers are based on digital computers, which read the program instructions, make the control calculations and execute the instructions by transmitting the proper commands to the actuating devices. The use of digital computers as the process controllers allows improvements and upgrades to be made in the control programs quite easily. The introduction of computers technology in automated manufacturing operations led towards more sophisticated systems, such as computer-integrated manufacturing and flexible manufacturing systems [5], [6]. Machine systems today are becoming more complex and demanding. As a result, companies like Intel have developed application embedded microprocessors and systems specific for motion control [7]. This paper presents the design and implementation work of a control and operation system, for a compression molding process of concrete materials, based on 80C188EB Intel embedded microprocessor (25 MHz, 20bits address bus, 1M address space, 8 bits data bus, 16 I/O pins, 3 timers/counters, 5V) of CMOS technology.

The 80C188EB microprocessor is designed as embedded controller. The controller basically consists of the 80C188EB microprocessor unit, two programmable peripheral interface adapters (PPIs), digital-to-analog and analog-to-digital converters, a simple alphanumeric keyboard (0-F) and an indicators display (5x7-segment LEDs). The control system developed is an open modular architecture, which allows the incorporation of additional modules (see Figure 1). For this reason, high-level interactive control (Visual C/C++) is currently under development. Finally, verification of system performance is carried out through simulations in VHDL (IEEE Standard Hardware Description Language), and real tests in a machines construction company (Adams Machines Constructions Co., Volos, Greece). The remainder of this paper is organized as follows. Section 2 provides a brief description of the system process under control. Section 3 describes the methodology used in designing the controller and provides details of the implementation process. In section 4 are presented the design simulations, and in section 5 briefly the performance results obtained from real tests of the controller’s functionality. Conclusions and related future research are given in Section 6.

2. The system process under control
The compression molding process under investigation involves the pressing of wet concrete mixture between two halves of a mold to fill the material in the mold form. The compression system under control is part of a hydraulic press machine which is consisted mainly of a two-halves mold (mold table and a tamper head), mold position proximity sensors (of solid state inductive type), electro-valves, hydraulic solenoids and a pump system that drive the actual molds actuators shafts. The compression is executed by a double-acting hydraulic cylindrical actuator of 1700 MPa active pressure. The compression system uses a 24Vdc double actuated solenoid valve to advance and retract the mold unit. The

Proceedings of the Ninth IEEE International Conference on Engineering Complex Computer Systems Navigating Complexity in the e-Engineering Age 1050-4729/04 $20.00 ? 2004 IEEE

system is driven by a large hydraulic pump that requires 240Vac (rated at 20A).
High-level user interface routines under develoment Serial communication assembly subroutines Compression control assembly subroutines Software developed

storage of the control data. A simplified block diagram of the 80C188EB-based controller is given in Figure 2.
mold pos relay

Mold unit actuator M

Bridges switches relays

24VDC I/O sockets
80C188EB-based Process Controller Hardware purchased or built

82C55 PPI Static RAM 2x32KByte

ADC & DAC Intel 80C188EB CPU

RS-232 EPROM 64KByte

Press machine

Hydraulic equipment


Hardware and equipment supplied by the manufacturer Software interface and application program

Figure 1. Developed and proprietary hardware and software. The control of the compression molding process is based on sensory information which is obtained from mold’s position sensors. In this way, data are collected from the process and used as input to the software control algorithm. Sensors allow the core control unit (80C188EB processor) to detect the state of the compression molding process (e.g., the inductive proximity sensors sense whether a metal object passes nearby). When a sensor detects a change it signals that change to the controller. This is typically done by switching a voltage or current on or off. The controller processes the inputs of sensors feedback and controls the electrical valves that drive the equipment (hydraulic pump motor and compression actuators). Typical process parameters that are inputs to the controller are mold position (based on mold limit switch), valve status (opened or closed), and motor on or off. The valves control the rate of the hydraulic fluid flow, through the hydraulic solenoids to the actuators that perform mold compression and product extraction. A compression mold operation here produces multiple parts (concrete products) on each work cycle.

Port C

82C55 Parallel I/O



Ports A&B

0 1 2 3 4 5 6 7 8 9 A B C D E

Figure 2. Block diagram of the 80C188-based controller.

3. Controller design architecture
The core of the control part is the 80C188EB microprocessor the architecture of which was optimized for applications in industrial controllers. The use of the microprocessor reduces the amount of elements required, simplifying the design process, and subsequently the board's dimensions. The initial design development procedures of the controller and control software were followed by simulations and real-time implementation. The development of the controller’s physical layout design was implemented using OrCAD Capture software (Cadence Design Systems, Inc.).

3.1. The control hardware
The controller basically consists of the 80C188EB microprocessor unit, memory modules, D/A and A/D converters and the programmable peripheral interface units. This controller has embedded all the required architecture to perform the control and operation of the compression molding system. One of the advantages of the controller is the low power consumption (5-volt circuit supply). The system's synchronization is accomplished through an external oscillator (32MHz), in order to ensure high accuracy and TTL level signal required. In Figure 3 is shown a part of the main 80C188EB-based control unit design.

2.1. Controller configuration
The 80C188EB-based controller contains two 62256 (32K x 8) RAMS that compose an 64K x 8 bit memory, an 27C512 (64K x 8) EPROM for program storage, an RS232 communication port (for external PC communication), two 82C55 programmable peripheral interface circuits which provides the ability to directly connect to equipment (electro-valves and motor relays and driver), two converters DAC0830 and ADC0804, and a simple alphanumeric keyboard and indicators display. The size of the EPROM is chosen to be sufficient for the

Proceedings of the Ninth IEEE International Conference on Engineering Complex Computer Systems Navigating Complexity in the e-Engineering Age 1050-4729/04 $20.00 ? 2004 IEEE


200p 4.5u

into three ports (A, B, C) of 8 lines each. This circuit is software programmable for three modes of operation.
61 66 68 70 72 74 76 78 62 67 69 71 73 75 77 79 80 81 82 83
53 36


28 27 26 25 24 21 20 19 58 55 57 50 49 52

P1.0/GCS0 P1.1/GCS1 P1.2/GCS2 P1.3/GCS3 P1.4/GCS4 P1.5/GCS5 P1.6/GCS6 P1.7/GCS7
P2.1/TXD1 P2.3/SINT1 P2.0/RXD1 P2.6 P2.7

S0 S1 S2

4 19 2 1 8 13 11 15 10 16 14 12 17

R1IN R2IN T1IN T2IN C1+ C1C2+ C2+ C2C2V+ VV-


3 20 5 18

10 9 8

AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19/ONCE



32Kx8 SRAM

11 1


2 3 4 5 6 7 8 9 1 19 A0 A1 A2 A3 A4 A5 A6 A7 DIR OE B0 B1 B2 B3 B4 B5 B6 B7 18 17 16 15 14 13 12 11

Address Latch A0-A7

MAX233 serial
1 6 2 7 3 8 4 9 5

6 11 16 12 15 4 38 7 45 47 5 30 29
33 34


Data tranceiver D0-D7

22 20


41 40
31 32 35 59 56 54


22 27 20 VCC 28


22 27 20 VCC 28


TMS27C512 D0-D7



2 3 4 5 6 7 8 9 1 19 A1 A2 A3 A4 A5 A6 A7 A8 G1 G2 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 18 17 16 15 14 13 12 11

51 13 17 18 37 46 48 14


Figure 4. Memory units.


Figure 3. The 80C188EB microprocessor-based controller.

The system uses two 74HC573 latch circuits (tri-state octal D-type latch) and an 74HC541 buffer (tri-state octal buffer-line driver) to buffer the addresses (A0-A7, A8A15 and A16-A17) from the microprocessor towards the EPROM and SRAMs memory units. An 74HC245 (octal tri-state) data transceiver (CMOS) is used in data (AD0AD7) transmission lines. EPROM memory is selected by the UCS pin, while the GSCO and GSC1 pins select the SRAM devices. The bi-directional data bus AD0-AD7 is used to transfer data to and from memory and peripheral devices. In Figure 4 is shown the EPROM and SRAM memory units. The controller is focused in the operation of the electro-hydraulic valves (open/close) and the ac motion motor (start/stop) (nominal voltage 240V, nominal current 9.1A) that drive the hydraulic pump, as well as the acquisition and process of sensors signals. For this reason the controller utilizes the 82C55 PPI and the D/A and A/D converting circuits. The 82C55 IC divides the 24 lines

The controller uses the address bits A0-A1 to access the two internal command registers for programming its operation and provide control signals for machine’s operation. This circuit uses the 82C55 PPI to provide it with the drive signals that are used to control the interfaced motor. The 82C55 can interface any TTLcompatible I/O device to the microprocessor and provides a maximum of 4 mA of current at each output. In Figure 5 is shown a part of the input/output control system and interface modules. The digital-to-analog converter (DAC0830) transforms an 8-bit binary number into an analog voltage (28 different voltage levels). The output of the converter drives a relay scheme that operates (start/stop) the circuit that allows the ac motor to be turned on. Although relays are rarely used for control logic, they are still essential for switching large power loads. Relays can work with voltages up to 250V with current up to 1A. The motor on relay can be a single pole single throw (SPST). The relay is selected so that to carry the peak motor currents. A direct connection is also provided to the solenoid valve that drives actuators for the compression.

Proceedings of the Ninth IEEE International Conference on Engineering Complex Computer Systems Navigating Complexity in the e-Engineering Age 1050-4729/04 $20.00 ? 2004 IEEE

32Kx8 SRAM

2 3 4 5 6 7 8 9

D0 D1 D2 D3 D4 D5 D6 D7

Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7

19 18 17 16 15 14 13 12

10 9 8 7 6 5 4 3 25 24 21 23 2 26 27 1

A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15

O1 O2 O3 O4 O5 O6 O7 O8

11 12 13 15 16 17 18 19

10 9 8 7 6 5 4 3 25 24 21 23 2 26 1

A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14

D0 D1 D2 D3 D4 D5 D6 D7

11 12 13 15 16 17 18 19

10 9 8 7 6 5 4 3 25 24 21 23 2 26 1

A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14

D0 D1 D2 D3 D4 D5 D6 D7

11 12 13 15 16 17 18 19

The analog-to-digital converter (ADC0804) converts
18 17 16 15 14 13 12 11 5 DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 INTR +IN -IN VREF/2 CLKIN CLKR RD WR CS VCC/VREF 6 7 9 4 19 2 3 1 20

24VDC Input Socket
2 4 6 1 3 5 3 2


to hydraulic pump relay output

PIA 82C55
34 33 32 31 30 29 28 27 9 8 35 5 36 6 D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 RESET RD WR CS PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 4 3 2 1 40 39 38 37 18 19 20 21 22 23 24 25 14 15 16 17 13 12 11 10

solid state mold sensor 1K 0.001u

7 6 5 4 16 15 14 13 VCC 1 2 18 19 17 8



11 12 9

24VDC Output Socket
2 4 6 1 3 5 O2

to the solenoid valve (drives the compression) K1

24V DC

ac motor

Motor power supply

relay SPST


2 4 6 1 3 5 O3 O4 O5

other sensor relays

Figure 5. Input/output control units. 1 2 1 2 1 2 1 2 1 2 1 2 an analog input voltage into a digital code. Although the 3 4 3 4 3 4 3 4 3 4 3 4 interrupt signal (INTR) here is not shown it is being 5 6 5 6 5 6 5 6 5 6 5 6 connected to an interrupt input of the 80C188EB 7 8 7 8 7 8 7 8 7 8 7 8 9 10 9 10 9 10 9 10 9 10 9 10 microprocessor to signal periodically the end of the 11 12 11 12 11 12 11 12 11 12 11 12 conversion. The relay output of the hydraulic pump is 13 14 13 14 13 14 13 14 13 14 13 14 connected (via a 24Vdc industrial standard scheme) to the VCC +5V LN07402 ADC input. Another input is from the inductive sensor of the mold’s position. The DAC0830 and ADC0804 units 2N6520 T1 10K T2 T3 T4 T5 T5 are connected to the microcontroller as illustrated in Figure 5. 300 Figure 6 shows an 82C55 PPI connected to a set of six 7-segment LED displays (LN07402) interfaced (via ULN 7406 2003A) to port A, and a small keyboard of 16 switches (0PB2 PB3 PB4 PB5 PB6 PB7 9, A-F) interfaced to ports B (PB0-PB1) and C (PC0-PC5) of the 82C55. The controller and control software Figure 6. Indicators display. generates periodical time interrupts to determine whether any of the keys was pressed. This is initiated by an 3.2. The control software interrupt generated from the internal timer of the microprocessor every 600?s. In this way during a single The control software was written in assembly language interrupt the keyboard is checked and the indicators are using the 80x86 family MASM Assembler. The code was updated, while at the same time the sensors feedback is optimized in order to use efficiently the available memory checked and the hydraulic pump’s (valves) operation is and reduce compilation time and execution speed. The regulated. Figure 7 shows the design of the keyboard program is designed to respond to sensor or operator input interface. by executing the appropriate subroutine corresponding to The voltage levels for the inputs and outputs are the input. This program of instructions is repeated on each important. Although the digital outputs (TTL level) will work cycle. Each work cycle consists of the same steps be between 0V and 5V, analog inputs and outputs will and associated process parameters. An indicative vary. For this reason if these voltage limits are exceeded fragment of this control software module is given below. the board has built in protection (1A fast blow fuse). Here, the controller compares the sensor output (mold
2 2 2 2 2 1 1 1 1 1 1 2

Proceedings of the Ninth IEEE International Conference on Engineering Complex Computer Systems Navigating Complexity in the e-Engineering Age 1050-4729/04 $20.00 ? 2004 IEEE

34 33 32 31 30 29 28 27 2 3 4 5 6 7 8 9 11 1 D0 D1 D2 D3 D4 D5 D6 D7 LE OE Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 19 18 17 16 15 14 13 12 9 8 35 5 36 6 D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 RESET RD WR CS PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 4 3 2 1 40 39 38 37 18 19 20 21 22 23 24 25 14 15 16 17 13 12 11 10 1 2 3 4 5 6 7 9 1B 2B 3B 4B 5B 6B 7B COM 1C 2C 3C 4C 5C 6C 7C 16 15 14 13 12 11 10


Address Latch A16-A17


1 1 1 1


7 5 3 0

2 1 2 1 2 1 2 1

6 4 2 1

2 1 2 1 2 1 2 1

PB0 F D B 8
2 1 2 1 2 1 2 1

2 2 2 2


E C A 9



Figure 7. Keyboard interface.

position limit switch) with the input and makes the required adjustment in the process. ; procedure to read and control mold pos relay moldpos proc near mov al, pos ; get position cmp cx, 0001h je active ; relay is ON cont: out port, al ; activate valve ret step endp This adjustment is accomplished by activating a flow valve of mold’s compression arms-shafts. The overall software control system provides all the required control facilities for the control of the compression molding process, through a low-level programming interface. The application code was developed on a desktop host PC, before being downloaded (the executable) onto the target board. Once development was complete the executable code was programmed in the onboard EPROM for standalone operation.

4. ModelSim simulations
The increasing complexity of the designed system functionality required an accurate modeling system to validate the initial specifications of the controller and analyze the design solutions taken. Each step of the hardware design was validated by simulation models. Simulations were executed to verify the design of the controller at various stages during the development process. Design simulations consisted of functional models in VHDL synthesized using OrCAD’s ‘netlist’

utility and executed using a specific VHDL simulation package (ModelSim SE Plus 5.7d, Model Technology – Mentor Graphics Corporation) on an Intel Pentium with HT platform. Although most of the simulations and analysis were carried out within this package, some of the hardware analysis and synthesis was also performed with Leonardo Spectrum software package (Mentor Graphics, Inc.). For simplification, peripheral units were modeled as a black box with their external signals on one side and microprocessor’s and PIAs signals on the other side. The VHDL code produced was partitioned into several process statements according to the described design architecture of the controller. The architecture of the simulated controller with all important signals is visible in the VHDL simulator. The whole length of the simulation model code used in system’s functionality verification is not presented due to its substantial length. A fragment of the simulated code of the 80C188EB-based controller’s behavioral description follows below. LIBRARY IEEE; USE IEEE.std_logic_1164.all; ARCHITECTURE STRUCTURE OF DESIGN1 IS COMPONENT \82C55\ PORT ( D0 .. D7: INOUT std_logic; PA0 .. PA7: INOUT std_logic; PB0 .. PB7: INOUT std_logic; PC0 .. PC7: INOUT std_logic; VCC, GND : IN std_logic; \R\\D\W\\R\C\\S\\\ : IN std_logic; A0, A1 : IN std_logic; RESET : IN std_logic; ); END COMPONENT;

Proceedings of the Ninth IEEE International Conference on Engineering Complex Computer Systems Navigating Complexity in the e-Engineering Age 1050-4729/04 $20.00 ? 2004 IEEE

The verification process took about 40% of the design cycle. The verification test generates input signals and checks the value of the output signals. A fragment of the simulated test data used is the following: Inputs: D0-D7: bit_vector(7 down to 0) := “11111111” Outputs: PB0-PB7: std_logic_vector((7 down to 0) The input vector PA0-7 reads the same value if the test is passed.

5. Performance results
The performance of the designed control system was evaluated under real-time operating conditions. Real-time experiments were conducted to observe the functionality of the controller during the operation of the compression molding system. All the tests and measurements have been carried out based on constant compression pressure, as well as other specific manufacturing factors and conditions. During the real test procedures several system internal data were collected and analyzed for testing primarily system's efficiency and accuracy. Although realtime experiments were time-consuming, certain tests have been performed and the results obtained were compared to the specifications established during the initial design stages. Although some of the initial design specifications had to be redefined and redesigned, the final control system proved to be stable, ensuring normal operation of the process under control.

decreased. In addition, the system employs only those circuits that are needed for the implementation of process monitoring and control. An accurate analysis and evaluation of the controller was performed by using simulation software. Although several problems have been tackled, the results obtained of the implementation of the presented control system were satisfactory, and in some cases improved the operation accuracy of the system under control. In addition, certain key points for further research have been identified. In any automated system may occur malfunctioning events that may result in costly delays and loss of production. For this reason, among other objectives (e.g., improve high-level control, based on previous research work [8]), future work will focus in improving the selfdiagnostic functions, such as monitoring for error detection and recovery, in order for the controller to automatically take the necessary corrective actions.

7. References
[1] J. Henkel, “Closing the SoC Design Gap”, IEEE Computer, IEEE Computer Society Press, Los Alamitos, CA, September 2003, pp. 119-121. [2] Bose, B.K., Microcomputer Control of Power Electronics and Drives, IEEE Press, New York, 1987. [3] Bollinger, J.G., and N.A. Duffie, Computer Control of Machines and Processes, Addison Wesley, New York, 1988. [4] Astrom, K.J., M. Blanke, A. Isidori, W. Shaufelberger, and R. Sanz (eds.), Control in Complex Systems, Springer Verlag, New York, 2000. [5] Holt, D.R., Integrated Manufacturing Engineering Systems, McGraw-Hill Inc., New York, 1992. [6] G.N. Saridis, “Intelligent Manufacturing in Industrial Automation”, Handbook of Industrial Automation, R. Shell, and E. Hall, (eds), Marcel Dekker, New York, 2000, pp. 485-488. [7] Short, K.L., Embedded Microprocessor Systems Design: An Introduction Using the Intel 80C188EB, Prentice-Hall, New York, 1998. [8] G.K. Adam, and N. Mastorakis, “High level programming and control of a manufacturing system”, Transactions on Circuits, vol. 2, no. 1, WSEAS, New Jersey, January 2003, pp. 301-308.

6. Conclusion
The design of complex control systems requires efficient and powerful CAD tools, which if applied correctly may have a considerable positive influence on quality, development time and cost of the embedded product. In this paper was presented the design of a low-cost efficient controller of a compression molding system. The controller was realized on the base of the 80C188EB Intel embedded microprocessor. It is evident, that by using onboard a microprocessor the amount of electronic elements implemented in the design and final realization is

Proceedings of the Ninth IEEE International Conference on Engineering Complex Computer Systems Navigating Complexity in the e-Engineering Age 1050-4729/04 $20.00 ? 2004 IEEE