4
Tetrahedron Computer Methodoloyy Vol. I, No. 2, pp. 177 to 180, 1988 0898-5529/88 $3.00+.00 Printed in Great Britain. © 1988 Pergamon Press plc A Computer-Interfaced Stepper-Motor Device For Measurement of Changing Gas Volumes at Constant Pressure David Jordan Potsdam College, Potsdam, NY 13676,USA Received3 August 1988,Revised11 October1988,Accepted12 October1988 Key words: Experiment control; Volume measurement; Hardware; Computer interface Abstract: Equipment and computer control logic is described for measuring changing gas volumes at constant pressure. We illustrate use of this system with kinetic data from thermal decomposition of 1-azido-l-phenylethene This project was undertaken to facilitate accumulation of data for a kinetic study of aide decompositions, earlier data having been obtained by periodically recording volumes of nitrogen evolved as a function of time. Although the previous method of measurement of nitrogen volume at constant pressure was adequate 1, the half-lives of the azides were often of many hours, and the experiments demanded frequent regular attention, a sometimes onerous task. The possibility of control of experiments by use of stepper motors has been described2"6, but no prior specific suggestions as to applications to measurement and control of gas volumes were known. A computer-controlled device has been prepared for maintaining constant gas pressures near 760 torr by motorized expansion (or contraction) of the system's volume and monitoring the times and amount of motor activity. Interfacing was via the parallel port of a Zenith Z-100 computer. Two design problems were presented. First, a digital pressure transducer sensitive to changes in pressure of approximately 1 torr was required. The cost of this transducer was an important consideration. The pressure measurement was to detect any change in pressure from the pressure at zero time for the reaction evolving nitrogen. Second, The rotary action of a stepper motor shaft was to be translated to some action that would allow alleviation of pressure build-up (or produce pressure if the pressure should decrease). A computer program was required that monitored pressure change, controlled a stepper motor so as to relieve the pressure change and recorded both motor activity and the time at which the motor activity took place. Searches in various texts and journals dedicated to the subject of computer control revealed no suitable sensitive pressure transducer. Shown in Fig. 1 is the gas Pressure Sensor which was devised, which is a mercury switch. The body of the mercury is connected to electrical ground. Initially, both line IN1 and IN2 are at high potential relative to ground and also at high q"rL logic signal level because the lines are disconnected from ground. The mercury surfaces are slightly below the tungsten wires which are poised (inserted through a rubber septum held by a screw cap, and sealed to the cap by epoxy cement) above the mercury surfaces. If gas evolves (at constant temperature) in the system being monitored, the pressure of that system rises and the mercury rises in the right-hand side of the U-tube and contacts the fight-hand wire, pulling line IN2 to a low TTL logic level. Conversely, if the pressure of the system should fall so that line IN1 contacts the mercury surface, line IN1 will go low. The BASIC program employed regards the null condition as one where the mercury level is below both wire contacts and the potential on both lines IN1 and IN2 is high (+5 volts, or logic level 1). This configuration requires that the pressure rise a finite amount above the initial pressure to make a contact to IN2. As a result, it is desirable that the mercury fill the device nearly 177

A computer-interfaced stepper-motor device for measurement of changing gas volumes at constant pressure

Embed Size (px)

Citation preview

Page 1: A computer-interfaced stepper-motor device for measurement of changing gas volumes at constant pressure

Tetrahedron Computer Methodoloyy Vol. I, No. 2, pp. 177 to 180, 1988 0898-5529/88 $3.00+.00 Printed in Great Britain. © 1988 Pergamon Press plc

A Computer-Interfaced Stepper-Motor Device For Measurement of Changing Gas Volumes at Constant Pressure

David Jordan

Potsdam College, Potsdam, NY 13676, USA

Received 3 August 1988, Revised 11 October 1988, Accepted 12 October 1988

Key words: Experiment control; Volume measurement; Hardware; Computer interface

Abstract: Equipment and computer control logic is described for measuring changing gas volumes at constant pressure. We illustrate use of this system with kinetic data from thermal decomposition of 1-azido-l-phenylethene

