[ieee ieee southeastcon 2009 (southeastcon) - atlanta, ga, usa (2009.03.5-2009.03.8)] ieee...

5
National Instruments® LabVIEW™ based Pharmaceutical Medication Device with Supervisory Control and Data Acquisition System (SCADA) Muhammad Owais Mehmood, Muhammad Owais, Muhammad Saleheen Aftab, Fawad Shamim, Sohaib Nomani Department of Electronic Engineering NED University of Engineering & Technology Karachi, Pakistan Email: [email protected], {ovaisbabai, saleheen2006, fawad_shamim, sohaibnomani}@hotmail.com Abstract Pharmaceutical Medication Devices are used to fill, count, package & deliver medicines ensuring an automated & efficient batch production. Different types of devices are used but the theme here is to increase the efficiency by introducing Supervisory Control and Data Acquisition System (SCADA) which overcomes human intervention and increases the overall efficiency of the pharmaceutical process. Hardware design of an efficient batch production device is also presented along with the mechanical aspects. 1. Introduction The theme of this paper is to build an accurate, affordable & automated pharmaceutical device which can batch process medicines. The industrial process is integrated with computer system monitoring and controlling and SCADA. Sensors, Actuators are selected in consideration with the requirements of the Pharmaceutical industry. Unlike [1], in which controlling of portable pharmaceutical device is done with PIC16F877A, the control interfacing is provided by the software which is National Instruments® LabVIEW™. One benefit of LabVIEW over other development environments is the extensive support for accessing instrumentation hardware. Mechanical design can automate the process for any oblong, triangle, square and spherical capsules at high speed. However, the present design has been optimized for spherical tablets; Nivaquine – Sanofi –Aventis Pakistan Limited tablets in particular. The design is divided into two sections: Hardware and Software. 2. Hardware Design The hardware design is further broken down into Mechanical & Electronic portions. Each portion has different elements, devices which are tested, combined and then interfaced with the SCADA system. 2.1 Mechanical Structure The basic purpose of Mechanical structure is the flow control of packaging material (bottles) and the medicines. A conveyor belt, rotating drum, apertures, funnel, and hopper are used for this purpose as shown in Figure 1. The flow of medicines is mechanically controlled by a rotating drum which has a custom designed circumference (for five Nivaquine tablets) with apertures so that a fix number of tablets can go into the bottles. The design of the circumference specifies the amount & the shape of tablets and it can be very easily modified. A hopper containing bulk tablets is fixed very close to the drum. A PVC material is used to cover the major angular part of the drum except the part that has slots on it. Whenever the drum rotates, fixed number of tablets is filled into the slots from the hopper, which are later dropped into bottles through a funnel. The conveyor belt is used for the actuation of the bottles or any other packaging material which might be used to fill the medicines with. Figure 1. Mechanical Design Picture

Upload: sohaib

Post on 09-Mar-2017

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [IEEE IEEE Southeastcon 2009 (SOUTHEASTCON) - Atlanta, GA, USA (2009.03.5-2009.03.8)] IEEE Southeastcon 2009 - National Instruments® LabVIEW™ based pharmaceutical medication device

National Instruments® LabVIEW™ based Pharmaceutical Medication Device with Supervisory Control and Data Acquisition System (SCADA)

Muhammad Owais Mehmood, Muhammad Owais, Muhammad Saleheen Aftab, Fawad Shamim, Sohaib

Nomani Department of Electronic Engineering

NED University of Engineering & Technology Karachi, Pakistan

Email: [email protected], {ovaisbabai, saleheen2006, fawad_shamim, sohaibnomani}@hotmail.com

Abstract

Pharmaceutical Medication Devices are used to fill, count, package & deliver medicines ensuring an automated & efficient batch production. Different types of devices are used but the theme here is to increase the efficiency by introducing Supervisory Control and Data Acquisition System (SCADA) which overcomes human intervention and increases the overall efficiency of the pharmaceutical process. Hardware design of an efficient batch production device is also presented along with the mechanical aspects.

1. Introduction

The theme of this paper is to build an accurate, affordable & automated pharmaceutical device which can batch process medicines. The industrial process is integrated with computer system monitoring and controlling and SCADA. Sensors, Actuators are selected in consideration with the requirements of the Pharmaceutical industry. Unlike [1], in which controlling of portable pharmaceutical device is done with PIC16F877A, the control interfacing is provided by the software which is National Instruments® LabVIEW™. One benefit of LabVIEW over other development environments is the extensive support for accessing instrumentation hardware.

Mechanical design can automate the process for any oblong, triangle, square and spherical capsules at high speed. However, the present design has been optimized for spherical tablets; Nivaquine – Sanofi –Aventis Pakistan Limited tablets in particular.

The design is divided into two sections: Hardware and Software.

2. Hardware Design

The hardware design is further broken down into Mechanical & Electronic portions. Each portion has

different elements, devices which are tested, combined and then interfaced with the SCADA system. 2.1 Mechanical Structure

The basic purpose of Mechanical structure is the flow control of packaging material (bottles) and the medicines. A conveyor belt, rotating drum, apertures, funnel, and hopper are used for this purpose as shown in Figure 1.

