[IEEE 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE) -...

6
1 Auto-Syringe System for Chemical Applications Using Micro-Controller Abdul-Wahid A. Saif 1 , Abdelrahman S. Shbair and Wael K. Zaitouni Systems Engineering Department College of Computer Science & Engineering King Fahd University of Petroleum & Minerals Dhahran 31261, Saudi Arabia 1 [email protected] Abstract This paper discusses the design of Auto-Syringe system for chemical applications that require transferring liquids in micro liters amounts. The design is based on micro- controller based system. The contribution of this work is in the design of the system and in selecting the proper components, finally, the programming of the device such that it can be used friendly. The design, implementation and experimental results plus cost analysis will be reported. Keywords: Auto-Syringe Systems, Chemical liquids, Chemical Applications, Micro-Controllers. 1. Introduction The use of automation and control systems is becoming more important nowadays because of the need of high accuracy, productivity and safety in a lot of applications. From this point of view, the idea of this work which is an Auto-Syringe control system or injection systems has evolved. The Auto-Syringe control system is a complete collection of hardware and software components that work together to reach a common objective. In Chemistry or some Chemical applications, it is required to deliver some liquids, which might be sometimes unsafe or expensive, in micro-litter volume. It is impossible to get such accuracy using liquid containers that is used and operated humanly. Transferring liquids in micro scale amounts is very essential for variety of techniques especially in flow systems and in case of using micro electrodes. It is extremely important to inject the required volumes of reagents adjacent to the indicating systems which usually are electrodes. Using an auto-dispensing device will enable the operator to deliver the sample easily near the electrodes. Also it will enable him to observe the maximum signal that result from the electrochemical reaction, [ 1]. Some times, user needs to control the size of the desired amount by entering the values in a friendly way and get immediate action in seconds. In the field of disposable medical system, there is a growing need for actuation means. Intradermal injections, in[1], a thermally actuated one-shot liquid dispenser is fabricated. The mean of the one-shot dispensed liquid is 101 micro- liter. In[2], a PC-Based automated droplet device is developed. 2. Problem Statement It is required to design a handy-held automated device that dispense liquid easily in amounts of 10 micro liters or less, without compromising safety and accuracy aspects which are impossible to be done manually. In addition, the device should be handy and user interface is needed to run the process as well. 3. General Solution-Approach The implementation of the automated device includes disposal syringe driven by a linear stepper motor controlled by a mean of microcontroller or programmable logic controller. Display unit and buttons are needed for user interface. From a programming point of view, components must be programmed in smooth way to meet the requirements and ensure high efficiency. Batteries as a source of energy will be present to make the device portable. Then, all components will be put together in a proper physical model that can be effortlessly held by hand. Figure 1 shows a schematic system block diagram. 4. Design Procedure The idea behind designing such system is mainly emerged from the need of a control system to inject the required small amount of liquid. The user will select the required amount of liquid in multiple of 10 micro-litters using the input push buttons on the display unit. This Fig.1: System Block Diagram Power Supply BasicX-24 Microcontroller Driver Motor 2x16 LCD Input Button 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE 2010), December 5-7, 2010, Kuala Lumpur, Malaysia U.S. Government work not protected by U.S. copyright 104

Transcript of [IEEE 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE) -...

Page 1: [IEEE 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE) - Kuala Lumpur, Malaysia (2010.12.5-2010.12.8)] 2010 International Conference on Computer

1

Auto-Syringe System for Chemical Applications Using Micro-Controller

Abdul-Wahid A. Saif1, Abdelrahman S. Shbair and Wael K. Zaitouni

Systems Engineering Department College of Computer Science & Engineering

King Fahd University of Petroleum & Minerals Dhahran 31261, Saudi Arabia

[email protected]

Abstract

This paper discusses the design of Auto-Syringe system for chemical applications that require transferring liquids in micro liters amounts. The design is based on micro-controller based system. The contribution of this work is in the design of the system and in selecting the proper components, finally, the programming of the device such that it can be used friendly. The design, implementation and experimental results plus cost analysis will be reported. Keywords: Auto-Syringe Systems, Chemical liquids, Chemical Applications, Micro-Controllers.

1. Introduction