This project was undertaken to facilitate accumulation of data for a kinetic study of aide decompositions, earlier data having been obtained by periodically recording volumes of nitrogen evolved as a function of time. Although the previous method of measurement of nitrogen volume at constant pressure was adequate 1, the half-lives of the azides were often of many hours, and the experiments demanded frequent regular attention, a sometimes onerous task. The possibility of control of experiments by use of stepper motors has been described 2"6, but no prior specific suggestions as to applications to measurement and control of gas volumes were known.

A computer-controlled device has been prepared for maintaining constant gas pressures near 760 torr by motorized expansion (or contraction) of the system's volume and monitoring the times and amount of motor activity. Interfacing was via the parallel port of a Zenith Z-100 computer.

Two design problems were presented. First, a digital pressure transducer sensitive to changes in pressure of approximately 1 torr was required. The cost of this transducer was an important consideration. The pressure measurement was to detect any change in pressure from the pressure at zero time for the reaction evolving nitrogen. Second, The rotary action of a stepper motor shaft was to be translated to some action that would allow alleviation of pressure build-up (or produce pressure if the pressure should decrease). A computer program was required that monitored pressure change, controlled a stepper motor so as to relieve the pressure change and recorded both motor activity and the time at which the motor activity took place.

Searches in various texts and journals dedicated to the subject of computer control revealed no suitable sensitive pressure transducer. Shown in Fig. 1 is the gas Pressure Sensor which was devised, which is a mercury switch. The body of the mercury is connected to electrical ground. Initially, both line IN1 and IN2 are at high potential relative to ground and also at high q"rL logic signal level because the lines are disconnected from ground. The mercury surfaces are slightly below the tungsten wires which are poised (inserted through a rubber septum held by a screw cap, and sealed to the cap by epoxy cement) above the mercury surfaces. If gas evolves (at constant temperature) in the system being monitored, the pressure of that system rises and the mercury rises in the right-hand side of the U-tube and contacts the fight-hand wire, pulling line IN2 to a low TTL logic level. Conversely, if the pressure of the system should fall so that line IN1 contacts the mercury surface, line IN1 will go low. The BASIC program employed regards the null condition as one where the mercury level is below both wire contacts and the potential on both lines IN1 and IN2 is high (+5 volts, or logic level 1). This configuration requires that the pressure rise a finite amount above the initial pressure to make a contact to IN2. As a result, it is desirable that the mercury fill the device nearly

177

Page 2: A computer-interfaced stepper-motor device for measurement of changing gas volumes at constant pressure

178 D. JORDAN

INI IN2

SYSTEM BEING MONITORED

BALLAST REFERENCE VOLUME

Fig. 1. Pressure Sensor uses mercury as switch

to the wire contacts so as to minimize the magnitude of this differential operational pressure. The error introduced by this differential is no greater than the error in comparing mercury levels in two arms of a gas buret. This switch device does not present the problem of "switch bounce" encountered with many mechanical switches.

The right port of the Pressure Sensor is connected to a ballast reference pressure container of volume similar to the reaction vessel which is open to the atmosphere until the reaction is begun. This container may be immersed in the same temperature bath as the reaction vessel so as to minimize effects of changing laboratory temperatures on this reference pressure and to counterbalance pressure changes due to small fluctuations in the temperature of the reaction vessel.

Fig. 2 portrays the Syringe Plunger Control device which is the means of alleviation of pressure. Rotary stepper motor shaft action (having a running torque of 8 ounce-inches) is converted to linear movement of a carriage sliding on a smooth support rail and driven by a threaded rod with a 0.0357 inch lead (a lead screw assembly). A syringe plunger is attached to this carriage, via a bracket, which then moves within the associated syringe barrel which is fixed to the same surface to which the motor and lead screw assembly axe attached. A finely threaded rod (low pitch) is desirable so as to reduce the torque required to move the syringe plunger, with such threading more motor steps are required to move the plunger a given distance, but this fortuitously allows greater resolution of measurement (101 motor steps per milliliter with this equipment). The gas-tight syringe is a polyethylene 60 ml. catheter tip syringe with double elastomer ring-seals on the plunger.

An Airpax L82701-P2 twelve-volt, two-phase, four-coil stepper motor and Airpax motor controlling integrated circuit chip SAA1027 were employed 7. The signals to be furnished by the computer to the motor controlling integrated circuit chip for the purposes of triggering pulsing, setting input and determining the direction of rotation must be a nominal 12 volts dc for the high voltage level and between 0 and 4.5 volt dc maximum for low voltage level. A voltage level translator which converted the 0 to 5 volt signal from the computer into an 11 to 0 volt signal was constructed so that output signals from the computer's parallel port, on the third, fourth and fifth bits were converted to the proper voltage levels to set input, determine direction of rotation, and trigger a motor tmlse, respectively, when sent through the motor controller IC chip.

