Input devices are required components in control systems especially when it comes to automation, as PLC applications require that you know the basics of automation itself before you can even start programming your PLC.
Automation, according to Wikipedia, is a technology by which a set of procedures is performed without any human intervention. It covers a tremendous amount of applications—which already have made our lives easier in the first place.
It is present on cars, air conditioning units, heating units, security systems, manufacturing, quality check, and so on.
- 1 How does Automation happen?
- 2 Common PLC Input Devices
- 3 Sensors
- 4 Examples of Sensors
- 4.1 Proximity Sensor
- 4.2 Inductive Proximity Sensor
- 4.3 Capacitive Proximity Sensor
- 4.4 Reed Switch
- 4.5 Photoelectric Sensors
- 4.6 Ultrasonic Sensors
- 4.7 Displacement/Position Sensors
- 4.8 Linear and Rotary Potentiometers
- 4.9 Linear Variable Differential Transformer
- 4.10 Capacitive Displacement Sensors
- 5 How basic PLC input devices are connected
- 6 Conclusion
How does Automation happen?
First, let’s talk about the type of system that is the ONLY type applicable to Automation—Closed Loop Systems. I discussed both types of systems at the beginning of the PLC Basics series, make sure to check it out if you haven’t already!
A closed-loop system is a type of control system where the input is varied depending on the feedback from the output.
As an analogy, I’ll use an example from your very own home.
Let’s say you wanted to turn on the lights whenever someone walks in front of your house (That sounded creepy). What would you do? You’d check outside whether there were people present, and then turn the lights on or off accordingly.
“How did that become a closed loop system?”
Let us take a deeper look at what really happened. If there was a person standing in front of your house and you saw it (input), you will turn on the switch (process).
Turning the switch on made the light bulbs outside light up (output).
If the person ran away because you scared him off for some reason, you will see that there are no more people in front of your house (feedback). Because of this, you now turn off the lights.
“How can this be applied to an automated system?”
Automated systems use sensors—devices that output electrical signals based on environmental conditions. They are usually placed as a feedback mechanism—which they are!
In the previous example, what was the feedback mechanism? The fact that there were no more people in front of your house.
In that case, you may want to use a sensor that can detect the presence of people or objects. For this PLC application, ultrasonic sensors are most widely used.
By connecting the sensor and the lamp to the PLC, you now have an automated system that performs the same task!
Common PLC Input Devices
In most PLC applications, there are a number of components that you will usually see.
To name a few, there are push buttons, selector switch, and limit switches.
Push buttons are the ones that you will usually see as START or STOP buttons in a PLC control system. It operates by either MAKING contact (Make) or by BREAKING contact (Break). Hence, pushbuttons are divided into two categories: Normally open or Normally closed.
Normally open (NO)
Normally open push buttons, when connected to the circuit, normally make an OPEN circuit.
In this scenario, the current can NOT flow through the switch, as there is no electrical continuity.
Pushing the button will make its metal contacts touch with each other, closing the connection between the two connected terminals and hence allowing the current to pass.
Normally closed (NC)
Normally closed push buttons, when connected to the circuit, SHORTS the connected terminals. In this scenario, current can already flow through the switch.
This means that if you connect a normally closed push button to a circuit, the circuit will turn on immediately because there is electrical continuity already.
This means pushing the button will make its metal contacts touch with each other, closing the connection between the two connected terminals.
Break before make
These types of switches have BOTH the normally open and the normally closed in one construction.
One side of the switch is normally closed and one side is normally open, so when a button is pressed, one contact will be in the OFF position and one will be ON.
Simply put, the other one BREAKS contact while the other one MAKES, hence the name.
Selector switches are still manually operated switches, however instead of being normally open or closed, there are more than two contacts to select from.
The usual example is found in electric fans, where you can select a number that then dictates the speed of the fan’s motor.
This process actually selects a varying load for the motor in order to control its speed.
Limit switches, as the name implies, change state when a predetermined limit is reached. These are actually useful in automation because you can set a limit (using the limit switch) where a specific process stops.
There are also different types of limit switches which allow us to choose the physical quantity to limit in our control system design.
Temperature Limit Switch
Also called Thermostat, the temperature limit switch is used to detect temperature changes in your system.
They can also be Normally Open and Normally Closed, depending on what type is used.
This dictates the actual Industrial application that it can be used in—whether it be an overheating prevention, or even just maintaining a certain temperature of materials.
Pressure Limit Switch
Pressure switches are most commonly used in containers where the pressure of liquids or gases is crucial.
They change their state whenever a liquid or gas in a tank reaches a high enough pressure. Again, they can either be Normally Open or Normally Closed switches.
When the pressure inside a tank increases to a high amount, the difference between the atmospheric pressure and the pressure inside will make the fluid (liquid or gas) inside “try to escape”. Using pressure limit switches allow us to prevent that scenario.
Level Limit Switch
Level switches—more commonly called Level Sensors, are used to control the height of a liquid inside a container, usually a tank.
They are most commonly used in conjunction with inlet and outlet valves in a liquid level control system, or in a heating and mixing application.
Sensors are devices that either measures a physical quantity or detects it.
In PLC automation, a sensor must be a transducer who can convert a physical quantity into an electrical quantity.
It is important to know that there is no “one-fits-all” sensor that exists in this world. As engineers, we have to solve PLC automation problems using the correct sets of devices—and it starts with how you can monitor the physical conditions in your system.
It is also important to know what factors to consider when choosing your sensors.
Factors in choosing sensors
Accuracy may be defined as the “closeness” to the actual value of the measurand. As the designer, it is not always practical to choose a high accuracy sensor.
Most sensors in the market already have reasonable accuracy where they can almost represent the actual values that you are measuring.
That said, some PLC automation applications do not require a very high level of accuracy in order to work properly. As an example, if you only had one product weighing 5kg, it does not make sense to put a weight sensor or strain gauge that can measure up to 0.0001g of accuracy. Makes sense?
This is the operating range of your sensor. How far depends on the application that you are designing for.
For example, if you have to take a temperature reading from a heating oven, then it is necessary for you to use thermocouples instead of LM35 sensors, just because thermocouples can measure extremely high temperatures.
The response time is the amount of time needed by the sensor to represent the actual value being measured.
Again, this is critical for some PLC automation applications, and for some, it may not be that important.
In the simplest form, sensitivity determines the minimum amount of “stimulus” that a sensor requires to produce a reading.
If you wanted to read a temperature reading of 0.01 degrees at around room temperature, then (going back to the previous example) the thermocouple may not suffice in this scenario and the LM35 does.
This is the sensor’s ability to produce the same output when given a constant level of input for a very long time. For example, if you wanted to measure, using PLC automation, the temperature of a room for 365 days a year, then you want a sensor that is high in this regard.
Drift and Zero drift are the factors that you want to look at when considering stability. Drift is the deviation in output over time, and zero drift is the change in output when there is zero input.
The ability of the sensor to produce the same value of the output for the same value of the input is its repeatability.
Measurands can vary from time to time during PLC automation, but your sensor must be able to adapt to these changes and at the same time give similar results for each repeated value.
Simply put, your sensor must give output A for every reading A, and output B for every reading B.
The reliability of your sensor determines the probability that the sensor will provide accurate, repeatable readings (basically, optimal performance) in a predetermined working condition for a specified period.
If you look at sensor datasheets, you will see that they give rated operating conditions where the sensor operates linearly. These are the conditions where the sensor is reliable.
Two types of sensors: Analog and Discrete
Analog sensors are devices that output a continuous voltage linear to the experienced change in the environment.
They are most extensively used in Temperature Sensing, Distance Sensing, Luminance Sensing, Pressure Sensing, and basically in PLC applications where an exact, certain unit of measure is involved.
In PLC automation, the typically used analog inputs vary from 0-20mA, 4-20mA, or 0-10V. Hence, the sensing may also become current sensing or voltage sensing.
However, even though the sensor is Analog, the PLC is still a Digital Device. This is why an A/D converter is used.
To briefly discuss, the analog values are sampled periodically by the PLC. This usually happens a hundred to a thousand times per second (Fact: Voice analog signals AT THE MINIMUM are sampled at 8000 samples per second in order to be the LEAST intelligible).
These samples are then converted into bit representations (how many bits is dependent on the design of the PLC). This is called quantization. To easily visualize it, check the table below: it shows a bit equivalent for the -3.5V to +3.5V range.
Because the PLC has a CPU, it will then perform digital signal processing in order to process the data and convert it to an equivalent result in the output module.
Discrete sensors, on the other hand, outputs a HIGH or a LOW voltage only. This is derived from the Binary number system where the only possible digits are 0 and 1—which can represent LOW and HIGH, respectively.
HIGH signals, even though they are represented as 1 even in some PLCs, are not represented by 1 Volt. PLCs usually run on 24 Volts DC.
What this means is that PLCs will read HIGH at the input side only when the voltage is at 24 Volts DC.
These discrete sensors have internal switching circuits that classify them as either a sinking (NPN) or a sourcing device (PNP). Basically, PNP provides +24 V as input, and NPN provides -24V as input. Hence, the input modules must also be classified as sourcing or sinking.
Examples of Sensors
Proximity Sensors, in PLC automation, are usually used in detecting the presence or absence of objects made of varying materials. They do so WITHOUT making contact. Sometimes they are called “proximity switches” because the output is binary, HIGH or LOW—just like a switch.
Inductive Proximity Sensor
The inductive proximity sensor consists of a ferrous metallic core wound with a conductor.
When the end of the metallic core is placed near another ferrous metal object, the effective inductance of the coil changes. This change is monitored by another circuit in the sensor which then activates the switching component.
In PLC automation, the inductive proximity sensor is most commonly seen in metal fabrication processes.
Capacitive Proximity Sensor
The capacitive proximity sensor has the ability to detect both metallic and nonmetallic objects. Essentially, two plates of the capacitor are separated by some distance. The distance between the two plates dictates its capacitance, or its ability to store energy for a specific voltage drop.
To exploit this characteristic, the capacitive proximity sensor has only one of the plates, and the other plate parallel to it would be the object being sensed.
Because objects have different dielectric constants, the object is detected by a CHANGE in capacitance.
Take note that a lot of objects have dielectric properties, which makes them eligible for detection in PLC automation using the capacitive proximity sensor.
The reed switch consists of two ferromagnetic material sealed in glass or plastic. The two materials do not initially touch each other, but when a magnetic field from either a permanent magnet or an induced one (from a current-carrying coil) is placed near the reed switch, the switch closes and makes electrical continuity.
For PLC automation, this can be perfectly used for notification/alarm systems where doors are involved: for example, when a room only allows authorized personnel to enter, opening the door will light up a bulb in the security guard office to indicate that there is someone opening that door.
Photoelectric sensors use a light emitting diode as an emitter, and usually phototransistors or photodiodes at the receiver side. Basically, when the light (usually infrared) from the emitter’s LED hits the receiver, the sensor changes state from LOW to HIGH.
These sensors may be used in creative ways in PLC automation because photoelectric sensors have different modes of operation.
Modes of Operation of Photoelectric Sensors
The photoelectric sensor operates as a through beam type when the emitter and the detector is placed such that the light is fully incident to the detector. “The detector sees the emitter in front of it”.
In PLC automation systems, only an object that can block the path of light between the emitter and the detector may be detected by the photoelectric sensor. Usually, these objects are placed in consecutively and are moved by a conveyor so that the total number of items may be counted.
The photoelectric sensor operates as a reflective type when it requires that the object reflects the emitted light onto the detector.
In PLC automation systems, the reflective type is most commonly used in detecting the liquid level of containers and tell whether they contain the desired level.
Ultrasonic Sensors uses sound waves and their reflection in order to detect the presence of an object. Obviously, objects that absorb sound are incapable of being detected by ultrasonic sensors.
You may think that this sensor may annoy the people around it because of the emitted sound. That would not be possible, and I’ll explain why.
The term “Ultrasonic” means that the frequency being used is higher than what humans are capable of hearing.
Basically, ultrasonic sensors have high enough frequency to even be deciphered by humans.
Audible sound frequencies only range from 20Hz to 20 kHz, and this range can only be reduced naturally due to aging.
This is why some really old people may not be able to hear sinusoidal tones at 18 kHz but a younger one can.
A displacement sensor measures the distance between a specified reference point and the location of the target object. Usually, these are used in fabrication to attain higher precision levels. Hence, these sensors are undoubtedly analog, because they give off a range of values.
Linear and Rotary Potentiometers
These use the principle of Ohm’s Law to provide information about the displacement of the target. In PLC control systems, when objects move from one point to another in a straight line, Linear potentiometers are used.
Linear potentiometers have three terminals: one connected to the source, one to ground, and one connected to the input of the PLC—let’s call it Output Pin.
Depending on the contact point of the Output Pin to the potentiometer, the effective resistance changes.
When the contact point reaches the topmost level, the output voltage becomes the same as the source voltage. When the contact point is at the middle, the output voltage becomes half of that of the source.
Depending on how precise the PLC can read the voltage, every little change in resistance—which is represented by a percentage of the voltage source, may also represent a change in distance.
The same concept applies to a rotary potentiometer, except it measures angular distance. This means that the movement is circular as opposed to straight.
In PLC automation, the potentiometers are used when a DC voltage is used to represent the change in distance.
Linear Variable Differential Transformer
These types of transformers are controlled by the displacement of a ferrous core between the 2 secondary and primary windings of a transformer.
When the core is centered, the voltages of the two secondary windings become equal.
Intuitively, when the core moves up or down the windings, the difference between the voltages of the two secondary windings can become more positive or more negative. Similar to the potentiometer, these changes in output voltages can represent a change in distance.
In PLC automation, the linear variable differential transformer is used when a constant AC voltage is used to represent the change in distance.
Capacitive Displacement Sensors
Capacitive displacement sensors share similar principles to the capacitive proximity sensor.
Essentially, when the parallel plates of the capacitor are placed completely aligned with each other, the effective Area of the capacitor is at its maximum.
Now, when you move one side without changing the distance between the plates, e.g. move the other plate downward or upward, the effective area of the capacitor changes.
This changes the capacitance of the sensor and hence can change the maximum voltage that can be stored in the capacitor.
The capacitive displacement sensor, though, should have its output signal reconditioned first before it becomes usable for PLC automation.
How basic PLC input devices are connected
These PLC input devices are not just connected directly to the PLC for specific reasons.
Logically speaking, it is not assured that someone will always connect a properly rated device for the PLC input.
Also, a different polarity of DC input may be connected to the I/O module of the PLC.
For these specific reasons, the PLC is kept safe by a principle called Optoisolation.
Remember the concept of photoelectric switches? PLCs have miniature versions of these photoelectric switches in order to protect the system.
Optoisolation works by having an LED (emitter) and a phototransistor (detector) placed directly to each other.
When a proper polarity of DC voltage is applied to input terminal 1, for example, the LED turns on.
The phototransistor creates a connection between the source and the PLC at THAT SPECIFIC INPUT TERMINAL.
The PLC reads this as “Input from terminal 1 switched on, let’s make changes to the output based on the program”
Using Optoisolation, the PLC input side can only supply voltage to the PLC if it is in the right polarity. If the input voltage or power is too high, only the input side of the optoisolator is damaged.
This is what makes the PLC much more robust than other microcontrollers such as Arduino.
In PLC Automation, the knowledge of input devices is a highly important prerequisite. If you have read up to this point, you now have a basic idea of the different input devices that are used in PLC control systems, along with a couple of examples. Certainly, these are not the only devices out there that we can use, as there are a LOT MORE. I believe that once you know these things, you can expand the number of designs that you can create using PLC automation systems.