The use of automation and control systems is becoming more important nowadays because of the need of high accuracy, productivity and safety in a lot of applications. From this point of view, the idea of this work which is an Auto-Syringe control system or injection systems has evolved. The Auto-Syringe control system is a complete collection of hardware and software components that work together to reach a common objective. In Chemistry or some Chemical applications, it is required to deliver some liquids, which might be sometimes unsafe or expensive, in micro-litter volume. It is impossible to get such accuracy using liquid containers that is used and operated humanly. Transferring liquids in micro scale amounts is very essential for variety of techniques especially in flow systems and in case of using micro electrodes. It is extremely important to inject the required volumes of reagents adjacent to the indicating systems which usually are electrodes. Using an auto-dispensing device will enable the operator to deliver the sample easily near the electrodes. Also it will enable him to observe the maximum signal that result from the electrochemical reaction, [ 1]. Some times, user needs to control the size of the desired amount by entering the values in a friendly way and get immediate action in seconds. In the field of disposable medical system, there is a growing need for actuation means. Intradermal injections, in[1], a thermally actuated one-shot liquid dispenser is fabricated. The mean of the one-shot dispensed liquid is 101 micro-liter. In[2], a PC-Based automated droplet device is developed.

2. Problem Statement

It is required to design a handy-held automated device that dispense liquid easily in amounts of 10 micro liters or less, without compromising safety and accuracy aspects which are impossible to be done manually. In addition, the device should be handy and user interface is needed to run the process as well.

3. General Solution-Approach

The implementation of the automated device includes disposal syringe driven by a linear stepper motor controlled by a mean of microcontroller or programmable logic controller. Display unit and buttons are needed for user interface. From a programming point of view, components must be programmed in smooth way to meet the requirements and ensure high efficiency. Batteries as a source of energy will be present to make the device portable. Then, all components will be put together in a proper physical model that can be effortlessly held by hand. Figure 1 shows a schematic system block diagram.

4. Design Procedure

The idea behind designing such system is mainly emerged from the need of a control system to inject the required small amount of liquid. The user will select the required amount of liquid in multiple of 10 micro-litters using the input push buttons on the display unit. This

Fig.1: System Block Diagram

Power Supply

BasicX-24 Microcontroller

Driver

Motor

2x16 LCD

Input Button

2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE 2010), December 5-7, 2010, Kuala Lumpur, Malaysia

U.S. Government work not protected by U.S. copyright 104

Page 2: [IEEE 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE) - Kuala Lumpur, Malaysia (2010.12.5-2010.12.8)] 2010 International Conference on Computer

2

amount will be interpreted by the microcontroller (brain of device) and then converts to a control signal to drive the motor that operates the attached syringe in pulling out and dropping liquids. The hardware and software design of this idea will be described briefly in the following subsections.

4.1 Hardware Design

The hardware components of the Auto-Syringe system are microcontroller (BasicX-24), linear stepper motor, stepper motor driver, LCD, buttons, disposal syringe and two rechargeable batteries as power source. Brief explanations of these components will be given in the next subsections.

4.1.1 BasicX-24 Microcontroller

BasicX is a complete control system on a chip, combined with a software development environment on a PC-compatible computer running Windows. A BX-24 system combines a BasicX chip with additional devices to make it a standalone computer. In the BX-24 system there is a fast core processor with a ROM to store the BasicX operating system, 400 bytes of RAM, 32 Kbytes of EEPROM, and lots of I/O devices such as timers, UARTs, ADCs, digital I/O pins, SPI peripheral bus, and more. The BX-24 uses an Atmel AT90S8535 as its core processor. BasicX programs are developed on an IBM-PC compatible computer under Windows 9x/ME/2000/NT/XP. The BasicX development environment includes an editor, compiler, various debugging aids, and source code for examples. The BX-24 computer requires a DC power supply in the range of 5.5 V to 12.0 V, which makes it ideal for battery power. Current requirements are 20 mA plus I/O loads, if any, [3].

4.1.2 Linear Stepper Motor

In such application, position control is required to carry out the task. The stepper motor works by taking discrete steps rather than rotating continuously as ordinary DC motors. This makes stepper motors ideal for a wide range of positioning applications, especially those with limited demands for fast response and extreme accuracy. The basic permanent magnet (PM) stepper motor looks something like the drawing in Fig. 2. It consists of two sets of coils wound on the pole pieces of the fixed housing of the motor, the stator, and a rotor that incorporates a permanent magnet. Here we want the rotor to rotate to a given position and hold that position.

