Data Logging

1. Introduction

Computers are often used by companies and scientists to automatically measure and record changes in conditions such as :

When a computer is used to automatically collect and record data as it is produced we say that the computer is being used for data logging.

A data logging system consists of sensors connected via an interface to a computer and some data logging software.

2. Components

A typical computer system which is used for data logging will need to include :

A computer.  
Some sensors to measure the physical quantities (e.g. temperature) of interest.
An interface to connect the sensors to the computer.
Some software to store and display the information on the computer.

The sensors will measure the physical quantities of interest and pass this data on to the computer via the interface. At regular intervals the computer software will record this data. The software can then be used to display the data as a graph or a table.

3. Sensors

Data that is to be recorded by a data logging system is gathered using sensors. A sensor is a device which measures a physical quantity such as the temperature and then sends a voltage to the computer representing the quantity. Sensors can be either analogue or digital :

There are lots of different sensors available, each of which is designed to measure a specific quantity. Examples of sensors include :

Sensor Type Quantity Measured Application
Temperature sensorAnalogueHow hot/cold it is.Monitoring the temperature of a science experiment.
Light sensorAnalogueHow light/dark it is.Turning street lights on when it is dark.
Pressure PadDigitalIf a pad is being pressed.Detecting cars arriving at a car park barrier.
pH sensorAnalogueThe acidity of a liquid.Monitoring river pollution.
ButtonDigitialIf the button is being pressed.Obtaining a ticket at a car park entry barrier.
Light GateDigitalDetects an object passing through the gate.Measuring the speed or acceleration of objects.
Passive Infra Red (PIR)DigitalDetects when an object moves into an area.Activating a burglar alarm if someone enters a room.

If you are designing a data logging system you will need to decide which sensors to use and where to put them. Many data logging systems will use lots of sensors at the same time.

If you need to use analogue sensors then as well as choosing the type of sensor(s) you want to use you must also make sure the sensor(s) take measurements over ranges that are suitable for the system you are creating. For example you may want to use a temperature sensor and have to make a choice between sensor A that measures temperature in the range -10ºC to 40ºC and sensor B that measures temperature in the range 0ºC to 120ºC. Sensor A would be best for measuring the temperature at which water melts and sensor B would be best for measuring the temperature at which water boils.

4. Interface

The sensors that are used in a data logging system are not plugged directly into the computer. This is because :

An interface is put between the sensors and the computer. You can typically connect up to eight sensors to an interface made for a home computer. The interface converts the voltages that the sensors produce into digital signals that the computer can process and protects the computer from dangerous voltages.

The conversion is carried out by a special device inside the interface which is known as an analogue-to-digital convertor or ADC.

5. Calibration

When an analogue sensor is first connected to an interface it may need to be calibrated. Calibration matches sensor voltages with units that humans can understand. During calibration two readings should be taken and matched to known values. For example a reading could be taken from a temperature sensor when it was in a bucket of ice and matched to 0ºC. Then another reading could be taken when the sensor was in boiling water and matched to 100ºC. Once this has been done the computer will be able to work out the temperature in degrees for all other sensor voltage readings.

Calibration Example

During calibration a particular temperature sensor produces a voltage of 1V at 0ºC and 5V at 100ºC. The difference in voltages between the two temperatures is 4V. Therefore the computer can calculate that a change in the voltage produced by the sensor of 1V is equivalent to a change in temperatue of 25ºC.

6. Software

Most data logging software will perform two main functions :

Recording Data

Because the data logging system has a limited amount of RAM it can only store a limited number of readings from the sensors. When you design a system you will need to decide :

To decide these things you must use your common sense and think about what you are monitoring.

The more frequently you take readings (or the more readings you take), the more computer RAM will be required to store them so it is important not to take readings too often.

Displaying and Analysing Data

The software will be able to display the data that has been recorded on the monitor or on a printer in a number of different formats such as :

The graphs can be of different types. e.g.

Some organisations will perform much more sophisticated analysis of data collected by data logging than the software that will run on a home PC can. For example the Met. Office uses a very sophisticated computer model to analyse data collected using data logging equipment to produce a weather forecast.

7. Remote Data Logging

Sometimes it is not possible to put the computer (or people) in the location that you need data logging sensors to be. Here are some examples of data logging applications where the computer and user are located some distance away from the sensors :

Information collected by the sensors must be sent back to the computer to be analysed. There are two different ways in which this can be done :

Transmission The data that is collected by the sensors can be transmitted electronically to the computer. Methods of communication such as telephone lines, radio links or satellites are used to transmit the data.
Storage and Collection The data that is collected by the sensors can be stored in a small amount of RAM contained in a device called a data logger. The data logger is located near the sensors. When the data needs to be analysed a person must go and collect the data logger and take it to where the computer is. The data can then be transferred into the computers memory using a simple cable.

The transmission method is usually best because the data is available straight away to be analysed by the computer. A person does not need to go and collect it. On the other hand the storage and collection method is usually much cheaper. Sometimes only the transmission method can be used. Nobody could go to the space probe to collect the data it had stored in its data logger!

Collecting data using sensors and sending it over a long distance to a computer to be recorded and analysed is called remote data logging.

8. Advantages and Disadvantages

Using computers to record data has a number of advantages over recording data manually :

The main disadvantage of using a data logging system is the initial cost of purchasing the equipment. Whilst a thermometer can be purchased for less than one pound, the price of the components of a data logging system to record the temperature will be considerable.

9. Designing Systems

When designing a data logging system you will need to consider :

1. What you want to measure.
2. What type of sensors you will use for your measuring.
3. What range you will need your sensors to take measurements over.
4. Where you will position the sensors.
5. Whether you will be able to put the computer and sensors in the same place or will have to put them in separate places and use remote data logging instead.
6. The amount of time that should pass between each measurement (the time-interval).
7. What graphs / tables you will use the software to produce and what you will do with them.

10. Control

Often the measurements that a data logging system takes are used to activate devices such as motors, lights, heaters etc. to control a process. For example measurements taken of the temperature in a house can be used to turn on the heater in a central heating system when it becomes cold.

When input measurements are used to control outputs like this the computer system which controls the process is known as a control system. There is a separate article on control systems.

GCSE ICT Companion 04 - (C) P Meakin 2004