Real Applications

See all articles from CATS v3 n7
Author(s): John Walker
Publication: CATS Newsletter
Pub Details: CATS v3 n7 (Volume 3, Issue 7)
Date: October 1985
Pages: 12-14

The Problem:

Starkville, MS
February 5, 1985

Dear Sir:

I am currently working on a data aquisition system for my senior design project using the T/S 1500. Adequate information on this computer has been difficult to obtain or understand, since I have only recently begun to use the T/S for purposes other than simple BASIC programming. The following are areas in which any assistance you would offer would be appreciated.

It would be very convenient if the data collected could be (1) transferred to cassette tape in the field, brought in to be transferred to an IBM PC, and then to the mainframe; or, (2) bring in the T/S every month or so, load the tapes with data into the T/S memory, then into the IBM. I am thinking of using the AERCO RS232 I/F to go with option (2).

Other problems I have encountered are lack of cassette control by the program, lack of an internal clock, lack of a printer, and a need for documentation on the manipulation of locations that can be POKEd. However, low cost, size, programming features, and low power consuption of the computer favor its use in some field applications.

In this project, it was intended to be used to collect information about water flow levels using a rechargable battery for power.

A potentiometer will begeared into a float that measures water level through a flume. The pot reading is converted into a digital signal by an (8+8)*8 analog interface. The digital reading ranges from 0 to 255.

The program reads the measurement at regular intervals. Since it is best tokeep the field equipment to a minimum due to power requirements, a monitor and printer will not be used in the field. INKEY$ will be used to control the operation of the program; stop the run, save the data to tape, and resume operation of the program.

Since we have only one T/S available, it would be convenient to store the data on tape to be read into the IBM directly, through its cassette port. If necessary, the data may be uploaded by the T/S and its RS232 by bringing in the computer on off days.

Any suggestions would be useful. Thank you for you time!

Sincerely,
John Walker

And The Solution:

August 21,1985

Dear Sir:

Enclosed is a report of my project with the 1500 that I contacted you about earlier. We have just field tested it last week due to several delays. It appears to be working well.

Thank you for your correspondence.

The purpose of the data aquisition system is to take in analog data from instrumentation, convert the data to a digitized form, store the data, and transfer the data to other computers for analysis. Benefits of the system include the saving of time and money, as compared to previous means of data aquisition and handling, as well as diversity in application. To achieve these goals, a system was developed that was built around a Timex-Sinclair 1500 computer.

First, an analog to digital converter board was used to convert the analog electrical stimulus to a digital form that could be interpreted by the computer. Inputs to the board are received in the form of voltages from 0 to 2.55 volts through an eight channel input bus. The eight channels allow data to be collected almost simultaneously from several inputs so that one input might be better correlated to the others. Outputs are received by the computer in the form of a number between 0 and 255.

The computer then may either record the input number as is or convert the number to the corresponding physical measurement before recording it in memory. The computer serves as a means of data reception and manipulation, data storage, and overall system control. Since it is programmable in BASIC, it is easier for personnel to operate the system versus programming an alternative control unit such as a microprocessor. Being programmable, it is more diversified in function than some systems that are specific to their task. The power outlet, recorder, and printer are all directed by the computer.

The power outlet is a controlled power source by which the recorder and printer are controlled. Since the computer was not equipped with a function to shut the recorder and printer off and on, the controlled outlets were necessary. By this means the recorder and printer may be turned on or off as needed. Thus, the outlet serves as a control unit and as a means of conserving power when the system is in the field being powered by a DC power source.

The DC power source is regulated to provide power to the computer, recorder and controlled outlet in the form of a DC supply. However, the printer requires an AC supply. Therefore, the 12V DC is converted to 117V AC by a power inverter. The power inverter supplies the controlled outlet for the printer. When using a DC source, only the printer is supplied with AC power, the recorder and computer being directly powered by the DC source.

The printer serves as a monitor of the internal actions of the system, as needed, and as a means of recording data in addition to the recorder. This means of monitoring provides a hard copy of information and has less space and weight requirements than a television. The recorder provides the primary means of data storage and serves as a backup copy to data transferred to other computers.

The data transfer is accomplished by means of a telephone modem. The modem allow data and programs to be transferred from the computer to almost any other computer system. Therefore, the computer has at its disposal any computer facilities available to the systems with which it is able to communicate. It also features a RS232C communication device that can be used with some modification of the modem hardware. Further, the modem provides additional possibilities for using the system in remote locations with less hardware. By telephone communication, data could be instantly transferred and monitored by other computer facilities eliminating the need for an in field AC power inverter, cassette recorder, printer, controlled outlet, and a large computer memory.

Operation of the system consists of first connecting the power supply. For a 12V DC supply, connect the source to the power inverter. Then, the controlled outlet is connected to the power inverter. Switch the power switch of the power inverter on. The power switch of the controlled outlet is then switched to the DC option. Cables from the recorder and computer DC power outlets are then connected to the controlled outlet box as labeled. The printer transformer is plugged into the labeled 117V outlet and connected to the printer power outlet.

In the case of a 115V power supply, these procedures are followed. The controlled outlet is connected to the 115V source. The power switch is flipped to the AC option. The recorder, computer, and printer are connected to the controlled outlet as labeled. The computer is not turned on or off by a switch, but is powered as soon as the plug from the power source is inserted in the power jack.

Next, it is necessary to load the program from cassette to computer. First type POKE 36867,255. This statement turns all the outlets on. Then press play on the recorder and type LOAD ” program name “. Then press ENTER. Allow sufficient time for the program to load as predetermined in lab. Then press RUN. Program begins to execute and may ask for inputs as indicated by the printer. The program should contain statements to automatically save the programs and data.

After the run, reverse the operating procedures concerning power supply and disconnect analog input lines. The system may then be taken to the lab for data transfer to other computers by modem. The information is transferred as outlined by the user manual for the modem.

Overall, the system offers several advantages to previous means of data collection. First, it provides accurate digitization of analog inputs versus prior time consuming methods of manual digitization. The data can be viewed and manipulated at once or more quickly analyzed than previously available. Also, the system is versatile in function. The system can be used in the field or in the lab due to its power inverter. The power inverter may also be used without the other system components. In addition, the controlled outlet can be used to control other devices as well. This system should be well suited for a variety of applications.