Fig. 2 : Stepper Motor Construction

A linear stepper motor is essentially a stepper motor that instead of producing a torque (rotation), it produces a linear force along its length. The most common mode of operation is that the applied force is linearly proportional to the current and the magnetic field. The linear stepper motor used in the Auto-Syringe is unipolar, 7.5 degree step (48 steps per revolution) with 4 phases, [4].

4.1.3 Stepper Motor Driver

Driving stepper motor involves two distinct parts: the drive electronics that produce the current flows in the coils and the sequencing electronics that determine the order in which the coils will be energized. The driver will take care of this task by taking signal from microcontroller to toggle the direction pin and clock pin. The driver used is ST200 that can be fully operated with only 2 input signals, which are the DIR (CW/CCW) and CLK (clock) inputs. The schematic diagram shown ing Figure 3 clarify the concept more, [4].

Fig. 3: Driver Diagram

4.1.4 Display Unit (LCD)

The ILM-216 is a custom LCD module with a smart inbuilt serial interface. It works like a micro terminal receiving data at 1200 to 9600 bps and displaying it in large characters on a 2-line-by-16-character screen with advanced features include built-in microcontroller delivers a serial interface, four switch inputs, nonvolatile configuration memory and with LED backlight for friendly user interface,[5].

4.1.5 Input Buttons

Auto-Syringe has five micro switch buttons that help the user to enter, accept or clear the values. Also, restart button is available to go to the initial position for the syringe. ON/OFF switch is there to turn device on or off. All the buttons are put together in the same board on the top of the device along with the LCD. The buttons are assigned as follows:

4.1.6 Syringe

A syringe consists of a plunger fitted to a tube, called the barrel, which has a small opening on one end. Syringes are used to transfer small amounts of liquids to or from otherwise inaccesible areas. It operates on the principle of suction by filling the barrel with the substance at the

105

Page 3: [IEEE 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE) - Kuala Lumpur, Malaysia (2010.12.5-2010.12.8)] 2010 International Conference on Computer

3

opening when the plunger is drawn out, and expelling the substance when the plunger is depressed. The process of administering a substance with a syringe and needle is called an injection. 3 ml/cc disposal syringe is utilized in this project to pull out and expel the liquids by connecting its plunger with the linear stepper motor shaft. The syringe is fixed in the base of the device in front of the motor exactly. Fig..4 shows a disposal syringe.

Fig. 4: A Disposal Syringe

4.1.7 Power Source

The BX-24 computer requires a DC power supply in the range of 5.5 V to 12.0 V, which makes it ideal for battery power. Current requirements are 20 mA plus I/O loads, if any. Two 9V rechargeable batteries are employed to supply the microcontroller and the driver with enough power. Then, the LCD and the buttons take the power from microcontroller and similarly the driver supplies the motor with the amplified power required.

4.2 Software Design

BasicX is a complete control system on a chip, combined with a software development environment on a PC-compatible computer running Windows. BasicX programs are developed on an IBM-PC compatible computer under Windows 9x/ME/2000/NT/XP. The BasicX development environment includes an editor, compiler, various debugging aids, and source code for examples. On a BX-24 computer, once you have a BasicX binary file and preferences file, the code is downloaded into the 32 KB EEPROM. When the BasicX chip starts (after reset), it goes out and begins executing instructions from the EEPROM. Since the EEPROM is non-volatile, it is safe from power outages. If the power goes out, the code is still retained in the EEPROM. Of course any RAM data wouldeberlost. The code running the Auto-Syringe is actually built using BX-24 software. It is divided into four modules to look and be understood better. They are main program, button, LCD initialize and serial port for LCD. These modules are working together to achieve the mission. The main program contains motor and display routines in addition to calling button function and LCD initialization. Button modules control the using of the button by checking their pins out and raise the flags due to that. LCD actually needs two modules to work well. One is to handle a single serial port for the LCD. The module will handle 1 port at a

time. After opening the port, you can switch to a different port at any time by closing and re-opening the port. The Second module is to initialize the serial LCD 2x16 displays. Fig.5 demonstrates the program flow chart.

4.2.1 Main Program Structure

