Вы находитесь на странице: 1из 29

Unit 4 Sensors and Actuators Assigned Core Text Reading for this Unit: Groover, M. P.

(2008), Automation, Production Systems, and ComputerIntegrated Manufacturing, 3rd ed., Chapter 6. 4.1 Unit Introduction 4.2 Unit Learning Objectives 4.3 Sensors 4.4 Actuators 4.5 Analogue-to-Digital Converters 4.6 Digital-to-Analogue Converters 4.7 Input/Output Devices for Discrete Data 4.8 Unit Review 4.9 Self-Assessment Questions 4.10 Self-Assessment Answers

Section 4.1 Unit Introduction To achieve the goals of automation and process control, the computer must collect data from and transmit signals to the production process. This is done by using hardware components that act as intermediaries between the control system and the process itself. In the last unit process variables and parameters were defined as being either continuous or discrete. The control computer tends to use digital discrete (binary) data, however some of the data from the process may be continuous and analogue. Therefore we must have some way to accommodate this within the system, so that analogue data can be read in a digital format, and vice-versa. The main components that are required to support the interface between the controller and the process are: BULLETLIST Sensors for measuring continuous and discrete process variables Actuators that drive continuous and discrete process parameters Analogue to digital converters that convert continuous signals into binary Digital to analogue converters that convert digital data into analogue signals Input/output devices for discrete data ENDLIST Figure 4.1 illustrates the relationship between some of the major components. This unit explores each of these main components in turn.

Transformation Process Continuous and Discrete Parameters Actuators DAC Continuous and Discrete Variables Sensors ADC

Computer Controller

Output Devices

Input Devices

Figure 4.1: Major components linking control to process

Section 4.2 Unit Learning Objectives After completing this unit you will be able to: BULLET LIST Classify sensors as analogue or discrete Specify desirable traits of sensors Define actuators and specify the different types available Specify the operating conditions of DC, AC and stepper electrical motors Outline other types of actuators, other than electrical Outline the steps of the analogue-to-digital conversion process Outline the steps of the digital-to-analogue conversion process Show how discrete data is handled by computing systems ENDLIST

Section 4.3 Sensors A sensor allows for the transformation of a signal, or other physical variable, from one form to anothergenerally into a form that can be utilised more efficiently by the system that deploys the sensor. In this sense, a sensor is what is termed as a transducer; that is, it translates a physical variable from a form that cannot be read by the process, to one which allows it to be interrogated successfully.

Generally, within the manufacturing process, the sensor collects different types of process data for feedback control. KEYPOINT A sensor is a transducer that allows for the transformation of a signal, or other physical variable, from one form to another. END KEYPOINT Different sensors types are outlined in Table 4.1; they can generally be classified according to the category of stimulus or physical variable they are required to measure. Table 4.1: Sensor categories by stimulus
Stimulus Mechanical Electrical Thermal Radiation Magnetic Chemical Example Positional variables, velocity, acceleration, force, torque, pressure, stress, strain, mass, density Voltage, current, charge, resistance, conductivity, capacitance Temperature, heat, heat flow, thermal conductivity, specific heat Type of radiation (e.g. gamma rays, x-rays, visible light), intensity, wavelength Magnetic field, flux, conductivity, permeability Component identities, concentration, pH levels, presence of toxic ingredients, pollutants

KEYPOINT Sensors can be classified according to the category of stimulus or physical variable they are required to measure; these include stimulus that are mechanical, electrical, thermal, radiation, magnetic, and chemical in kind. END KEYPOINT Sensors may also be classified as analogue or discrete. A sensor that is analogue in operation produces a continuous analogue signal whose value varies in an analogous manner with the variable being measured. A sensor that is discrete produces an output that can only have certain values. The two discrete sensor types are binary and digital. A binary device produces one of two values, for example on/off. A digital device produces a digital output signal as either a set of parallel bits; or a series of pulses that can be quantified. In both cases the digital signal represents the quantity to be measured. Digital sensors are becoming more common owing to their compatibility to computing systems, and their relative ease-of-use. A new development in sensor technology is the emergence of micro-sensors, tiny sensors only a few microns in size that are usually fabricated out of silicon. A list of common sensors and measuring devices used in automation, together with explanations or sources of further information is given in Table 4.2. Table 4.2: Common measuring devices and sensors used in automation
Device Accelerometer Explanation or further information: http://en.wikipedia.org/wiki/Accelerometer

Ammeter Bimetallic switch Bimetallic thermometer Dynamometer Float transducer Fluid flow sensor Fluid flow switch Linear variable differential transformer Limit switch Manometer Ohmmeter Optical encoder Photoelectric sensor array Photoelectric switch Photometer Piezoelectric transducer Potentiometer Proximity switch Radiation pyrometer Resistancetemperature detector Strain gauge Tachometer Tactile sensor Thermistor Thermocouple Ultrasonic range sensor

