Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of...

12
DOI : 10.23883/IJRTER.2019.5040.WYJMC 102 Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1 , Kelvin Ndubuisi Nnamani 2 , Emmanuel Ugochukwu Chiboka 3 1 Senior Lecturer Department of Electronic and Computer Engineering Nnamdi Azikiwe University 2,3 M.ENG scholar, department of Electronic and Computer Engineering, Nnamdi Azikiwe University, Awka, Anambra State Abstract-This project analyzes the intelligent system design of a real-time process control trainer. The system was designed using AT89C52 microcontroller as the controlling device for three real- time processes, namely temperature, traffic lights, and intruder alert. These were developed into three different modules and later interconnected together. The entire system operates based on the execution of the stored program in the microcontroller. In this project, an algorithm was designed for the system of operation, and the control program was developed from the algorithm in Assembly language; though it could be written in any embedded system programming language like C++. Real- time simulation was done using Proteus software so as to ascertain the workability of the design in real life. The Bill of Engineering Measurement and Evaluation (BEME) not were carried out to determine the cost of the project. The prototype was constructed and it tested ok. Keywords- Real-time Process Control Trainer, Proteus Software, AT89C52 Microcontroller, control module, Temperature Sensor, modularization, Assembly Language, Pseudo code, Flowchart. I. INTRODUCTION Process control is an engineering discipline that deals with architectures, mechanisms and algorithms for maintaining the output of a specific process within a desired range in real-time. Industrial process control trainer has been harnessed in industrial processes such as waste water treatment, oil and gas purification, chemical, pulp and paper production, and food production[1].Process control enables automation, with which a small staff of operating personnel can operate a complex process from a central control room. The trainer has an in-built educational board with a pressurized vessel [2] and a set of sensors and actuators for level, pressure, temperature and flow. The sensors and actuators have control modules with interface circuits. A major characteristic of process control is that it occurs in real-time. And to real-time systems, timeliness is as important as the correctness of the output. In other words, they process information within specified interval or risk system failure. More elaborately, the computer is required to perform its tasks within the time restraints of some process or simultaneously with the system it is assisting and also to process systems data (inputs) from sensors for the purpose of monitoring and computing system control parameters (outputs) required for the correct operation of a system or process. The type of monitoring and control functions provided by the computer for subsystem units ranges over a wide variety of tasks, such as turn-on and turn-off signals to switches; feedback signals to controllers (such as motors, servos, and potentiometers) to provide adjustments or corrections; steering signals; alarms; monitoring, evaluation, supervision, and management calculations; error detection, and out- of-tolerance and critical parameter detection operations; and processing of displays and outputs. Digital control is a branch of control theory that uses digital computers to act as system controllers. Depending on the requirements, a digital control system can take the form of a microcontroller to a standard desktop computer.

Transcript of Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of...

Page 1: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

DOI : 10.23883/IJRTER.2019.5040.WYJMC 102

Intelligent System Design of Micro-Controller-Based Real-Time

Process Control Trainer.

Anthony Nosike Isizoh1, Kelvin Ndubuisi Nnamani

2, Emmanuel Ugochukwu Chiboka

3

1Senior Lecturer Department of Electronic and Computer Engineering Nnamdi Azikiwe University

2,3M.ENG scholar, department of Electronic and Computer Engineering, Nnamdi Azikiwe University,

Awka, Anambra State

Abstract-This project analyzes the intelligent system design of a real-time process control trainer. The system was designed using AT89C52 microcontroller as the controlling device for three real-time processes, namely temperature, traffic lights, and intruder alert. These were developed into three different modules and later interconnected together. The entire system operates based on the execution of the stored program in the microcontroller. In this project, an algorithm was designed for the system of operation, and the control program was developed from the algorithm in Assembly language; though it could be written in any embedded system programming language like C++. Real-time simulation was done using Proteus software so as to ascertain the workability of the design in real life. The Bill of Engineering Measurement and Evaluation (BEME) not were carried out to determine the cost of the project. The prototype was constructed and it tested ok. Keywords- Real-time Process Control Trainer, Proteus Software, AT89C52 Microcontroller, control module, Temperature Sensor, modularization, Assembly Language, Pseudo code, Flowchart.