The main program starts by calling LCD module and displaying a welcome message followed by asking user to accept filling the syringe with full amount and in this stage the plunger in the syringe will be in the initial position which is in the very end (i.e. the syringe is empty). Whenever the restart button is pressed the program will go to a subroutine called “RESTART” The motor routine which is the dynamic part in the program is constructed based on giving the clock pin in driver 0 and 1 state with a delay between them in a loop according to the entered value corresponding to the liquid amount.

Welcome Message

Pull Full?

Motor pulling out

OK

Enter an amount to be injected

InjectLiquid?

Clear Entry

MotorTransfer the Liquid

OK

Stop Figure 5 Main Program Flowchart

In fact the program is working in sequential order that takes the input from the user and manipulate it to get an action to move the syringe in specific direction with specific displacement. The numbers are entered by using two buttons: one for moving from digit to digit and the other to generate 0 to 9 numbers within the digits.

5. Implementation

After completing the hardware and software design, one should consider putting all these components together in

106

Page 4: [IEEE 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE) - Kuala Lumpur, Malaysia (2010.12.5-2010.12.8)] 2010 International Conference on Computer

4

a proper physical model to make the device ready for testing and hopefully to be utilized as it should be. In prototype we had been taking care of many things like: small size, low cost, simplicity in use (handy) and light weight. We decided to use 16X15X3 cm base and attach the components to both side and fix a holder to the side to be grabbed by hand. One side is for the motor, syringe, microcontroller, driver and batteries. Other side is for panel containing LCD and buttons to run the device.

5.1 Connections and Model Layout

The figures in this subsection illustrate the connection of the hardware components and the model layout. Couples of snapshots for the complete Auto-Syringe device will be also shown at the end. Fig. 6 demonstrates the connection between all components. Fig.7 and Fig. 8 show the front side and the back side layout of the prototype for Auto-Syringe device, respectively. Figure 9, shows a picture for the working device.

Fig. 6: Connection Diagram

5.2 Calibration and Results

Auto-Syringe device mechanism depends on transferring liquids using syringe according to the entered values in micro liters. The disposal syringe delivers the liquid inside it by expelling drops. Accordingly, the entered value should be discrete one and represents drop(s). After doing the calibration experiment to measure how much the disposal syringe can deliver in drops and how much each drop weighs, we found the single drop weighs about 10 micro liters, Tables 1 &2. In addition, we did same experiments on several drops and full range can be dealt with to make a clear picture about how our program will be. The calibration experiments have been done using a number of test bottles and an accurate balance located in Chemistry Department. We measured the weights of bottles when they are empty then transfer water to them and weigh them again and take the difference to find how much water has been delivered. The following tables and graphs show the calibration data and their pictorial relation. Note: this calibration is done by using the syringe vertically, which is the most appropriate position to handle such application. Graphs in Figs. 10 & 11, show that the relation is linear between step number (half step) and volume (micro liters). The minimum value is approximately 10 micro liters and full amount is about 800 micro liters. Now, one could establish converting these results to be properly represented in the code. In fact, each 10 micro liters is corresponding to 20 half steps with a factor of 2. So, each entered number by user is simply multiplied by 2 to get the right action from the linear stepper motor. Afterward, we had done another calibration experiment to become aware of the differences if we run the experiment with horizontal syringe position and we got the results in Table 3. As noticed in the graph (Fig. 12) and the Table 3, there will be few differences between carrying the experiment

Fig. 7: Back Side Layout

Fig. 8: Front Side Layout

107

Page 5: [IEEE 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE) - Kuala Lumpur, Malaysia (2010.12.5-2010.12.8)] 2010 International Conference on Computer

5

out with different position due to the gravity force that will be added to the considerations in case of vertical position. For example, we need 20 half steps to deliver one drop in vertical position whereas we need extra 5 half steps to deliver the same amount in the horizontal position. These 5 half steps should be incorporated in the program In fact, we tried real hard to minimize the net cost of the project by using the tools and equipment available in our department. Table 4 point up the cost associated with the project in detail.

Part Vendor Quantity

Price (SR)

BasicX-24 NetMedia Inc 1 560 Linear Stepper Motor Crouzet 1 505

Stepper Motor Driver Tecel 1 180

LCD Scott Edwards Electronics Inc 1 200

Buttons any 6 15 Resistors (1 k�) any 5 5

9V rechargeable battery

any 2 20