http://en.wikipedia.org/wiki/Ammeter Switch based on bimetallic strip: http://en.wikipedia.org/wiki/Bi-metallic_strip Thermometer based on bimetallic strip: http://en.wikipedia.org/wiki/Bi-metallic_strip http://en.wikipedia.org/wiki/Dynamometer Lever arm with float attached, used to measure liquid levels in vessel (analogue), or to active control switch (binary) http://en.wikipedia.org/wiki/Flow_sensor http://en.wikipedia.org/wiki/Sail_switch http://en.wikipedia.org/wiki/Linear_variable_differential_transformer

http://en.wikipedia.org/wiki/Limit_switch http://en.wikipedia.org/wiki/Manometer http://en.wikipedia.org/wiki/Ohmmeter http://en.wikipedia.org/wiki/Rotary_encoder#Optical_Absolute_Encoders http://en.wikipedia.org/wiki/Photoelectric_sensor http://en.wikipedia.org/wiki/Photoelectric_sensor http://en.wikipedia.org/wiki/Photometer http://en.wikipedia.org/wiki/Piezoelectric_transducer http://en.wikipedia.org/wiki/Potentiometer http://en.wikipedia.org/wiki/Proximity_switch http://en.wikipedia.org/wiki/Radiation_pyrometer http://en.wikipedia.org/wiki/Resistance_thermometer

http://en.wikipedia.org/wiki/Strain_gage http://en.wikipedia.org/wiki/Tachometer Measuring device that indicates physical contact between two objects; see also: http://en.wikipedia.org/wiki/List_of_sensors http://en.wikipedia.org/wiki/Thermistor http://en.wikipedia.org/wiki/Thermocouple http://en.wikipedia.org/wiki/Ultrasonic_sensor

KEYPOINT Sensors and measuring devices come in a wide variety of forms, based upon many different operative principles, from analogue and discrete, to thermal, electrical, mechanical, magnetic and radiation devices. END KEYPOINT Sensors may also be active or passive. An active sensor responds to the stimulus without the need for any external powerin other words, it already possesses the capability of powering itself and its hardware components,

typically by battery power; a passive sensor, meanwhile, requires an external power source in order to operatein other words, its hardware is powered by sources of power it accumulates from the variables which it is set to measure. A thermocouple is an example of an active device, while a thermistor operates using passive principles. Figure 4.2 illustrates four key sensors used in the Mindstorms system from Lego.

Figure 4.2: Four sensors from Mindstorms modelling system (sound, touch, light and ultrasonic respectively).

KEYPOINT Sensors may also be active or passive. END KEYPOINT

PROFESSIONAL TRANSFERIBLE SKILLS [CRIT] [PROB] [WCOMM] LEARNING ACTIVITY 4.1 Use your company or the internet to identify suppliers and their product catalogues for five of the sensors listed in Table 4.2. Report on their specifications using the terminology used above i.e. analogue or discrete; mechanical or thermal, etc. and their transducer properties. Share your findings on the discussion board. END LEARNING ACTIVITY 4.1 The sensors transfer function is the relationship between the value of the physical stimulus and the value of the signal produced by the sensor and communicated to the controller. It operates in an input/output relationship, with the stimulus being the input, and the signal generated being the output. This can be expressed as follows:

S = f (s)
where S is the output signal; s is the stimulus; and f(s) is the functional relationship between them. For sensors that are binary (i.e. have one of two positions at any one time), such as limit switches, we can express them as follows: S = 1 if s > 0 and S = 0 if s < 0.

The ideal functional form for an analogue measuring device is a simple proportional relationship, such as:

S = C + ms
where C is the output value at a stimulus value of zero; and m is the constant of proportionality between s and S. In essence, m can be thought of as the sensitivity of the sensor. KEYPOINT The sensors transfer function (S) is the relationship between the value of the physical stimulus and the value of the signal produced by the sensor in response. END KEYPOINT EXAMPLE 4.1 The output voltage of a particular thermocouple sensor is registered to be 42.3 mV at temperature 105C. It had previously been set to emit a zero voltage at 0C. Since an output/input relationship exists between the two temperatures, determine (1) the transfer function of the thermocouple, and (2) the temperature corresponding to a voltage output of 15.8 mV. Answer (1) We know that :

S = C + ms

where S is the output signal; s is the stimulus; C is the output value at a stimulus value of zero; and m is the constant of proportionality between s and S. Therefore: Or => 42.3 mV = 0 + m(105C) = m(105C) m = 0.4028571429 S = 0.4028571429(s) (1)

(2) Using the relationship from (1) above, we replace S with the voltage output given, i.e. 15.8 mV. => => 15.8 mV = 0.4028571429(s) 15.8 / 0.4028571429 = s

=> s = 39.22C END EXAMPLE 4.1

Calibration of the sensor before use is important. When the sensor is calibrated, its transfer function is determined, and the inverse of the transfer function is subsequently derived, so that the value of the stimulus (s) may be determined. The ease of calibration is another method for classifying sensors. Desirable traits for sensors include the following: BULLETLIST High accuracyvery few systematic errors reported High precisionrandom variability is kept to a minimum Wide operating rangehigh accuracy and precision over a wide range of values High speed of responseresponds quickly to changes in the physical variable being measured Ease of calibrationquick and easy calibration expected Minimum driftthe gradual loss in accuracy over time is minimised High reliabilityfailures or malfunctions minimised Low costcost of purchasing or creating device is not excessive. ENDLIST KEYPOINT Desirable traits for sensors include: high accuracy, high precision, a wide operating range, a high speed of response, an ease of calibration, a minimum drift, a high reliability, and a low cost. END KEYPOINT

