Innovative approaches
Sensors represent a building element in a controlled system. If we want a technological process, or to control any automated activity, it is necessary to obtain information from the controlled environment. Of course, it is also possible to control the system intuitively and we do not need to obtain information using sensors. For example it starts to dawn at six o’clock in the morning, so we don’t need to measure the light with a sensor and we still know that the visibility will be sufficient. However, such information options are few and therefore to optimize the control of the technological process we need to obtain information from the surrounding (controlled) environment using sensors.
The most basic controlled system is shown in fig. 1a.

When achieving an increasingly higher degree of electronicization and after the introduction of microprocessors into practice, control systems began to be equipped with microprocessors. At first they contained only one microprocessor, but due to the constant decrease in the price of microprocessors, their numbers gradually increased (Fig. 1b). These possibilities also positively influenced the quality of the management of the control system. Microprocessors could specialize in a narrow control circuit, which increased the speed of the control as well as its control capabilities.
In practice, the situation then arose that one microprocessor was dedicated to information processing, e.g. from one sensor. After that, it was only a matter of time when the microprocessor moved to the sensor (see Fig. 1c).
Here it is necessary to realize that, unlike the control system, the sensor is located in the working environment. This means that the sensor is affected by the temperature of the working environment, pressure, or other adverse effects. In addition, space is often an issue in the work environment. Therefore, the sensor must have small dimensions compared to the control system, but mechanically it must be durable (robust), it must withstand higher temperatures, various pressures, etc. This means that the use of a microprocessor in the sensor must in no way weaken its resistance. It is even desirable, as we will show later, that he further strengthens these properties.
Nowadays, such durable microprocessors are already common on the market, and nothing stands in the way of using a microprocessor in a sensor. Even though we have already established that the microprocessor can be placed in the sensor, we must have a sufficient reason to do so. Because simply moving the microprocessor from the control system to the sensor is not a sufficient reason to use it in the sensor. Therefore, it is important that the microprocessor in the sensor fulfills a task that it can no longer fulfill in the control system. This is then the real reason for using a microprocessor in the sensor. We will gradually come to the fact that there are reasons for the use of several microprocessors in one sensor.
We finally get to the heart of this post. Next, we will show the possibilities of using microprocessors in sensors and their impact on increasing the quality of sensors, increasing their reliability and safety, and expanding their capabilities. Last but not least, the use of microprocessors in sensors also has an impact on reducing the price of sensor applications.
Two-value sensors (outputs are in the closed or open state) have two basic versions with respect to the output. NPN design (Fig. 2a) and PNP design (Fig. 2b).
Each of these outputs can be on or off. This means that if there is a sensing object in front of the sensor in the switching distance (e.g. there is a metal shutter in front of the inductive sensor), the output transistor T is switched on at the switching sensor (an electric current passes through the output). With the expansion sensor, the situation is then the opposite, i.e. the output transistor T is open.
If we want to expand the sensor’s output options, we can make a sensor with two outputs, both with a switch and a switch. An example in NPN design is shown in fig. 2c.
In fig. 2a to 2c, the sensor outputs are shown only schematically (illustratively). It is necessary to realize that the outputs connected in this way would not meet the requirements placed on modern sensors. These sensors must be resistant to both polarity reversal and short circuit. However, this is common for sensors today.
In fig. 3 we show the complementary output of the sensor, where it is already a problem to achieve the resistance required for sensors. In this case, however, the use of a microprocessor is justified and its function is to protect the sensor outputs.
In fig. 3 is the output formed by two transistors T1 and T2, which are connected complementary. One transistor is always on and the other is off. In fig. 3 the relays K1 and K2 are drawn. From a practical point of view, it is unnecessary to connect both relays at the same time, and it is advisable to connect either relay K1 or K2. However, connecting both relays does not lead to a malfunction. In this picture, the output is connected as PNP switching, or at the same time NPN opening. However, it is not a problem to make a sensor so that the outputs have the opposite function, i.e. so that the output is PNP open and NPN close at the same time.
A very interesting solution is presented in fig. 4. In this picture, we have a sensor with all combinations of outputs. Output PNP switching, NPN switching, PNP switching and NPN switching. Such a combination of outputs is difficult to implement without the use of a microprocessor. Above all, it would be a problem to achieve all the necessary protections at relatively low costs.
Initially, it is necessary to expect a slight increase in the price. In machine manufacturing, where there is a clear requirement for the type of sensor output, it will probably be unnecessary to use such sensors, but for service needs, these sensors will have a significant logistical, as well as financial benefit. As we will show below, this type of sensor output also has a great impact on the security of sensor applications.
When using a microprocessor in a sensor, it would be appropriate to mention here the possibilities of sensors in the application of bus systems. However, this issue would require significantly more space and therefore we will address it in the future.
The microprocessor in the sensor can also increase its intelligence (the properties of the sensor are set during operation as needed with or without operator intervention). When handing over such responsibility to the sensor, it is necessary to ensure that the sensor does not start to behave uncontrollably and therefore it is allowed to change only some properties exactly as defined.
We will show this feature of the sensor on a specific case. Let’s take e.g. inductive position sensor, which will control the revolutions (or movement) of the conveyor in fig. 5.
The drive wheel on the conveyor is driven by e.g. electric motor, sets the conveyor belt in motion and it transmits the movement to the driven wheel. The sensor at the driven wheel checks whether the conveyor is in motion. In case of mechanical damage to the conveyor (the conveyor stops) or electric motor failure, or If the conveyor belt breaks, the sensor detects that the movement has ended and informs the control system about it. This property, as it was described, also has a sensor without the use of a microprocessor.
If there are conveyors with different speeds in operation, it is necessary to use different set sensors from the manufacturer for each conveyor. It is often not possible to determine the speed of the conveyor in advance, and therefore specifying the sensor can be problematic. However, when using a sensor with a microprocessor, the sensor learns when it is connected what are the correct revolutions that it should check and then checks them. The same sensor can therefore work reliably on different transport systems.
Of course (the taste grows with the food), the given sensor can also distinguish possible conveyor wear and warn the operator about it. This can largely prevent accidents and minimize operating costs. A sensor with a microprocessor can detect not only the deceleration of the conveyor, but also its acceleration, thereby increasing its safety.
Now let’s move on to the optical level sensors. First, let’s explain how the optical level sensor works. A bundle of light rays is refracted on an optical prism according to fig. 6a. This prism is placed in a container in which there is no liquid, there is air. The beam emitted from the transmitter returns to the receiver without loss.
In fig. 6b shows a container filled with water and the optical prism is completely immersed in water. Since the water has the same optical index of refraction as the optical prism, which is made of glass, the beam of rays is not reflected back to the receiver, but passes through the vessel, where it is attenuated. This case is very easy to evaluate, because the beam beam is at full intensity or zero intensity at the receiver. The sensor is either on or off.
In practice, however, the situation is not so clear. For example when, in addition to the liquid, there are also objects in the container that behave as mirror surfaces (Fig. 7a). Especially in the beverage industry, technology parts made of high-quality stainless steel, which represents a high-quality mirror, are used. This is when the optical prism is completely immersed in the liquid and no light radiation should reach the receiver; due to the reflection from the mirror surface, only part of the radiation returns, and it may happen that the sensor evaluates the situation as if it were not immersed in a liquid.
Let’s stay with the drinks. In fig. 7b there is beer in the container. Beer behaves similarly to water for sensor evaluation. The problem is with the foam. However, beer does not exist without foam, and therefore it is necessary to solve this problem. If the optical prism is not submerged, all the light radiation emitted from the transmitter is returned to the receiver. If the optical prism is immersed in beer, then no light radiation from the transmitter reaches the receiver. However, if the optical prism is immersed in foam, then approx. 60% of the light radiation reaches the receiver.
As I mentioned in the previous case, it is precisely in the beverage industry that mirror surfaces are used, and in combination with beer foam, an unsolvable situation arises. But not for a sensor with a microprocessor.
Beer is not the only type of drink that causes a problem. Milk is a slightly bigger problem when evaluating drinks. If we put beer in the group of liquids that create foam, let’s put milk in the group of fatty liquids.
In fig. 8a shows the behavior of an oily liquid on an optical prism. When the optical prism emerges, the sensor behaves as in water. All the light radiation emitted by the transmitter reaches the receiver. When an optical prism is immersed in a liquid, what was the case with water does not apply, because the oily liquid does not completely wet the surface of the optical prism and part of the light radiation is returned to the receiver.
So far we have not paid attention to the viscosity of the liquid. Another problem arises with liquids with a higher viscosity. When the liquid level drops below the level of the optical prism, we require the sensor to report this condition to us immediately. In fig. 8b, however, shows what is happening. The liquid in the form of a drop remains on the prism and the sensor can incorrectly evaluate this situation and report that the optical prism is still immersed in the liquid.
After these examples, it is clear that the microprocessor in the optical sensor is not bored at all. Some time ago we even solved the problem of the oil cleaning device. There was water in the oil, which can be removed by heating the oil to the boiling point of water. However, the escaping steam created a foam from the oil and began to dew the space above the oil and thus also the optical prism. And that was already an experience for a microprocessor, oily liquid, foam and dew. And yet he managed it!
When assessing the reliability and safety of the control, we will proceed from the following considerations.
1) Reliability and security are closely related, but they are not the same thing. For example we will light the unlit corridor with one light bulb. We will get a certain state of reliability and security. After replacing the light bulb with LED type lighting, the reliability will increase, but the safety of the lighting will not increase.
2) By the term management safety, we do not mean only safety and health protection, or service life, but also trouble-free operation of the device, i.e. operation without failure with subsequent damage to property, but also damage caused by interruption of the operation of the equipment.
3) In order to increase the safety of driving, it is necessary to comply with the regulations, but healthy thinking is equally important when designing the driving. If there is a safety failure, it is good to be able to demonstrate compliance with the regulations, but to increase the safety of the control itself, it is first and foremost necessary to correctly design the system control. Machine control safety, or of the technological process is given by each member that occurs in the management process.
However, the weakest elements (elements with the lowest level of security) affect security the most. But it is to the detriment of things that the influence of these weakest elements is negative and worsens the overall level of security. It could be said that the simplest systems (often ingenious) are also the safest. For more complex systems, we have to resort to more complex security measures. However, these are also more expensive, which is why we address not only the safety of management, but also the balance between implementation costs and the risk of a dangerous malfunction.
Now let’s focus on the sensors. Just as nothing is black or white, sensors are not classic and safety either. Sensors can be used at different security levels. However, the biggest impact on safety is the correct use of a suitable sensor.
We already know the difference between NPN and PNP output types. The safety solution for individual types of outputs is similar, and therefore we will describe the consideration of safety only in the version of the NPN output.
Let’s assume that the sensor is not a safety device. So we will not deal with sensor faults, but focus our attention only on the faults caused by the leads to the sensor.
What happens if there is an interruption of the output supply to the control system as in fig. 9a? Control system, or the relay connected to the sensor output remains open. However, this state corresponds to an open sensor output, and we will not know if the output is open or if it is a fault. However, this state is permanent and gives us wrong information. A dangerous malfunction will then occur.
The same problem occurs in case of interruption of the minus pole of the power supply, see Fig. 9b. Therefore, we will solve these two disorders together. They also have a common solution, which is shown in fig. 2c.
In fig. 2c sensor has two outputs. One switching and the other opening. It is important that the outputs do not have the same level even for a short time. This means that one relay should be switched on and one relay should be switched off, or vice versa.
If the negative pole of the power supply is interrupted, both outputs will be disconnected and the system will evaluate it as a fault. If both outputs are interrupted, then the status is identical, both outputs will be open and the system will again evaluate it as a fault. If the mechanism (which we monitor with a sensor) is in motion, output R is switched on and output Ṝ is switched off, two different states can occur. Output R is interrupted and the system immediately evaluates this condition as a fault. In the second case, if output Ṝ is interrupted, the system waits until the mechanism reaches the end position, output R is disconnected and the system immediately evaluates it as a malfunction.
So far we have deliberately not dealt with disconnecting the positive pole. Such a case of failure is shown in fig. 9c.
Even after the power supply is interrupted, the current continues to flow along the path indicated in fig. 9c with a red line. The sensor is powered. In the event that the output is open, the sensor’s power supply is unrestricted. If the output turns on, the voltage on the transistor drops and is not enough to power the sensor. However, this is a temporary condition as the sensor will open again.
In practice, two situations can occur. The output of the sensor starts to oscillate, or settles at a voltage that is sufficient to power the sensor, but does not interfere with the power input to the system. Both conditions are undefined and very dangerous because they are difficult to detect. The sensor, even if unstable, can work for a long time and the fault can be very difficult to locate.
The behavior of the sensor under this type of fault can be affected by the design of the sensor. Each sensor manufacturer may have a different design, but basically in all cases this type of failure is very annoying and needs to be addressed.
The inconvenience of interruption of the positive supply voltage is characteristic of the outputs of NPN type sensors. For PNP sensor outputs, it is annoying when the negative supply voltage is interrupted.
Solving such a malfunction is possible using the output according to fig. 3. If both relays are connected, the fault signaling will be sufficient. In fig. 4 is a more perfect version of protection.
We haven’t dealt with safety sensors yet. This area is quite extensive and we will deal with security sensors next time. We have now described only the possibility of increasing security by using a suitable output. But we promised to show the reason for using multiple microprocessors in the sensor. The reason for this is precisely the safety sensors. The information in the safety sensor is processed in two lines and each is controlled by a microprocessor. These two lines check each other and evaluate any malfunctions. There can even be a third microprocessor that checks the trouble-free operation of the two working microprocessors
I originally wanted to call my post “Using Microprocessors in Sensors”. However, I was worried that it might make it feel like we were talking about microprocessor technology. Although the word microprocessor was used very often, my attempt was only to indicate the possibilities of using microprocessors in sensors. However, the microprocessor in the sensor is invisible to the user and does not require any knowledge of microprocessor technology. And that is the main goal when introducing microprocessors – “to be unnoticed, but mainly useful”.
Author: Ing. Štefan Ploskoň
[1] STN EN ISO 13849 Bezpečnosť strojov. Bezpečnostné časti riadiacich systémov
[2] STN EN 60947-5-2 Spínacie a riadiace zariadenia nízkeho napätia. Časť 5-2: Prístroje riadiacich obvodov a spínacie prvky. Bezdotykové spínače
[3] STN EN 60947-5-3 Spínacie a riadiace zariadenia nízkeho napätia. Časť 5-2: Prístroje riadiacich obvodov a spínacie prvky. Požiadavky na bezdotykové prístroje s definovaným správaním v podmienkach poruchy
[4] Ploskoň Štefan: Zvýšenie bezpečnosti v automatizácii – prechod od štandardných snímačov ku bezpečnostným snímačom. Konferencia – III. Stretnutie elektrotechnikov južného Slovenska; Dunajská Streda 28.11.2012.
[5] Ploskoň Štefan: Vplyv typu výstupu snímača na spoľahlivosť a bezpečnosť riadenia strojov. Elektrotec 2013 – IX. regionálne stretnutie elektrotechnikov východoslovenského regiónu; Košice 12.02.2013.
An established company
A tradition since 1990
Wide variability
More than 1000 versions of sensors
Technical support
Expert team ready to advise
Custom sensors
Flexible production