Graphics with a dot-matrix printer - Journal of Chemical Education

Bits and pieces, 20. Obtaining high quality graphs, mathematical, chemical symbols, and enlarged type faces for preparing transparencies from a dot-ma...
0 downloads 0 Views 2MB Size
or the enthalpy change for an unknown. The computer procram oromots mixine of the reagents. we-founi one experiment t h 2 could he readily controlled from start to finish by the computer-the vapor pressure of a volatile liquid as a function of temperature. For this we used a Yellow Springs Instrument Co. thermilinear thermistor whose signal was transformed t o give 0-1 V in the range O10O0C(i.e.. 10 mVPC) bv a YSI Thermivolt Thermistor Simal ~unditionrr.We used-a Data Instruments, Inc. pressure transducer Model AB-25 PSIA/AI)ISS which gives 1 V fur full scale of 25 PSlA when run through a 5-V power supplv built here. The accuracy of the pressure transducer is 1%,and the students develop calibration curve for its output as a separate experiment. For this calibration students read the pressure on-a manometer. correct for barometric oressure. and kev this value into the cokputer which automa&ally reeords thk sienal from the oressure transducer. Our oromam . " "VAPCAL" does this. The controlling main computer program permits students to use an existing calibration or the one they generate via VAPCAL. The liquid initially fills two-thirds of an ampoule that has a 9-mm 0.d. stem to fit a 3/s-in. Swagelok fitting and a body that is 10 cm long and 30 mm 0.d. The liquid is thorouehlv degassed while in the amooule and then the t&nsd;cer (in contact with the vapor phase) and the liquid are isolated from the rest of the system. The ampoule and pressure transducer and thermistor are loaded into a 20-L water bath. The computer program is loaded and the operator enters the starting and final temperatures. The program automatically selects temperature intervals to yield a total of 15 data points. The romp&er raises the temperature of the bath to the starting temperature, say 2 5 T . It maintains cunstant LO within +0.02°C for 3 min and then takes 100 temnerarure ~ - - - ~ pressure and temperature readings at 10-msec intervals which i t then averaees and stores. Next it increases the bath temperature by the appropriate increment and repeats the process until the end of thr rxneriment. Wedevised a two-tier heatine system: all heaters &on full-blast to within 1°C of the targe't temperature a t which point a subroutine involving proportional control takes over. We are currently developinga system to automate a kinetics experiment and a coefficient of expansion experiment. Listings of our programs are available upon request.

a

-

.~---~~~~-~ ~~

~~

~

~

~

~~

~~

~~~

~,.~ ~

Acknowledament T o G. B. Skinner for much of the initial work, to J. Pollock for the interfaces and general trouhle-shootinn. to Yellow Springs Instrument ~ o m ~ and a nJ. ~Campbell for the gift of the temperature sensor and signal conditioner, and to the National Science Foundation for the cost-sharing grant.

Graphics with a Dot-Matrix Printer Benson Floss Sundhelrn New York University Washington Square New York, NY 10003 High quality graphs, mathematical, and chemical symbols for eauations and enlareed t m e faces for oreoarine transparencies for overhead projectors generally require special orinters. I t is oossible. however. to obtain these from avarietv bf low-cost, dit-matrix printers'(such as the Epson MX series? driven hv microcomouters. The orint heads of these computers carry a set (us;ally 9) of vekically aligned wires which can be "fired" in various oatterns to svnthesize the desired characters. The typeface ?font) is usukly determined by a seauence of such firines stored in the small on-board memorv ol'ihe printer itsell's" that the computrr merely signals thk ASCII rode for t h ~rrquired . symhul and the printer dori the rest. On almost all of thrsp printers there isat least theoption of a graphics mode where these firings may be controlled by

- ".

. .

-

the microcomputer directly. This capability has several apnlications to the teachine of chemistrv. One application is the preparation ofhigh quality characters in various fonts and sizes with s ~ e c i achemical l and mathematical symbols for use in charts and manuscripts. For examole. we mav want arrows and double arrows t o reoresent irr;ve;sible o; reversible chemical reactions; subsc;ipts in chemical formulae; different fonts to distinguish between, e.g, the Faraday and the free energy or the EMF and the energy; special svmhols to desimate oartial derivatives. summations. divergeice operators, &c. Fortunately, it is unnecessary for each of us to program a computer to draw all of the required symbols in all of the useful sizes since there is available2 (public domain) the Hershey database which lists the basic dot structure of about 1000 symbols. Furthermore, there are commercially availahle software packages that utilize these data to devise a set of symbols, select and scale the symbol and font, code the appropriate signal to the printer, and execute the printing of copy prepared with any kind of editor or word-processor.Since the orinters are usuallv.caoable . of small motions of the order of % of a dot sparing hori7ontally and ' 2 of a dot spacing verticallv. it is rwss~bletoobtain a resolution not onlv far hetter thau f i r thenormal m ~ d of r the dot-matrix but a'lso considerahlv bptter than an ordinarv tvoewritrr. The characters look as though they had been printed on a press. In one such package3 print sizes are supplied from 8/72 to 2 in. in roman, boldface, italic, sans serif, script, and gothic fonts, together with a wide array of special symbols. T o further simplify the procedure, a "driver" package4 can he used which provides simple commands to manage rather sophisticated formatting along the lines used in typesetting systems. It is only necessary to prepare the desired copv, from a page to a manuscript, with an kdiior (we use a word &ocessor & tGe "non-document mode") and invoke the driver program in order to produce the final printed material. Since-the-printer must make many more strikes to synthesize the typefaces than it does for the s&lard printerrh&arters, the process is considerably slower, requiring ahuut 10 midpage. As an example, Figure 12 shows a page containing several typefaces and font sizes that could he used to compose sheets for coovine .. onto a transoarencv bv xeroeraohv for use in an overhead projector. hes scale ii importak%e symbols are readilv seen. The oaee need not be crowded as would be the case with ordinaryiy$ng, and the lettering is crisp and solidly black. In another example, Figure 13displays a few lines of characters that might occur in a technical manuscript or material prepared for physical chemistry classes. The ready availability of the symbols and fonts produces professional looking results. The preparation of graphs and similar figures using a microcomputer is constrained principally by the size of the availahle memory. An 8 X 10-in. plotting region can contain about 2 million individual dots using the graphics mode of most dot-matrix printers. This reduces to 250 khytes, far too much for the averaee micro to handle. If we reduce the resolution somewhat w; find that a matrix of 512 X 480 dots can be stored in 32 khvtes which is in ranee of most microcomputers and which corresponds to a dut spacing of about 'hof an inch. This is acceotahle hut not verv- hieh resolution in hard copy. For comparison, if it were reduced to a 3-in. column, it

-

Created by Alan V. Hershey for the National Bureau of Standards: Wolcott. NBS Special Report #424. e.g., "Fancy Font" distributed by Soft Craft, 8726 S. Sepulveda Blvd., Suite 164, Los Angeles. CA 90045. e.g., "tex" by Mike Meyer, P.O. Box 1749, Norman OK 73070. Mr. Meyer has indicated that he may permit free general dislriblrtion of his material provided that it is properly acknowledged by users.

'

Volume 61

Number 6 June 1984

531

would be satisfactory for use in a journal but would be a little rough at full size. It compares favorably with the results obtained from commercial plotters in the $3000-5000 class. Granhs can be nrenared directly from promams written for but this would be ted$us in