Section 4.4 Actuators An actuator converts the controller command signal into a change in a physical parameter. This change is usually a mechanical alteration, such as a change in position, or a change in velocity. Just like the sensor, an actuator is also a transducer, as it changes one type of physical quality into another. Many actuators are fitted with amplifiers, to covert low level control signals into strong signals sufficient to drive the actuator. KEYPOINT An actuator converts the controller command signal from the controller into a change in a physical parameter. END KEYPOINT

Three types of actuator may be defined: electrical, hydraulic, and pneumatic. Electrical actuators include electric motors of all kinds, stepper motors and solenoids; hydraulic actuators includes a wide variety of cylinder-devices compressing hydraulic fluids, typically oils or water-oil solutions, to achieve operation; while pneumatic actuators include a variety of piston-and-cylinder devices that compress air or other gases to achieve changes in the physical variables. Figure 4.3 illustrates a number of different types of actuators.

Figure 4.3: Actuators servo motor, stepper motor, solenoid, hydraulic piston and pneumatic piston respectively. KEYPOINT There are three types of actuator: electrical (motors and solenoids), hydraulic, and pneumatic. END KEYPOINT Electric motors convert electrical power into mechanical power. The most common type of electric motor consists of a rotor that rotates inside a stationary housing (the stator). The rotational movement is transferred to a shaft connected to the rotor, and subsequently to a series of pulleys, gears, shafts, and spindles arranged as necessary (See Figure 4.4). Electric current supplied to the stator, continuously changes the magnetic fields of the rotor, which in turn alters its position so as to align its magnetic fields with those of the stator; this causes the rotational effect of the rotor. The principle ways to select a motor are based on type (i.e. servo motor or stepper motor), torque (i.e. force exerted over distance) and revolutions per minute (RPM). The current supplied to the motor can be alternating current (AC) and direct current (DC) motors. There is also a special type of motor called the stepper motor. KEYPOINT

Electric motors convert electrical power into mechanical power; the most common type of electric motors are the ac or dc servo motor and stepper motor. END KEYPOINT

Figure 4.4: Servo Motor with motor, optical encoder and gearing DC motors are powered by a constant current and voltage. DC motors are used for their convenience of power sourcing, and for their relatively high torque-speed relationship. DC servo motors are a common type of DC motor used in mechanised and automated systems, where the term servo refers to a specific feedback mechanism that is used to control the motors position and speed. An optical encoder is the most common type of feedback mechanism used (see Figure 4.4). KEYPOINT DC motors are powered by a constant current and voltage. The creation of the magnetic field is caused by using a rotary switching device called the commutator, or in the brushless DC motor, solid-state circuitry. END KEYPOINT

LEARNING ACTIVITY 4.2

Use the internet to learn more about the servomechanism principle at web-site: http://hades.mech.northwestern.edu/index.php/Main_Page END LEARNING ACTIVITY 4.2 The most common source of electrical power in industry is alternating current or AC. AC motors are predominantly used in industry. AC motors are powered by the generation of a rotating magnetic field in the stator, where the speed of rotation depends on the frequency of the input electrical power. The rotor is forced to turn at the same speed as the rotating magnetic field. There are two broad categories of AC motor: induction motors, and synchronous motors. KEYPOINT AC motors are powered by the generation of a rotating magnetic field in the stator, where the speed of rotation depends on the frequency of the input electrical power. The rotor is forced to turn at the same speed as the rotating magnetic field. END KEYPOINT Induction motors are extremely popular owing to their relatively simple construction, and low cost of manufacture. Induction motors generally do not need an external source of power, as a magnetic field is induced by the rotation of the rotor through the magnetic field of the stator. Synchronous motors energise the rotor with alternating current, which generates a magnetic field in the gap between rotor and stator. This magnetic field creates a torque that turns the rotor at the same rotational speed as the magnetic forces in the stator. They also incorporate a device called an exciter to initiate rotation of the rotor when power is first supplied to the motor. All AC motors operate at a constant speed that depends on the frequency of the incoming electrical power; thus operations where fixed speeds are required are ideal for AC motors. Issues can arise, however, where variations in speeds, and starting and stopping, occur over frequent intervals. Adjustable-frequency drives, called inverters, address the issue by controlling the cycle rate of the AC power to the motor. LEARNING ACTIVITY 4.3 Use the internet to find out the specifications for the motor used in the NXT Mindstorms kits from Lego and illustrated in Figure 4.5. What are its torque, RPM and type characteristics? How does it measure rotational feedback?

Figure 4.5: Mindstorms motor from Lego END LEARNING ACTIVITY 4.3 A third motor type is the stepper motor, or step motor. This provides rotation in the form of discrete angular displacements, called step angles, whereby each angular step is created by a discrete electrical pulse. The total angular rotation is controlled by the number of pulses received by the motor, and rotational speed is controlled by the frequency of the pulses. The stepper is characterised by a multi pronged rotor and set of poles in the stator and by electronic circuitry that changes the polarity to achieve a stepping effect as north and south are attracted to each other (See Figure 4.6).

