10. Discrete Sensors
• There are a number of system conditions that need to be detected when doing control. These conditions are most commonly true/false detections, having discrete states.
• There are a few important concepts when connecting to sensors, including,
The physical phenomena that allows detection
The actual wiring of the sensors
10.1 Sensor Wiring
• There are a variety of basic methods for connecting sensors to devices. These include,
Plain Switches: normally open or closed to allow current to flow.
TTL (Transistor Transistor Logic): for low voltage logic using 0V and 5V.
Sinking/Sourcing: DC current is drawn through the sensor.
Solid State Relays: These are used for switching AC outputs.
• Plain switched outputs usually accompany relays for outputs, or similar devices.
10.1.2 Transistor Transistor Logic (TTL)
• This method switches between two logical DC voltages.
• Typically the low voltage is 0V and it indicates a false condition.
• The true state is normally indicated with a high voltage. 5V is quite common, but other voltages can be used for certain sensors.
• The voltage levels have certain tolerances built in. For example 0V indicates false, but a voltage up to 1.2V might still be considered false. This also means there is an ambiguous zone where the voltage will be judged neither true or false. This zone can be eliminated using schmitt triggers.
• These scheme is used for a variety of reasons.
they can be made to appear like normal switches.
they can be used to switch low current devices and hence replace controllers for simple applications.
• The two types indicate which way the current and voltage are switched to the output. The methods also refer to transistor types because of the similar behavior (Note: in fact they do use transistors inside).
• The two main differentiation is,
Sinking (NPN): In this case, when actuated, the sensor will connect to ground, or pull the input low. If this is the case you need to use an output that normally stays high, true, floats high, etc. The figure below shows an approximate representation.
Sourcing (PNP): In this case, when actuated, the sensor will connect to V+, or pull the input high. If this is the case you need to use an output that normally stays low, false, floats low, etc. The figure below shows an approximate representation.
• To directly connect devices to these sensors we can use the arrangement below.
• It is worth stating the obvious: The output of sensors will be the inputs for other devices, such as PLCs: this will lead to confusion when specifying PLC input devices. Some manufacturers indicate what the input type is, others specify what it is for. This basic result of this is that you must look at the electrical connections of the card, and not just the designation.
• Note, if using these sensors with PLCs, care is required to select the appropriate cards and connections. The figure below is for NPN sensors.
• The figure below is for PNP sensors. These are generally more common combinations.
• It is quite common for manufacturers to offer PLC output cards that will handle PNP and NPN sensors. In this case the card will require both V+ and a common connection, and the each output must be set for either NPN or PNP.
• Two wire sensors are also common because they reduce the wiring.
10.1.4 Solid State Relays
• These are fully solid state and are well suited to AC loads.
10.2 Contact Detection
• At times we want to know when a physical object is present. This may involve touch.
10.2.1 Contact Switches
• Normally open/normally closed
10.2.2 Reed Switches
• These switches are like relays, but using a moving permanent magnet.
10.3 Proximity Detection
• At times we want to know when a physical object is present. This may be a non-contact detection.
10.3.1 Optical (Photoelectric) Sensors
• Optical sensors can detect part presence using a light source and detector.
• Emitters generate light in visible and infrared light bands. These are usually LEDs or laser diodes.
• Detectors are designed to vary electrically as light intensity varies. The most common used is the phototransistor.
• Ambient light can interfere with a simple optical beam. As a result most sensors now use a modulated pulse with a frequency up to the low KHz range. This allows better detection at longer distances with lower power.
• The relative locations of the source and detectors, as well as surface conditions have a major impact on the selection of sensor types. These include,
distance to target
target characteristics (transparent, reflective, diffuse, etc.)
• The simplest form uses a detector only with ambient or radiated light.
ambient light requires care in scene lighting
radiated light requires some sort of photometric phenomenon such as a hot part will radiate infrared light.
• Optic sensors can often be separated for space and other constraints.
fiberoptics allow the lens to be separated from the LED or phototransistor.
the phototransistors and LEDs can be separated from the other circuitry to fit the sensors into smaller parts.
• When the emitter and detector are separated and the beam is interrupted this is known as opposed mode.
• When the emitter and detector are in a single unit this is known as retroreflective.
• Polarized light can be generated using filters.
• Diffuse sensors are like the retroreflective type, except that the returning light does not need to be polarized.
• Alignment of the emitter is necessary, and can be a problem if the sensors are separated by a large distance and the beam intensity decreases.
• The beam of emitted light should generally be less than the width of the detected part.
• Separated sensors can detect reflective parts using specular reflection. This needs a reflective surface.
• By focusing emitters and detectors optics we can sense presence at a specific distance. This is known as convergent beams sensing.
• Fixed field sensors use a physical setting.
• Opposed beams can also be for a large range light curtains.
• Typical reflectivity values are given below [Banner Handbook of Photoelectric Sensing]
• Many sensors have sensitivity adjustments that will need to be adjusted to the materials.
10.3.2 Capacitive Sensors
• Uses changes in capacitance to detect part presence. Recall the basic equation.
• Works well with most materials, very good for plastics.
• If the part is conductive it acts as added surface area for the capacitive plates and increases capacitance. If the part is nonconductive it acts like a dielectric and increases the capacitance. In total the changes are normally in the order of pF.
• In the sensors the electrodes are normally round rings.
• Different materials have various dielectric properties. The list below is a sample from [Turck Proximity Sensors Guide].
10.3.3 Inductive Sensors
• These sensors work for all metals (conducting materials).
• These use an oscillating magnetic field.
• The coils can be shielded to make them more selective to the front of the coils. Unshielded coils have larger fields and sensitivity to the sides.
• Clearly ferrous targets will work well, but other metals can be used also.
• The reflection of sound waves can be used to detect parts or distances.
• These normally use frequencies above 20KHz which is above the normal human hearing threshold of 16KHz.
• These sensors are commonly,
electrostatic: uses capacitive effects. It has longer ranges and wider bandwidth, but is more sensitive.
piezoelectric: based on charge displacement during strain in crystal lattices. These are rugged and inexpensive.
• Good for sensing distances to most materials with surfaces perpendicular to the beam.
• Applications of these are similar to optical sensors.
10.3.5 Hall Effect
• These sensors use a magnetic field in a semiconductor to change current flow.
• As a result these sensors are designed to switch in the presence of a magnetic field.
• these are typically used for no contact limit/home detectors in machines.
10.3.6 Fluid Flow
• A specific fluid flow rate can be detected using a float in a tapered channel.
10.3.7 Other Types
• Other sensors types include,
Problem 10.1 Given a clear plastic bottle, list 3 different types of sensors that could be used to detect it.
Problem 10.2 Why is a sinking output on a sensor not like a normal switch?
Answer 10.2 the sinking output will pass only DC in a single direction, whereas a switch can pass AC and DC.
Problem 10.3 Select a sensor to pick up a transparent plastic bottle from a manufacturer. Copy or print the specifications, and then draw a wiring diagram that shows how it will be wired to an appropriate PLC input card.
Problem 10.4 a) Sketch the connections needed for the PLC inputs and outputs below. The outputs include a 24Vdc light and a 120Vac light. The inputs are from 2 NO push buttons, and also from an optical sensor that has both PNP and NPN outputs.
b) State why you used either the NPN or PNP output on the sensor.
Problem 10.5 List 3 significant trade-offs between inductive, capacitive and photooptic sensors.