I. INTRODUCTION

Process control is an engineering discipline that deals with architectures, mechanisms and algorithms for maintaining the output of a specific process within a desired range in real-time. Industrial process control trainer has been harnessed in industrial processes such as waste water treatment, oil and gas purification, chemical, pulp and paper production, and food production[1].Process control enables automation, with which a small staff of operating personnel can operate a complex process from a central control room. The trainer has an in-built educational board with a pressurized vessel [2] and a set of sensors and actuators for level, pressure, temperature and flow. The sensors and actuators have control modules with interface circuits. A major characteristic of process control is that it occurs in real-time. And to real-time systems, timeliness is as important as the correctness of the output. In other words, they process information within specified interval or risk system failure. More elaborately, the computer is required to perform its tasks within the time restraints of some process or simultaneously with the system it is assisting and also to process systems data (inputs) from sensors for the purpose of monitoring and computing system control parameters (outputs) required for the correct operation of a system or process. The type of monitoring and control functions provided by the computer for subsystem units ranges over a wide variety of tasks, such as turn-on and turn-off signals to switches; feedback signals to controllers (such as motors, servos, and potentiometers) to provide adjustments or corrections; steering signals; alarms; monitoring, evaluation, supervision, and management calculations; error detection, and out-of-tolerance and critical parameter detection operations; and processing of displays and outputs. Digital control is a branch of control theory that uses digital computers to act as system controllers. Depending on the requirements, a digital control system can take the form of a microcontroller to a standard desktop computer.

Page 2: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 103

Since process control is a digital real-time process, it is important that technical know-how and skills be acquired in order to efficiently control the installed devices and systems. From statistics, the National Institute for Standards and Technology (NIST) and the Abnormal Situation Management (ASM) Consortium estimate that U.S. process industries lose over $20 billion each year from abnormal situations. They have determined that 50% of abnormal situations are directly attributable to human error by plant personnel. Abnormal situations require the utmost operator skill, knowledge, and critical thinking. Despite significant losses from abnormal situations, process manufacturers continue to rely on operator intervention during start up, shutdown, and other operational scenarios. Training is fundamental to reducing these losses, whether at new or existing plants, industrial facilities need to consider use of an operator process trainer in their training programs [3]. A typical digital process trainer is multi-purpose digital experiment equipment comprising different built-in circuits. Trainers can be used to demonstrate a complete range of process control methods and strategies. Digital trainers can offer process modeling and even simulation, something that can improve the operator’s training a great deal.

II. METHODOLOGY

Trainers are built according to the concept that is to be taught, giving rise to so many types of them. But this paper presents a Real-time process control trainer. The trainer has a control module, containing the interface circuits for sensors and the actuators [2] and the ON/OFF, proportional, integral and derivative control circuits (PID) Real-time processes are basically sensor based. These sensors provide input to four modules interfaced with the central controlling unit, that is, the temperature control unit, traffic light unit, intruder alert unit and security light unit. However, to effectively explain how these units are integrated together to achieve the intended system, a methodology is followed. Methodology is necessary for the success of complex digital hardware design [4] and is categorized into system analysis, design, program coding, debugging, testing, and program maintenance using flowcharts, pseudo codes and modules.

III. SYSTEM ANALYSIS

System analysis is the process of studying an activity typically in order to define its goals or purposes [5] and to discover operations and procedures for accomplishing them most efficiently. So in order to effectively do this in this section, block diagram of the basic functionality of the system is utilized and the component used to realize the system is also described. The block diagram as shown in Figure 1, comprises the power supply, input interface, the control and output interface.

Figure 1 Block Diagram of Real-Time Process Control Trainer.

Page 3: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 104

IV. SYSTEM DESIGN

This chapter is a continuation of top-down approach to effectively analyze the system. The design of the digital process control involves mostly small scale integration components, the component counts with usually high for a fairly complex circuit [6]System design in most cases are based on modularization be it software or hardware systems and this project design is based on modularization. It allows for easy and effective design as the supra system is broken down into smaller units, modules or systems and the design for each module is carried out independently. Modularization facilitates easy troubleshooting and correction or easy debugging (in case of software development). In the light of the foregoing, the design of the real control system is divided into:

� Temperature control module � Traffic light control module � Intruder alert system module � Automatic light control module � CentralContolModule

4.1 Temperature Control Module This module interfaces LM35 Temperature Sensor 8052 Microcontroller AT89C52. LM35 gives analog reading and microcontroller process digital data so a midway converter is used to convert from Analog to Digital i.e. ADC0804 and display the result of a temperature on LCD, while an LED is used to indicate when the temperature limit (in this case 29oC) is exceeded. The output voltage from the LM35 is linearly proportional to the measuring temperature. The network of resistors and zener diode supplies 1.28V to Vref/2 pin of ADC0804 as its reference voltage. This is the voltage by which the step size of the ADC0804 will be set to 10mV. LM35 output voltage varies by 10mV per 0C change in temperature. Hence both the LM35 and ADC0804 are now working at 10mV change. So for a range of 0 to 100 0C, LM35 outputs 10mV per 0C and ADC0804 processes 0V to 1V. The state of the module and the ambient temperature as sensed by the LM35 in displayed on an LCD. For control, a switch is connected to the microcontroller to be used to activate the module. • Pin connection

� The data pins (DB0 to DB7) of the ADC0804 are interface with the port 3 of the microcontroller.

� The LED indicator is connected to the pin 0.7 of the microcontroller. � The pin2 of the LM35 is connected to the VN+ pin of the ADC; while its pin 1 and 3 are

connected to voltage source and ground respectively. � The control switch for the temperature is connected at the pin 1.2.The schematic diagram of

the Temperature control module is shown below.

Page 4: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 105

Figure 2. Temperature Control Modules.

4.2 Traffic Light Control Module

Figure 4 is a circuit diagram of traffic light control, and nine LEDs are used for the purpose of traffic light control.

Figure 3 Traffic Light Control Modules

An 8052 Microcontroller is the brain of this module with a control switch at the pin 1.0 to activate the module. The LEDs are interfaced to the Port two of the microcontroller and are powered with 5v power supply. LCD is used to display the status of the module. The LEDs get automatically switched on and off by making the corresponding port pins of the microcontroller LOW, based on the 8052 microcontroller and its programming done by using assembly language. At a particular period of time, only the green light holds ON for one lane and the other lights remains OFF, and after sometime, the changeover traffic light control from green to red takes place by making the succeeding change for glowing of yellow LED while for the other lanes, yellow and red light is ON. This process continues as a cycle.

Page 5: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 106

The cathodes of the LED are connected to port 2 and pin 0.0 of the microcontroller while the anodes are connected to a 5volts battery through a 220 ohms resistor. Green, yellow and red LEDs have a forward voltage of 2.2V and current of 20mA, so a resistor with a suitable value must be placed at anode. To obtain the value of such resistor, this formula is applied

Limiting resistor for all led used in this work From database, LED allowable current is taking as 23mA, and 5v across it. But � = V/I

� = 5/23x 10 � � =217Ω But for this work, 220� Resistor was used since it is readily available in the market.

4.3 Intruder Alert Module

Figure 5 is a schematic diagram of the intruder alert module. This module produces a buzz when the sensor detects an obstacle. To activate the module, the intruder alert switch (designated I_A) connected to pin1.3 is turned on. The obstacle avoidance infrared sensor is connected to pin 1.4 and once an obstacle is detected, the photodiode (infrared receiver) of the sensor module receives the reflected ray generates a potential difference or changes its electrical resistance. Due to the design of the obstacle avoidance sensor module, a low is sent to MUC and then the buzzer is activated.

Figure 4 Intruder Alert Modules.

Page 6: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 107

4.4 Automatic Light Control Module