Figure 4.6: Schematic of a stepper motor rotor and stator KEYPOINT The stepper motor provides rotation via step angles, which are created by a discrete electrical pulse, the total number of which equates to the total angular rotation. END KEYPOINT LEARNING ACTIVITY 4.4 Learn more about induction motors at web-site:

http://en.wikipedia.org/wiki/Stepper_motor An excellent paper on the use and application of stepper motors is given by the Solarbotics.net web-site at: http://www.solarbotics.net/library/pdflib/pdf/motorbas.pdf END LEARNING ACTIVITY 4.4 The step angle of stepper motors is related to the number of steps for the motor according to the relationship:

360 ns

where is the step angle in degrees; and ns is the number of steps for the stepper motor, which must be an integer value. The total angle through which the motor rotates (Am) is given by:

Am = n p
where Am is the total angle through which the motor rotates in degrees; np is the number of pulses received by the motor; and is the step angle in degrees. Angular velocity is given by:

2f p ns

where is angular velocity; fp is the pulse frequency; and ns is the number of steps for the stepper motor. The speed of rotation is given by:

N=

60 f p ns

where N is the rotational speed; fp is the pulse frequency; and ns is the number of steps for the stepper motor. KEYPOINT For the stepper motor the step angle and other angular measurements may be calculated; these metrics define the uses to which the stepper motor may be put. END KEYPOINT EXAMPLE 4.2 A stepper motor has a step angle = 3.6. (1) How many pulses are required for the motor to rotate through ten complete revolutions? (2) What pulse frequency is required for the motor to rotate at a speed of 100 rev/min? (1) We know that the step angle is given by:

360 ns where is the step angle in degrees; and ns is the number of steps for the stepper motor.

=> => =>

3.6 = 360 / ns 3.6 (ns) = 360 ns = 360 / 3.6 = 100 step angles

The total angle through which the motor rotates (Am) is given by:

Am = n p

where Am is the total angle through which the motor rotates in degrees; np is the number of pulses received by the motor; and is the step angle in degrees. Now, to rotate through ten complete revolutions: 10(360) = 3600 = Am np = 3600 / 3.6 = 1000 pulses (2) We know that:

ns where N is the rotational speed; fp is the pulse frequency; and ns is the number of steps for the stepper motor.
Thus, from the information derived from (1) above, and where N = 100 rev/min: 100 = 60 fp / 100 => 10,000 = 60 fp => fp = 10,000 / 60 = 166.667 = 167 Hz END EXAMPLE 4.3 Stepper motors are widely used in the following applications: BULLETLIST Open loop control systems Low-to-medium torque and power scenarios

N=

60 f p

Machine tools in production machines, industrial robots, x-y plotters, medical and scientific instruments, and computer peripherals. ENDLIST A key characteristic for all motors is the torque-speed relationship. The relationship between torque and speed for the DC servo motor, AC servo motor and the stepper motor is shown in Figure 4.6. Generally, the torque generated is higher at lower speeds and reaches an operating point for particular loads. The effort of changing loads is to swing the load arm in Figure 4.6 around the point of origin. As load increases (rotating the arm counter-clockwise) the speed reduces and torque increases.

Torque, T
Stepper AC Servo DC Servo

Load

Operating Points Speed,


Figure 4.6: Torque-speed relationship for stepper motor Other types of electrical actuators include the following: BULLETLIST Solenoids these consist of a stationary wire coil inside of which is a moveable plunger. When an electric current is applied to the coil, the plunger is drawn into the coil; when the current is switched off the plunger is returned to its previous position by a spring. Actuator action type here is a linear, push-pull movement, but rotary solenoids are also available, usually over a limited angular range. Electromechanical relaysan on/off electrical switch consisting of a stationary coil and moveable arm that opens or closes an electrical contact by means of a magnetic field that is generated when current is passed through the coil. ENDLIST KEYPOINT Solenoids and electromagnetic relays are other types of electrical actuators. END KEYPOINT

LEARNING ACTIVITY 4.5 Learn more about solenoids and electromagnetic relays from the following resources. The basic principles and operating characteristics of solenoids are outlined by DetroitCoil.com in two white papers: http://www.detroitcoil.com/PAGES/What%20Is%20A%20Solenoid.pdf http://www.detroitcoil.com/PAGES/How%20A%20DC%20Solenoid%20Works1.p df Electromagnetic relays are outlined in great detail in Wikipedia at: http://en.wikipedia.org/wiki/Relay END LEARNING ACTIVITY 4.5 Hydraulic and pneumatic actuators are both operated by pressurised fluids or gases. Oil is used in hydraulic systems, and compressed air is used in pneumatic systems. Both categories of device are similar in operation but different in construction, primarily owing to the differences between fluids and gases. Fluids are non-compressible, whereas gas is compressible. In production automation, hydraulic systems are generally preferred when high forces and accurate control are required. Pneumatic systems are generally used for low cost applications, or where high speed actuation is needed. Hydraulic systems generally demand intricate and precise device construction, with close tolerances on component parts being essential; whereas pneumatic systems are generally not as fine in construction, with any problems with air leaks being prevented by the use of general-purpose components such as O-rings. KEYPOINT Hydraulic and pneumatic systems are types of actuators. Oil is used in hydraulic systems, and compressed air is used in pneumatic systems. END KEYPOINT Both hydraulic and pneumatic systems can be designed to provide linear or rotary motions. One of the most common hydraulic and pneumatic devices is the cylinder device, which provides a linear in/out motion. It consists of a cylindrical tube inside of which is housed a piston that moves in and out inside the cylinder housing. The piston may or may not have a spring to allow it to return to its initial position inside the cylinder; if it doesnt it uses the action of the fluid or gas to return to its initial position after it has performed a stroke. The former, springloaded piston is called a single-acting cylinder and piston system; the latter system is called a double-acting cylinder and piston (see Figure 4.7).

