PC Based Data Logging and Control
Until recently most scientific data-gathering systems were based on electromechanical devices such as chart recorders and analogue gauges. The capability to process and analyze this data was rather limited. With the introduction of more powerful PCs new doors have been opened for data gathering, logging, processing, and control. There are a few basic components to every PC data logging and Control system. They include sensors, connectors, conditioning, Analog to Digital (A/D) Conversion, Online-Analysis, Logging/Storage, and Offline-Analysis. In a Data Logging and Control system a few additional components are required including D/A Conversion and actuators.
Sensors are any device that is used to convert physical parameters into electrical signals. Sensors must be calibrated so that the electrical output they provide maybe used to take meaningful measurements. Examples are: thermocouples, flow meters, pressure transducers, strain gauges, accelerometers, and microphones.
The sensor must have a way to transmit its electrical signal to the system. This is done with connectors. There are a wide variety of signal connectors each with its own advantages and disadvantages. Connectors can be as simple as tightening a screw around a wire or a more complicated like the connectors typically used in NDT shown below.
In order for the electrical signal provided by the sensor to be useful it must be conditioned. Conditioning includes all actions performed on the signal to improve its usability before it is digitized.
Amplification – When the voltage levels being measured are very small, amplification is used maximize the effectiveness of the digitizer. Typical digitizers have a conversion range from about +10v to -10v, and by amplifying the signal to cover most of the range allows better accuracy and resolution of the measurement. Typical sensors that require amplification are thermocouples and strain gauges.
Attenuation– Attenuation is the opposite of amplification. It is necessary when the voltages to be digitized are outside of the input range of the digitizer. This form of signal conditioning divides down the input signal so that the conditioned signal is within the range of the A/D converter. Attenuation is necessary for measuring high voltages.
Isolation– Voltage signals outside the range of the digitizer can damage the measurement system and harm the operator. For that reason, isolation is usually required in conjunction with attenuation to protect the system and the user from dangerous voltages or voltage spikes. Isolation may also be required when the sensor is on a different electrical ground plane from the measurement sensor (such as a thermocouple mounted on an engine).
Multiplexing– Typically, the digitizer is the most expensive part of a data acquisition system. Multiplexing allows you to automatically route multiple signals into a single digitizer, providing a cost-effective way to greatly expand the signal count of your system. Multiplexing is necessary for any high channel count application.
Filtering– Filtering is required to remove unwanted frequency components from a signal. This prevents aliasing and reduces noise. Thermocouple measurements typically require a low-pass filter to remove power-line noise from the signals. Vibration measurements normally require a higher-frequency low-pass filter to remove high frequency signal components that are above the range of the acquisition system.
Excitation– Many sensors, including strain gauges, accelerometers, and eddy current probes, require some form of power to make a measurement. Excitation provides the required power. This excitation can be a voltage or current source, depending on the sensor type.
Linearization - Some types of sensors produce voltage signals that are not linearly related to the physical quantity they are measuring. Linearization is the process of interpreting the signal from the sensor as a physical measurement. This can be done either with signal conditioning or through software. Thermocouples are the classic example of a sensor that requires linearization.
Most sensors require a combination of two or more of these conditioning techniques. A good example is a thermocouple, which requires amplification, linearization, filtering, and sometimes isolation.
After a signal has been properly conditioned it is time to convert the analog electrical signal into digital values and transmit those signals to the computer. This is accomplished using a data acquisition (DAQ) board. Data acquisition boards are readily available circuit boards that can be plugged directly into the PC’s system bus (e.g. ISA or PCI) expansion sockets. A problem arises when multiple signals are to be logged simultaneously. The data logging system must use multiple DAQ boards, a multi channel DAQ board, or a multiplexer (as mentioned earlier) and a single DAQ board. Typically a multiplexer and a single DAQ board is the cheapest option. However with a multiplexer small time delays are introduced between the sampling of each channel so the data is no longer exactly simultaneous.
After the analog signal has been converted to raw binary values online analysis must be performed on the data using software. Online analysis can take many different forms. Channel scaling is one example where the binary values are converted into properly scaled measurements with appropriate units. Another example is alarming and event management, which means monitoring data and providing notification if some set limits are exceeded. Alarming may also provide automated response to exceeding a limit such as shutting down a machine if its operating temperature exceeds a limit.
PC based data logging systems generally use the hard drive of the PC to store data, but may also use tape drives, network drives, or RAID drives. Software is critical to the logging of data because it determines how the data is stored, how quickly data can be written to disk, and how efficiently disk space is used. The format (i.e. ASCII text, binary, and database) of the data being written also has a large impact on the performance of the logging system
ASCII text files are the most common and flexible form of data storage. They are useful because they can be opened or imported into almost any software package and are easily transferred between operating systems. ASCII files also have disadvantages, which include using disk space inefficiently and requiring additional processing to read and write.
Binary files are the most efficient method of data storage. The raw bytes are written directly to disk and take up considerably less space and less processing than a text file. However, binary files cannot be viewed directly by common software such as MS Excel. Instead, they must be first translated into meaningful data.
Databases are typically binary files that provide a structured format for inserting and retrieving data. They are optimized for efficiently handling large amounts of data and for searching through information in the database without loading everything into memory. They usually have software to make it easy to import data into different software packages for analysis and report generation. Databases also have disadvantages, which include increased complexity and difficulty when implementing them from scratch.
Offline analysis is performing mathematical analysis on data after it has been acquired to extract information. This can include computing basic statistics of measure parameters, as well as more advanced functions such as the frequency content of signals. Offline analysis can occur with the rest of the data logging applications or separately through stand-alone analysis software such as MS Excel.
The control part of the PC system can take one of two forms. Open-loop control which is independent of the current state of the process, or closed-loop control in which the PC measures one or more input variables and uses software to make decisions about what control signals should be output. Changes in the process by the control signal will then reflected in the future input signals which will be analyzed again and new control signals will be output. Examples of open-loop control include using a PC to change settings on manufacturing equipment, or operate a robotic arm. If a data logging system is to have control capabilities as well a few additional components are required including a D/A converter and an Actuator.
A Digital to Analog converter is just the opposite of an Analog to Digital Converter. It takes the digital values output by the computer and turns them into analog signals which can be conditioned (Amplified etc.) and then connected to Actuators.
An actuator is any device that converts electrical signals to physical parameters. Basically, an actuator is the opposite of a sensor. Examples are electrical motors, solenoids, heater coils, and ultrasonic transducers.
Some Sensors and Actuators use digital signals and so do not need to be routed through an A/D or a D/A converter. A good example is a switch which is either on or off. This 1 or 0 can be processed directly by the PC and needs no D/A conversion.
PCs have revolutionized the way the modern engineer records and analyzes data. A process that used to take many hours even days by hand can now be completed almost instantaneously with the aid of the modern computer. All that is needed is a few basic components to turn any PC into a useful data logging and control machine.
T. Magruder, A Review of PC-Based Data Logging and Recording Techniques, Zone, Online May 27 2004.http://zone.ni.com/devzone/conceptd.nsf/appnotebynumber/ 210AFD6B5055DDD786256C72004DCBA8?OpenDocument&node=dz52000_us .
K. James, PC Inerfacing and Data Acquisition: Techniques for Measurement, Instrumentation and Control, Butterworth-Heinemann, 2000.
S. E. Derenzo, Practical Interfacing in the Laboratory Using a PC for Instrumentation, Data Analysis, and Control, Cambridge University Press, 2003.