The flow of medicines is mechanically controlled by a rotating drum which has a custom designed circumference (for five Nivaquine tablets) with apertures so that a fix number of tablets can go into the bottles. The design of the circumference specifies the amount & the shape of tablets and it can be very easily modified.

A hopper containing bulk tablets is fixed very close to the drum. A PVC material is used to cover the major angular part of the drum except the part that has slots on it. Whenever the drum rotates, fixed number of tablets is filled into the slots from the hopper, which are later dropped into bottles through a funnel.

The conveyor belt is used for the actuation of the bottles or any other packaging material which might be used to fill the medicines with.

Figure 1. Mechanical Design Picture

Page 2: [IEEE IEEE Southeastcon 2009 (SOUTHEASTCON) - Atlanta, GA, USA (2009.03.5-2009.03.8)] IEEE Southeastcon 2009 - National Instruments® LabVIEW™ based pharmaceutical medication device

2.2 Electronic Design

Electronic design is implemented using DC motors,

motor driving circuits, Infrared Beam Proximity Sensors and parallel port interfacing circuit.

2.3 DC Motors & Driving Circuits

Two DC motors are used to actuate the whole mechanism. Hence, the performance of the design depends heavily upon the controlling action of these motors. One motor is used to drive the conveyer while the other rotates the drum mounted above the conveyer.

The response time of the motors to the control signal is of vital importance. For this purpose, transistor based H-bridge is used as an interface between the controlling and driving blocks because they are simple and can be used for higher current requirements. An H-bridge also makes the motor bi-directional.

TIP107, TIP102 Darlington power transistors, used in the H-bridge, provide high speed switching as compared to the relays thus providing a fast response time.

The braking action of the motor is also a crucial aspect of the design. When the motor halts, the undesirable reverse current makes its way to through the transistor, unless and until an alternate way is provided. For this, a freewheeling diode is placed across the collector and emitter terminals of the transistor.

To prevent any damage to the control circuitry by reverse current opto-isolators are used, making it impossible for the reverse current to have access to the control circuit as it provides mechanical isolation between control and power sides. 2.4 Infrared Beam Proximity Sensor

Infrared transmitter-receiver has been used to detect the presence of bottles to be filled. Transmitter is placed at one end of the conveyor and receiver is placed on the other hand exactly in the line of sight of transmitter.

2.4.1 Transmitter. The transmitter circuit is quite simple and based on LM556 timer, which consists of two 555 timers. These two timers operate independently of each other sharing only VCC & Ground. The first timer is used to generate a square wave of about 10ms (100 Hz) with a duty cycle of about 96% while the second timer is used to generate a 38 kHz square wave. This particular frequency is set to modulate the 100Hz signal (Amplitude modulation) in order to fulfill the characteristics of the receiver module. An inverter has been used after the output of the first timer. As the receiver module can detect the square wave signal properly of around 38 kHz modulated by another square wave signal with a minimum period of about 10 ms and a duty cycle of 4%, which cannot be achieved by a 555 timer directly as it can only generate the signals with a minimum duty cycle of 50% [5]. Thus initially a square wave of 96% duty cycle is generated and then it is inverted to have a duty cycle of 4%.

The RESET pin of 38 kHz timer is connected to the inverted output of the 100 Hz signal so that the second timer works only when the Reset pin of the timer is given high voltage. Figure 3 shows the final modulated waveform of the transmitter with which the IR led is driven. 2.4.2 Receiver. The module used in receiver is TSOP 1738. Its main features include immunity to invalid signals (due to band pass filter inside the module), low power consumption and active low output [6]. It receives the modulated infrared signals from the transmitter portion and due to demodulator inside the receiver module; the carrier and modulated waves are separated. At the output pin we have our 100 Hz signal, which was generated by the first timer of LM556. This is the output which is to be provided to the computer through parallel port. Since the LPT works on Low and High voltage levels, therefore the square wave signal has to be converted into voltage levels. This is done using the conditional circuit shown in Figure 4.

Figure 3. Final Modulated Wave of Infrared Transmitter (4%

Duty Cycle) Figure 2. The H-Bridge Circuit

Page 3: [IEEE IEEE Southeastcon 2009 (SOUTHEASTCON) - Atlanta, GA, USA (2009.03.5-2009.03.8)] IEEE Southeastcon 2009 - National Instruments® LabVIEW™ based pharmaceutical medication device

Figure 4. Conditional Circuit used in the Receiver Circuit

2.5 Parallel Port Interfacing Circuit

The Hardware to Computer interface has been made using parallel port. Parallel port is usually a 25 pin port for parallel data communication. The port basically contains three registers normally Data (0378h), Control (037Ah) and Status Register (0379h).

The function of each register is obvious from their name Data port consists of 8 bit (D0-D7) and it is usually use for data outputs.

The control register generates control signal it’s a read/write port where as the status register returns the status of device and it’s a read only port i.e. data can’t be output from this port.

In this project we have utilized all the three registers. Data Register is use for controlling the conveyor; while Control Register is used for controlling the rotary motion of drum. The Status Register is used to give input to PC from the Sensor.