Figure 4.7: Single-acting and double-acting cylinder and piston types KEYPOINT In cylinder and piston systems there are two types: single-acting and doubleacting END KEYPOINT The force and speed characteristics of pneumatic systems are difficult to calculate owing to the fact that air is compressible. Hydraulic systems give no such problems since oil is incompressible. We are able to express the relationships between the speed and force of the piston inside the hydraulic cylinder with the fluid flow rate and pressure as follows:

v=

Q A

F = pA
Where v is the velocity of the piston; Q is the volumetric flow rate; A is the area of the cylinder cross section; F is the applied force; and p is the fluid pressure. For the double-acting cylinder and piston system, the circumference and length of the piston rod changes the calculation for the return stroke of the system, as its presence in the chamber necessarily reduces the total cylinder area upon which the fluid can exert pressure. It ultimately results in a slightly greater piston speed and slightly less applied force on the reverse stroke than on the forward stroke. KEYPOINT

The force and speed characteristics of pneumatic systems can be difficult to calculate since air is compressible. Hydraulic systems give no such problem since oil is incompressible END KEYPOINT Fluid-powered rotary motors are also available to provide continuous rotational motion. The rotation speed of a hydraulic motor is directly proportional to the fluid flow rate, as defined in the equation:

= KQ
Where is angular velocity; Q is the volumetric fluid flow rate; and K is a constant of proportionality. Angular velocity can be converted to revolutions per minute (rpm) by multiplying by 60/2. EXAMPLE 4.3 A double-acting hydraulic cylinder has an inside diameter = 75 mm. The piston rod has a diameter = 14 mm. The hydraulic power source can generate up to 5.0 MPa of pressure at a flow rate of 200,000 mm3/sec to drive the piston. (a) What are the maximum possible velocity of the piston and the maximum force that can be applied in the forward stroke? (b) What are the maximum possible velocity of the piston and the maximum force that can be applied in the reverse stroke? Solution: Forward stroke area A = 0.25(75)2 = 4418 mm2 Reverse stroke area A = 4418 0.25(14)2 = 4264 mm2 (a) Forward stroke v = 200,000 / 4418 = 45.3 mm/sec F = 5(4418) = 22,090 N (b) Reverse stroke v = 200,000 / 4264 = 46.9 mm/sec F = 5(4264) = 21,320 N END EXAMPLE 4.3

Section 4.5 Analogue to Digital Converters The key problem with analogue signals is their incompatibility with computing systems, which operate in digital format. Process signals are generally continuous and analogue, so they need to be converted in some way into a digital format. Analogue to Digital (ADC) conversion provides this functionality. KEYPOINT Analogue signals must be converted into a digital format for processing by computers controlling the process END KEYPOINT

There are five general steps and/or devices deployed to convert signals from analogue into digital (see Figure 4.8): NUMLIST Sensor and transducerthis generates the original analogue signal. Signal conditioningthis renders the signal into a suitable form for conversion; it can include noise filtration steps, or the conversion from one signal form to another (for example, from current into voltage). Multiplexerthis is a time-sharing switching device which collects the incoming analogue signals and determines when their output should occur. In most processes there are many analogue signals generated simultaneously; the multiplexer sorts out the priorities of the signals to be passed to the rest of the process. Amplifieronce the signal is passed from the multiplexer, it is scaled-up or scaled-down by means of an amplifier. Amplification is important, as it ensures that the signal produced is compatible with the ADC. Analogue-to-digital converter (ADC)the prepared signal is converted from analogue to digital. ENDLIST
Transformation Process Continuous Variable Multiplexer Amplifer Sensors & Transducer Signal Conditioner Other Signals

Digital Computer

Analog Digital Converter

Figure 4.8: Analogue to Digital conversion steps KEYPOINT