This module involves the control of the on and off of a security light by the action of a light sensor. The module is activated by a switch (designated S_L) and connected to pin 1.1 of the microcontroller. The circuit can be used for implementing any type of automatic light control. The circuit uses an LDR to sense the light .When there is light the resistance of LDR will be low, so the voltage drop across potentiometer (POT) RV2 will be high. This keeps the transistor Q2 ON and 0 volt at the collector hence activating pin 1.5.When night falls the resistance of LDR increases to make the voltage across the POT R2 to decrease below 0.6V. This turns transistor Q2 OFF and causes a high at the collector, hence deactivating the P1.5. Once the MUC detects a high, at pin 1.1, it biases the base transistor at the pin 1.6 and then the security light is turned On.

Figure 5 Automatic Light Control System

4.5 Central Control Module

This includes the microcontroller and the switches that activate each module. The microcontroller is AT89C52. This is where the assembly language program is installed. It has the central processing unit with an internal memory which makes it a good choice. From the family of 8052, it was chosen because its program and data memory meets the requirement for the project. From the schematic diagram of the control module, the port 0 of the MCU is pulled up by 10K resistor pack to 5V, port 2 is used for LCD and traffic light, port 3 for data pins of ADC0804, port 1 for the control switches, LDR, the security light and infrared sensor module, finally port 0 is used for the special function pins of the LCD and ADC0804 (that is, RS, E, RD, WR.INTR etc). The design was planned in such a way that the number of pins can be enough for the interfacing of the numerous components with the MCU. The control switches are Single pole single throw switch. They are designated T_L (Traffic light module), S_L (security light), TEM (temperature module) and I_A(intruder alert module) in order to identify them. They are used to activate or deactivate the modules,

Page 7: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 108

Finally, the RESET button which is a normal open switch, used to reset the whole system when necessary.

Figure 6 Schematic Diagram of The Central Control Module.

4.6 The Integrated System Schematic Diagram

For the reason of neatness, clarity and out of necessity, so that all components will cater for and fully captured, I replaced the LDR, the control switches and infrared were replaced with logic probes. So there is discrepancy in feature but similarity in functionality .The effect is seen in figure 4.6 below.

Page 8: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 109

Figure 7 Schematic Diagram of The Integrated System.

4.7 Pseudo code and flowchart

PSEUDOCODE

1. Program BEGINS

2. Initialize ports and assign logic levels

3. Display WELCOME MESSAGE

4. Check Button Press a. IF Pin1.0 is equal to ZERO THEN Activate TRAFFIC LIGHT UNIT and Repeat Until

b. ELSE IF Pin1.1 is equal to ZERO THEN Activate SECURITY LIGHT UNIT and Repeat

Until

c. ELSE IF Pin1.2 is equal to ZERO THEN activate TEMPERATURE CONTROL UNIT and Repeat Until

d. ELSE IF Pin1.3 is equal to ZERO THEN activate INTRUDER ALERT and Repeat Until

e. ELSE LONG JUMP to Welcome Message.

f. Else. END.

Page 9: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 110

Figure 8 Flowchart of the Real-Time Process Control Trainer.

V. MODULE IMPLEMENTATION, TESTING AND RESULTS

The project is a combination of different modules, so it was implemented according to the modules involves. It was divided into compartments for each module with the microcontroller and switch which constitutes the central control module at the center location. Figure 9 below shows the modules being implemented on amber colored printed circuit board.

5.1 Power supply

External power pack was also used in order to reduce the complexity and bulkiness of the project, since it involves very sensitive components and space is needed for more clarity.

Initialize

Activate

Intruder Alert

Module

Activate

Temp. Module

Activate

Security Light

Module

Activate

Traffic Light

Module

IS P1.2 = 0

IS P1.3 = 0

IS P1.1 = 0?

IS P1.0 = 0?

Begin

Check button

press

YES

Display

Wcome

YES

YES

YES

NO

NO

NO

End

Page 10: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 111

Figure 9 Modules Implementation On PCB.

5.2 Packaging

In order to achieve a more standard implementation and a world class project, packaging is of utmost importance. So in the light of this, I used transparent Perspex and a plastic platform.

Figure 10 The Complete Project.

5.3 System Testing

Since the system is modularized, the bottom – up approach was adopted. Bottom – up approach testing is an approach to integrated testing where the lowest level modules and components are tested first, then used to facilitate the testing of higher level modules. So each module was tested, then the whole system was tested to ensure conformity with. These tests include: • All the components were checked to see if they are okay before they were used in the circuitry. • Potentiometer was adjusted to the proper range.