The reason for using different registers is that the parallel port is not bit addressable hence you have to send full byte to update the port, more over if one register is made output port it will not take input.

The reason for using separate register for controlling motors is that we have utilized the Pulse Width Modulation Technique to control the speed of roller. In PWM we have to keep on updating the output port again and again. So to avoid heavy updating of port every time; another port i.e. control port is being utilized. A detailed diagram illustrating all the ports is given in Figure 5.

Figure 5. Pin Diagram of Parallel Port

3. Software Design

The software section of the system has been designed on LabVIEW, one of the leading graphical Engineering and Scientific tool. It offers certain built-in functions for simulation, measurement analysis, instrument control, data acquisition and data presentation. LabVIEW is an acronym of Laboratory Virtual Instrument Engineering Workshop. It is very flexible instrumentation and analysis software introduced and developed by National Instrument. LabVIEW programs are called Virtual Instruments or VIs [7]. It is actually a Graphical programming language (G-Language) rather than the text language like C or FORTRAN. LabVIEW is a powerful and complex programming environment that uses a terminology familiar to scientist and engineers, and the graphical icons (used to construct the G programs) that can easily be identified by quick visual inspection. 3.1 LabVIEW Environment

LabVIEW programming can be divided into two parts. Front Panel and a Block Diagram. Front panel is the user interface of a VI. One can build the front panel with “Controls” and “Indicators”, which are the interactive input and output terminals of the VI, respectively.

Figure 6. Front Panel of LabVIEW Program

Controls are knobs, push buttons, dials, and other input devices while Indicators include graphs, LEDs and other visual displays. Controls simulate instrument input devices and supply data to the block diagram (visual source code). Whereas Indicators simulate instrument output devices and display data, which the block diagram generates according to the logic.

The block diagram contains the graphical source code of VI. The objects (Controls or indicators) appear as icon terminals on the block diagram. Wires connect control and indicator terminal to express VIs.

Page 4: [IEEE IEEE Southeastcon 2009 (SOUTHEASTCON) - Atlanta, GA, USA (2009.03.5-2009.03.8)] IEEE Southeastcon 2009 - National Instruments® LabVIEW™ based pharmaceutical medication device

Figure 7. Block Diagram of LabVIEW Program

3.2 LabVIEW Operation

The controlling of the whole mechanism is through LabVIEW Programming via parallel port interfacing. The system has been programmed in such a way that no human intervention is necessary after turning the system ON. As the system is started, the Conveyor, carrying the bottles, starts running. An IR sensor waits for the bottle to interfere in its transmission. As soon as the transmission is interrupted, LabVIEW receives the signal and instructs to start the rotation of drum. After the drum takes a rotation, it fills a bottle by the specified number of tablets, the conveyor starts again and the next bottle interrupts the IR Transmission and hence the cycle continues. LabVIEW Program controls the motors associated with the Conveyor and the drum and the HMI (Human Machine Interface) contains the START/STOP buttons, the Status Indicators and the information about the number of bottles being filled.

The flowchart of Figure 8 shows the top level view of the programming approach used.

4. Conclusion

The design is considered as a satisfying accomplishment. LabVIEW works steadily with the electronic hardware and the program is function well with no major error occurred. With the modifications on the mechanical part, the device can fill & count as many tablets & achieve greater tablets/minutes and compensate any shapes and sizes of pills. By introducing the device to retail pharmacies, it is expected to lessen pharmacists’ work and reduce human contact in tablets counting.

Figure 8. Top Level Flow Chart of the Programming

12. References [1] Amy Chang, Soon Chin Fhong, I. Agung Wibowo, Zaini Bin Tahir and Mohd Shaiffol B. Ahmad, "Microcontroller Based Retail Pharmaceutical Tablets Counting Device", The 5th Student Conference on Research and Development –SCOReD, 2007, pp. 1-6. [2] Ogren PJ, Jones TP, "Laboratory interfacing using the LabVIEW software package", ACS Journal of Chemical Education, vol.73, no.12, 1996, pp. 1115–1116. [3] Soloman Sabrie, Sensors Handbook, McGraw Hill, 1999.

Page 5: [IEEE IEEE Southeastcon 2009 (SOUTHEASTCON) - Atlanta, GA, USA (2009.03.5-2009.03.8)] IEEE Southeastcon 2009 - National Instruments® LabVIEW™ based pharmaceutical medication device

[4] Muyskens MA, Glass SV, Wietsma TW, Gray TM (December 1996). "Data acquisition in the chemistry laboratory using LabVIEW software", ACS Journal of Chemical Education, vol. 73, no. 12, pp. 1112–1114. [5] Thomas L. Floyd, Electronic Devices, Pearson Education, 2002. [6] Infrared receiver Modules. [Online]. Available: www.vishay.com [7] Robert H. Bishop, Learning with LabVIEW™ 7 Express, Pearson Education, 2005. [8] "GSM based Security System using LabVIEW”, First International Conference on Computer, Control & Communication IC4, 2007. [Online]. Available: http://www.ic-4.org/ic-4%20old/proceeding/p57.pdf