There are five general devices deployed in the process of analogue to digital conversion; these are: the sensor and transducer; the signal conditioner; the multiplexer; the amplifier; and the analogue-to-digital converter. END KEYPOINT The ADC component illustrated in Figure 4.8 operates in three phases: sampling; quantisation; and encoding. Sampling consists of transforming the continuous signal into a series of discrete analogue signals at periodic intervals; quantisation consists of assigning each resulting discrete analogue signal to one of a finite number of previously defined amplitude levels, each of which is a discrete value of voltage ranging over the full scale of the ADC; while in encoding the result of the quantisation process is converted into digital code, represented as binary digits. So for example the value of voltage at a particular moment in time of say 4.234volts is converted in a digital number of say 10011. KEYPOINT The analogue-to-digital conversion process consists of sampling, quantisation, and encoding. END KEYPOINT LEARNING ACTIVITY 4.6 Learn more about the analogue to digital conversion principle at: http://en.wikipedia.org/wiki/Analog-to-digital_converter END LEARNING ACTIVITY 4.6 The conditions that dictate the choice of ADC for a given application are illustrated in Table 4.3. Table 4.3: Conditions that dictate ADC choice
Condition Sampling rate Description The rate at which the continuous analogue signals are polled. Higher sampling rates means a closer approximation to the original analogue waveform is achieved. The maximum possible sampling rate for each signal is the maximum sampling rate of the ADC divided by the multiplexer number of channels. The time interval between the application of an incoming signal and the determination of the digital value by the quantisation and encoding phases of the conversion procedure. The maximum possible sampling rate is limited by conversion time. Conversion time depends on the type of conversion procedure used, and the number of bits used to define the converted digital value. As the number of bits increases, so does the conversion time, however the resolution of the ADC improves. The precision with which the analogue signal is evaluated. Precision is determined by the number of quantisation levels, which in turn is determined by the bit capacity of the ADC and the computer. Various methods exist, the most common being the successive approximation method. In this method a series of trial voltages are compared to the input signal whose value is unknown. The number of trial voltages corresponds to the number of bits used to encode the

Conversion time

Resolution

Conversion method

signal.

KEYPOINT The conditions that dictate the choice of ADC for a given application are sampling rate, conversion time, resolution, and the method of conversion. END KEYPOINT For resolution as outlined in Table 4.3, the number of quantisation levels is defined as:

N q = 2n
where Nq is the number of quantisation levels; and n is the number of bits. Resolution can be defined in equation form as:

R ADC =

L L = n Nq 1 2 1

where RADC is the resolution of the ADC; L is the full-scale range of the ADC; and Nq is the number of quantisation levels. Quantisation generates an error, because the digitised signal is only sampled from the original analogue signal. The maximum possible error occurs when the true value of the analogue signal is on the borderline between two adjacent quantisation levels, in which case the error is half the quantisation-level spacing; this gives us the following for quantisation error (Quanerr):

1 Quanerr = R ADC 2
where RADC is the resolution of the ADC. EXAMPLE 4.4 QUESTION Using an analogue-to-digital converter, a continuous voltage signal is to be converted into its digital counterpart. The maximum voltage range is 25 V. The ADC has a 16-bit capacity, and full scale range of 60 V. Determine (1) number of quantization levels, (2) resolution, (3) the spacing of each quantisation level, and the quantisation error for this ADC. ANSWER (1) Number of quantization levels:

N q = 2n
where Nq is the number of quantisation levels; and n is the number of bits. = 216 = 65,536

(2) Resolution:

R ADC =

L L = n Nq 1 2 1

where RADC is the resolution of the ADC; L is the full-scale range of the ADC; and Nq is the number of quantisation levels. RADC = 60 / 65,536 -1 = 0.0009155 volts (3) Quantisation error:

1 Quanerr = R ADC 2
= (0.0009155)/2 = 0.00045778 volts END EXAMPLE 4.4 Section 4.6 Digital to Analogue Converters Once the computing system has successfully received the process signal, converted from analogue to digital format, it initiates control principles based upon that information. Returning control signals to the process from the computer requires a reverse of the analogue-to-digital conversion outlined above, so that digital-to-analogue conversion (DAC) may take place. The DAC transforms the digital output of the computer into a continuous signal to drive an analogue actuator or other analogue device. KEYPOINT Returning control signals to the process from the computer requires digital-toanalogue conversion to take place. END KEYPOINT LEARNING ACTIVITY 4.7 Learn more about the digital to analogue conversion principle at: http://en.wikipedia.org/wiki/Digital-to-analog_converter END LEARNING ACTIVITY 4.7 DAC consists of two steps: decoding, in which the digital output of the computer is converted into a series of analogue values at discrete moments in time; and data holding, in which each successive value is changed into a continuous signal (usually electrical voltage) used to drive the analogue actuator during the sampling interval. KEYPOINT Digital-to-analogue conversion consists of two steps, decoding and data holding.

END KEYPOINT Decoding sees the digital value outputted by the computer being tied to a binary register that controls a reference voltage source. Each successive bit in the register controls half a bit of its predecessor, so that the level of the output voltage is determined by the status of the bits in the register. The output voltage is given by:

EO = E ref {0.5 B1 + 0.25 B2 + 0.125 B3 + ... + (2 n ) 1 Bn }