Battery charger any 1 40 Estimated Total =SR 1525 $ 407

Table 4: cost breakdown

6. Operating Environment Auto-Syringe device is normally located in a laboratory in room temperature environment. If one had to use the device in high operation temperature up to 70C°, the disposal syringe (plastic) would be firstly substituted with special one that can handle such temperature. The device should be kept out of liquids or steam except for the needle part coming out of the box. Care must be taken whenever there is a touch with liquids. So, put the very end of the needle only in a liquid and try not to shake the device while running to maintain good operating environment for the components. [2,3,4]

6.1. Assumptions and Limitations The calibration experiment for the Auto-Syringe device has been done with water assuming that the density to be 1 gm/mL. In case of changing the liquid, another calibration experiment should be done to modify the factor that converts user input to output signal to the motor in the main program. The linear stepper motor has maximum travel distance and this will in turn determine maximum volume to be delivered.

7. Conclusion An Auto-Syringe system designed, and it is able to run syringe to deliver liquids in tiny scale for chemical

applications especially in flow systems in case of using micro electrodes. The overall user interface for the finished product is simple to understand. The design is attractive, robust and hopefully gets support for mass production This Auto-Syringe system has a promising future especially it helps in many critical applications. Some improvements could be added to improve the performance and quality of the deliverables to go with more application including medical applications. Enhancements may include 1. More advanced specifications for the linear stepper

motor like: more linear travel and anti-rotation device built-in.

2. More precise needle for the syringe or ready made precise syringe that would deliver smaller drops.

3. Minimize the layout and put the device in Printed Circuit Board (PCB) form so it would be a lot cheaper to mass produce this unit.

Acknowledgement

Acknowledgement is due to King Fahd University of Petroleum and Minerals for its support.

REFERENCES

1. N. Roxhed, et al. “Low cost device for precise microliter range liquid dispensing”, 17th IEEE International Conference on Micro Electro Mechanical Systems, pp. 326–329, Maastricht, The Netherlands, 2004.

2. Hong Ren, and Richard B. Fair, “ Micro/Nano Liter Droplet Formation and Dispensing by Capacitance Metering and Electrowetting Actuation”, IEEE-NANO 2002.

3. http://www.basicx.com 4. http://www.crouzet.com 5. http://www.seetron.com/ilm216_1.htm

Fig. 9: The working Device

108

Page 6: [IEEE 2010 International Conference on Computer Applications and Industrial Electronics (ICCAIE) - Kuala Lumpur, Malaysia (2010.12.5-2010.12.8)] 2010 International Conference on Computer

6

Table 1: Calibration Data

h/f step avg. amount (�L) note

20 9.5 1 drop 40 18.25 2 drops 60 27.8 3 drops 80 37.3 4 drops

1600 789 full range

Table.2: Calibration Results

calibration experiement for linear stepper motor(all points)

y = 0.4786x - 0.7134

0

100

200

300

400

500

600

700

800

900

0 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600

half steps

volu

me

(uL)

Fig. 10: Calibration Graph(vertical position)

calibration experiement for linear stepper motor(startup points)

y = 0.4648x - 0.025

05

10152025303540

0 10 20 30 40 50 60 70 80 90

half steps

volu

me

(uL)

Fig. 11: Calibration Graph for Startup Points for Close

Notice

h/f step avg. amount (�L) note

25 9.1 1 drop 50 18 2 drops 75 27.25 3 drops 100 37.4 4 drops

Table.3: Horizontal Syringe Position

calibration experiement for linear stepper motor(startup points)

y = 0.3766x - 0.6

05

10152025303540

0 10 20 30 40 50 60 70 80 90 100 110

half steps

volu

me

(uL)

Fig. 12: Calibration Graph (horizontal position)

bottle no.

weights before (gm)

h/f step

weights after (gm)

net weights

(gm) note

1 8.0507 1600 8.7605 0.7098 full range2 8.1462 1600 8.8457 0.6995

3 8.1237 20 8.1332 0.0095 1

drop 4 8.1198 20 8.1289 0.0091 5 8.146 20 8.155 0.009 6 8.0406 40 8.0591 0.0185 2

drops 7 8.1346 40 8.1526 0.018

8 8.1166 60 8.1444 0.0278 3

drops

9 8.0184 80 8.0557 0.0373 4

drops

109