Page 11: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 112

• The components which were not functioning properly were changed as soon as possible to avoid other components being affected by the damage.

• Testing equipment was in proper range of the output measured at any point of the circuit, or component so as to avoid wrong readings.

• The obstacle avoidance infrared sensor module was tested appropriately to see if its ranging is accurate.

• As the modules were installed they were tested and confirmed to be in order.

Table 1 Test For Intruder Alert Module.

Table 2 Test for Automatic Light Control Module

Test data Expected Test Result Actual Test result

LDR detects darkness Security light is turned ON Confirmed

Light falls on LDR Security light is turned OFF Confirmed

Table 3 Test for Temperature Control Module

Test data Expected test Result Actual test

result

Low temperature applied to sensor

Display temperature on LCD

Confirmed

29oC temperature applied to sensor

LED indicator turns ON and display temperature on LCD

Confirmed

Table 4 Test for Traffic Light Control Module

Test data Expected test Result Actual test

result Traffic control Switch turned On

Display status on LCD and operate Traffic LED

Confirmed

Test data Expected Test Result Actual Test

Result

Obstacle detected Sensor output changes from 1 to 0 and Buzzer makes ten blipping sound

Confirmed

Potentiometer on sensor is adjusted

Obstacle detecting range should change. Confirmed

Page 12: Intelligent System Design of Microcontroller-based Real ... · Intelligent System Design of Micro-Controller-Based Real-Time Process Control Trainer. Anthony Nosike Isizoh 1, Kelvin

International Journal of Recent Trends in Engineering & Research (IJRTER)

Volume 05, Issue 04; April- 2019 [ISSN: 2455-1457]

@IJRTER-2019, All Rights Reserved 113

Table 5 Test for Central Control and Display Module

Test data Expected test Result Actual test result

Intruder alert switch turned on

Activate intruder alert module and display status on LCD

Confirmed

Light control switch turned on

Activate Automatic light control module and display status on LCD

Confirmed

Temperature control switch turned on

Activate Temperature control module and display status on LCD

Confirmed

Traffic light control switch turned on

Activate Traffic light control module and display status on LCD

Confirmed

VI. CONCLUSION

The project, titled, “Real-time Process Control Trainer” used AT89C52 microcontroller as its intelligent device. The system was programmed in Assembly language to achieve the required system control. It shows how electronic sensors can be used to control some basic components automatically by sensing the condition of the environment. This is however the basics of real-time projects and devices. The temperature sensor which is the LM35 senses the temperature of a room and sends out a corresponding voltage signal, the obstacle sensor which is the obstacle avoidance infrared sensor senses the presence of an obstacle and activate an alarm and the Light detecting resistor senses amount of light and on or off the security light. An LCD is used to display the functional status of this sensor which already is grouped into modules with the components they control.

REFERENCES

I. Mr. khushal k. Agrawal. 2017-2018, “Multi-process control Trainer Using Distributed control system”, pp 1-55. https://lecturenotes.in/download/project-report/21370-multi-process-control-

trainer-using--distributed-control-system. II. Infinit Technologies(2019), “IT-5200 Process Control Trainer”. Retrieved from: infinit-

technologies.com/our-products/it-5200-process-control-trainer/. III. “The Role of Simulator Technology in Operator Training Programs. [Online]”, The Role of Simulator

Technology in Operator Training http://www.controleng.com/channels/process-control/process-control-news/single-article/the-role-of-simulator-technology-in-operator-training-program

IV. Nwankwo Vincent Ifechi, “Design and implementation of a microcontroller-based versatile Y- and Cross-Junction Traffic Light control system/Trainer”, Nnamdi Azikiwe University Open Educational Resources, October 2010.pp 1-112.

V. https://en.m.wikipedia.org/wiki/systems_analysis. VI. Udeze Chidiebere et al, “A cost-effective Approach to the design and implementation of

micro-controller-based universal process control trainer”, International Journal of Advanced Computer Science and applications, Vol.3, No.1, January 2012. Pp 142-147.