where EO is the output voltage of the decoding step; Eref is the reference voltage; and B1, B2,, Bn is the status of successive bits in the register, 0 or 1; and n is the number of bits in the binary register. KEYPOINT Decoding sees the digital output of the computer being structured into a binary register that controls a reference voltage source. END KEYPOINT Data holding tries to approximate the envelope formed by the data series. The creation of an analogue signal from digital data requires extrapolation of existing data points, finding commonalities and extending the digital points to form a continuous envelope that approximates as closely as possible to digital output under investigation. Data-holding devices are classified according to the order of the extrapolation calculation used to determine the voltage output during sampling intervals. Most ADC and DAC conversions are carried out within the functionality of a process controller. Where a controller does not have this functionality (e.g. using a general purpose computer), then easily configured ADC/DAC devices can be purchased. For very special purpose systems, ADC and DAC requires the design of electronic and analogue circuits to process the various signals.

Section 4.7 Input/Output Devices for Discrete Data Discrete data does not require conversion applications to be processed by computers. As described in the last unit, there are three types of discrete data: binary data; discrete data other than binary; and pulse data. KEYPOINT Discrete data consists of three typesbinary data, discrete data other than binary, and pulse datawhich uses input/output interfaces to connect to the computing system. END KEYPOINT

The input/output interfaces for each of these data types are described in Table 4.4. Note that there are two contact interfaces, input and output. These can be arranged as a single contact point (for example for binary data), or as an array of contact points (for example for discrete data other than binary). A contact input interface allows binary data to be read from some external source, such as the process, by the computer. It consists of a series of simple contacts that can be either closed or open to indicate the binary status of connected devices. The computer periodically scans the actual status of the contacts to update the values stored in the memory. Limit switches, valves, and motor pushbuttons are typical devices connected to the contact input interface. One example of an input/output device is the relay board illustrated in Figure 4.9.

Figure 4.9: Relay board for contact input/output A contact output interface allows binary data to be read from the computer by some external device. The contact positions are set either on or off, and maintained at these positions until changed by the computer in response to changing conditions in the process environment. Alarms, indicator lights, solenoids, and constant speed motors are typical devices connected to the contact output interface. Table 4.4: Input/output interfaces for discrete data
Digital data type Binary Other than binary Pulse Input interface with computer Contact input Contact input array Pulse counters Output interface from computer Contact output Contact output array Pulse generators

KEYPOINT

A contact input interface allows binary data to be read from some external source, such as the process, by the computer. A contact output interface allows binary data to be read from the computer by some external device. END KEYPOINT Discrete data can also be transmitted as pulses by such devices as digital transducers and optical encoders, and used to control devices such as stepper motors. A pulse counter converts a series of pulses into a digital value, the most common device being those used to convert electrical pulses into digital data by deploying a series of sequential logic gates, called flip-flops, and a memory capability for storing the results of the counting procedure. KEYPOINT Discrete data can also be transmitted as a series of pulses that is captured by a pulse counter, which converts the pulses into a digital value. END KEYPOINT Pulse counters are typically used for counting and measurement applications, such as counting the number of packages moving past a photoelectric sensor, or to indicate the rotational speed of a shaft. A pulse generator is a device used to produced a series of electrical pulses whose total number and frequency are specified by the control computer. Typical applications of the pulse generator is in positioning systems, whereby the number of pulses released drive the axis of the system and moves workheads into position. KEYPOINT Pulse counters are typically used for counting and measurement applications; while pulse generators are used in positioning systems. END KEYPOINT

Section 4.8 Unit Review BULLETLIST A sensor is a transducer that allows for the transformation of a signal, or other physical variable, from one form to another. Sensors can be classified according to the category of stimulus or physical variable they are required to measure; these include stimulus that are mechanical, electrical, thermal, radiation, magnetic, and chemical in kind. Sensors may also be classified as analogue or discrete. A sensor that is analogue in operation produces a continuous analogue signal whose value varies in an analogous manner with the variable being measured. A sensor that is discrete produces an output that can only have certain values.

Sensors and measuring devices come in a wide variety of forms, based upon many different operative principles, from analogue and discrete, to thermal, electrical, mechanical, magnetic and radiation devices. Sensors may also be active or passive. An active sensor responds to the stimulus without the need for any external power; a passive sensor requires an external power source in order to operate. The sensors transfer function (S) is the relationship between the value of the physical stimulus and the value of the signal produced by the sensor in response. Desirable traits for sensors include: high accuracy, high precision, a wide operating range, a high speed of response, an ease of calibration, a minimum drift, a high reliability, and a low cost. An actuator converts the controller command signal into a change in a physical parameter. Actuators are transducers, and may be fitted with amplifiers to strengthen initial control signals to drive the actuator. There are three types of actuator: electrical, hydraulic, and pneumatic. Electric motors convert electrical power into mechanical power; the most common type of electric motor is the rotational motor. DC motors are powered by a constant current and voltage. The creation of the magnetic field is caused by using a rotary switching device called the commutator, or in the brushless DC motor, solid-state circuitry. In a DC servomotor the magnitude of the rotor torque is a function of the current passing through the rotor, while the mechanical power delivered by the DC servomotor is the product of torque and velocity. Typically the servomotor is connected to a piece of machinery, which represents the load that is driven by the servomotor. The torque developed by the motor and the torque required by the load must be balanced, and this amount of torque is called the operating point. AC motors are powered by the generation of a rotating magnetic field in the stator, where the speed of rotation depends on the frequency of the input electrical power. The rotor is forced to turn at the same speed as the rotating magnetic field. Induction motors generally do not need an external source of power as a magnetic field is induced by the rotation of the rotor through the magnetic field of the stator. Synchronous motors energise the rotor with alternating current, which generates a magnetic field in the gap between rotor and stator.