A BASIC program alternately places the PDATA6 line to an input multiplexer circuit at logic 1 or 0 to allow detection of the sense of lines IN1 and IN2 of the pressure sensor. To determine the status of line IN1, the computer polls the BUSY line from the multiplexer on the first parallel input bit by a statement which requests INPUT from the appropriate port address. Line status determines subsequent motor activity and direction of motor rotation.

Page 3: A computer-interfaced stepper-motor device for measurement of changing gas volumes at constant pressure

Computer-interfaced stepper-motor device 179

L-Shaped Motor Bracket

Stepper Motor ! )

Shaft Coupler ~

Lead Screw Assembly

Carriage with Bracket

Syringe P l u n g e r ~

Syringe Mounting ]

Syringe Barrel

Connection to Connection Reaction to Pressure System Sensor

Fig. 2. The Syringe Plunger Control modifies the pressure

l,.- ¢n

o I-,. o s"

600 '

-I O0

.°° l 400

300

2oo-

I OO

0

! I

0 100 200 300 400 500 SECONDS

Fig. 3. Evaluation of response rate and variance

The plot in Fig. 3 is of data from the process of consecutively injecting or withdrawing a fixed volume of air into or from a closed vessel connected to the pressure sensor. Motor steps from the initial syringe position are plotted versus time.

The interpreted BASIC program that was used in the collection of data for Fig. 3 wrote to a file every ten seconds, but only if motor activity occurred in the previous time interval, hence there are no data points in the "pause" breaks and the data points at either side of a pause may not be equal. Data of this figure indicate that the standard error of estimate for motor steps as a function of time is 3 steps. In Fig. 3 it may be seen that the motor activity changes the system volume at the rate of 5.1 mililiters per minute (515 steps per minute).

Page 4: A computer-interfaced stepper-motor device for measurement of changing gas volumes at constant pressure

180 D. JORDAN

5000

4 0 0 0

3000

u) 2000

Z: 1000

!

0 10000 20000 Seoonds

Fig. 4. Representative data from thermal decomposition of l-azido- 1-phenylethene

The response rate is approximately ten percent faster if data is written to file every ten seconds instead of the two second interval shown here. With sixty-second write intervals, the syringe plunger moves at the rate of 11 mm. per minute (6.0 ml. per minute, or 605 steps per minute). The relatively slow speed of this interpreted BASIC program is sufficient for most measurements of gas evolution from solution and appropriate for driving the somewhat viscous movement of the syringe plunger. The use of faster languages would allow approaching the maximal error-free stepping rate for this motor, which could be an approximately ten-fold rate increase at favorable torque loadings.

Fig. 4 is representative of kinetic data from thermal decomposition of 1-azido-l-phenylethene. A listing of all components and their sources, circuit schematics and the ZBASIC program are available

from the author.

ACKNOWLEDGEMENTS

Russell Nelson of Clarkson University wired and designed the input multiplexer and voltage translator circuitry. He and Dean N. Jordan of Auburn University made programming contributions.

LITERATURE CITED

1. Peterson, R. C.; Markgraf, J. H.; Ross, S. D. J. Am. Chem. Soc., 1961, 83, 3819-3823. 2. Salin, Eric D. J. Chem. Educ., 1982, 59, 53-56. 3. Combs, R. J.; Field, P.E. American Laboratory, 1983, November, 100-106. 4. Vernier, D. L. How to Build a Better Mousetrap, and Thirteen Other Science Projects Using the Apple

II, Vernier Software: Portland, OR 97225, 1986. 5. Libes, S.; Garetz, M. Interfacing to S-100/1EEE-696 Microcomputers; McGraw-Hill: Berkeley, 1981;

pp 168-172. 6. Auslander, D. M.; Sagues, P. Microprocessors for Measurement and Control, McGraw-Hill: Berkeley,

1981. 7. Stepper Motor Handbook, Airpax Corp., Motor Sales Dept., Cheshire Industrial Park, Cheshire, CT

06410.