The stepper motor provides rotation via step angles, which are created by a discrete electrical pulse, the total number of which equates to the total angular rotation. For the stepper motor the step angle and other angular measurements may be calculated; these metrics define the uses to which the stepper motor may be put. Electrical actuators include solenoids and electromagnetic relays. Hydraulic and pneumatic pistons are types of actuators. Oil is used in hydraulic systems, and compressed air is used in pneumatic systems. In cylinder and piston systems there are two types: single-actingwhere a spring is used to allow the piston to return to its initial position inside the cylinder; and double-actingwhere the action of the fluid or gas is used to return the piston to its initial position after it has performed a stroke. The force and speed characteristics of pneumatic systems are difficult to calculate owing to the fact that air is compressible. Hydraulic systems give no such problem as oil is incompressible Analogue signals from the process are incompatible with computing systems, which operate in digital format. They must be converted into a format that can be readily read by the computers controlling the process, by using analogue to digital conversion methods. There are five general devices deployed in the process of analogue to digital conversion; these are: the sensor and transducer; the signal conditioner; the multiplexer; the amplifier; and the analogue-to-digital converter. The analogue-to-digital conversion process consists of sampling, quantisation, and encoding. The conditions that dictate the choice of ADC for a given application are sampling rate, conversion time, resolution, and the method of conversion. Returning control signals to the process from the computer requires digital-toanalogue conversion to take place. Digital-to-analogue conversion consists of two steps, decoding and data holding. Decoding sees the digital output of the computer being structured into a binary register that controls a reference voltage source.

Data holding tries to approximate the envelope formed by the digital data series. The most common data-holding device is the zero-order hold. Discrete data does not need to be converted to be read by the computer system. It consists of three typesbinary data, discrete data other than binary, and pulse datawhich uses input/output interfaces to connect to the computing system. A contact input interface allows binary data to be read from some external source, such as the process, by the computer. A contact output interface allows binary data to be read from the computer by some external device. Discrete data can also be transmitted as a series of pulses that is captured by a pulse counter, which converts the pulses into a digital value. Pulse counters are typically used for counting and measurement applications; while pulse generators are used in positioning systems. ENDLIST

Section 4.9 Self-Assessment Questions NUMLIST What classification can be applied to sensors? What are the desirable traits of sensors? What is an actuator? What are the available types? What are the operating conditions of DC, AC and stepper electrical motors? Outline other types of actuators, other than electrical. What is the need for analogue-to-digital converters? Outline the steps of the analogue-to-digital conversion process. What is the need for digital-to-analogue converters? Outline the steps of the digital-to-analogue conversion process. Define how discrete data is handled by computing systems. ENDLIST

Section 4.10 Answers to Self-Assessment Questions

NUMLIST Sensors may be classified as analogue or discrete. A sensor that is analogue in operation produces a continuous analogue signal whose value varies in an analogous manner with the variable being measured. A sensor that is discrete produces an output that can only have certain values. Desirable traits for sensors include: high accuracy, high precision, a wide operating range, a high speed of response, an ease of calibration, a minimum drift, a high reliability, and a low cost. An actuator converts the controller command signal into a change in a physical parameter. Actuators are transducers, and may be fitted with amplifiers to strengthen initial control signals to drive the actuator. There are three types of actuator available: electrical, hydraulic, and pneumatic. Electric motors convert electrical power into mechanical power. DC motors are powered by a constant current and voltage. The creation of the magnetic field is caused by using a rotary switching device called the commutator, or in the brushless DC motor, solid-state circuitry. AC motors are powered by the generation of a rotating magnetic field in the stator, where the speed of rotation depends on the frequency of the input electrical power. The rotor is forced to turn at the same speed as the rotating magnetic field. The stepper motor provides rotation via step angles, which are created by a discrete electrical pulse, the total number of which equates to the total angular rotation. Hydraulic and pneumatic systems are types of actuators, other than electrical. Both categories of device are similar in operation but different in construction, primarily owing to the differences between fluids and gases. Analogue signals from the process are incompatible with computing systems, which operate in digital format. They must be converted into a format that can be readily read by the computers controlling the process, by using analogue to digital conversion methods. The analogue-to-digital conversion process consists of sampling, quantisation, and encoding. Digital signals from the control computer are incompatible with the process, which operates in analogue format. They must be converted into a format that can be readily read by the process, by using digital to analogue conversion methods. Digital-to-analogue conversion consists of two steps, decoding and data holding. Discrete data does not need to be converted to be read by the computer system. It is handled by input/output interfaces to connect to the computing system, or by

means of pulse counters and generators. A contact input interface allows binary data to be read from some external source, such as the process, by the computer. A contact output interface allows binary data to be read from the computer by some external device. END LIST