The inductive proximity sensor is commonly used to detect the presence or absence of metal in industrial control systems. As implied by the name, the sensor applies an AC signal to an inductor located in the head of the device. The presence of metal near the sensor will change the magnetic properties of the inductor. Circuitry within the sensor detects the change and triggers the output. Representative proximity sensors are shown in Figure 1. The inductor is located inside the forward-facing black head while the oscillator and sensing circuitry are inside the sensor body.
This engineering brief introduces features of the OMRON E2B-M12LN08-M1-B1 and E2B-M30LN30-M1-B1. With these sensors we can explore circuit construction and then observe the sensor’s response to different types of metals.
Figure 1 A pair of Omron EB2 proximity sensors are mounted on a 3D printed base. Note that this demonstration setup violates the minimum distance between sensors as specified in the datasheet. However, no observable problems were observed.
Tech Tip: Sensors such as the OMRON E2B are available with several different connections with straight and right angled M12 connectors or flying leads of various lengths. The devices pictured in Figure 1 have a 4-pin M12 connector. Don’t forget to purchase the appropriate cable. In this example the datasheet recommended XS2F-M12PVC4S2M was purchased.
Description of the proximity sensors
The E2B-M12LN08-M1-B1 and E2B-M30LN30-M1-B1 are members of the OMRON E2B family. The datasheet describes the parts as:
- EB2: OMRON family designation
- M: Cylindrical, metric threaded, brass
- 12 or 30: indicate the size of the body in mm
- L: Long body
*N: unshielded - 08 or 30: indicate the sensing distance in mm
- M1: features a M12 connector
- B: PNP
- 1: NO (Normally open)
There are many members in this OMRON family each with a unique physical configuration. At the time of this writing DigiKey offers 372 E2B family members. Actually, the proximity sensor is a popular device as there are over 14,500 line items in DigiKey’s Proximity Sensors – Industrial category.
Electrical connections
Figure 2 presents the complete system as used in this experiment with the components mounted on a Phase Dock 0710 base. The accompanying wire diagram is shown in Figure 3.
On the left of Figure 2, we see the two OMRON proximity sensors. On the right we see the DIN rail, terminal blocks, and Phoenix Contact relays which serve as loads for the sensors.
Figure 2: The EB2 OMRON proximity sensors are mounted on a Phase Dock 0710 base along with a pair of Phoenix Contact RIFLINE relays.
Figure 3: Line drawing showing the proximity sensor connections. A relay coil is used in place of the load.
Tech Tip: The OMRON sensors shown in Figure 3 features a PNP output transistor. The term sourcing is a synonym for PNP. We can see that the PNP transistor is sourcing current for the load (think conventional not electron flow). This PNP(sourcing) and NPN(sinking) terminology can be a source of confusion. Please see this article for additional information.
Electrical current limitation
The sensor’s PNP output transistor can supply a maximum current of 200 mA. This capacity is considerably larger than the relay coil’s 18 mA allowing excellent safety margin.
Always remember to guard against the relay’s flyback voltage. Recall that the inductive energy stored in a relay coil’s magnetic field will cause a voltage spike when the device is turned off. In this example, the Phoenix Contact is equipped with a plug-in module that serves the triple purpose of indicator light, reverse polarity protection, and flyback protection diode.
The OMRON EB2 sensors appear to have some built-in protection via the Zener diode as shown in Figure 3. While I don’t have the specific data, the OMRON sensors are likely built to withstand the flyback energy associated with 200 mA relay coil. However, I would not recommend pushing this design. Instead, use a relay with integral diode and think of the OMRON protection as the backup. As a side note, please consider this relationship with regards to troubleshooting. It is entirely possible for a failed sensor to be a symptom of a failed relay flyback diode. Please see this guide to troubleshooting and consider the failure analysis section. You will see that replacing the sensor without considering the cause of the failure could result in a future 3 AM service call.
Sensor operation
The operation of each sensor is shown in Figure 4. This composite image shows the point at which the sensor is just able to detect the presence of a hammer head. We know the sensor is activated as the sensor’s yellow highlighted LED is lit.
This image allows us to develop a rule of thumb suggesting that the sensing distance is approximately equal to the diameter of the sensor’s head. For example, the left image of Figure 4 shows the 30 mm diameter sensor. The distance to the hammer’s head is approximately 30 mm.
The datasheet graphic included as Figure 5 presents the typical sensor response. According to the chart, the hammer with its 40 mm head should be detected at a distance of approximately 26 mm.
Figure 4 Composite image showing each sensor responding to the hammer’s head. The yellow highlighted section shows the location of the sensor’s LED which turns on when the sensor is activated.
Figure 5: The E2B datasheet shows the typical sensing distance for each sensor with curves for materials such as iron, brass, and aluminum.
Response to different materials
As shown in Figure 5, the inductive proximity sensor does not respond equally to different metals. We see that the sensor is most responsive to iron with less than half the sensitivity to aluminum. This observation is supported by Figure 6. In this example, we have a long aluminum plate with a 50 mm width. We can see that the threshold is reduced from approximately 30 mm down to about 14 mm.
Figure 6: The proximity sensor is less sensitive to aluminum. In this image, the sensing distance for a 50 mm aluminum plate is approximately 14 mm.
Conclusion
The inductive proximity sensor is a commonly used part in industrial control systems. As shown in this article, the electrical connections are relatively straightforward as it is able to directly drive small relays. Perhaps the greatest challenge is navigating the part number to locate the specific device for your given application.
Be sure to challenge your understanding by answering the questions and critical thinking questions located at the end of this note.
Please give a thumbs up if you learned something from this article.
Best wishes,
APDahlen
Return to the Industrial Control and Automation Index.
About this author
Aaron Dahlen, LCDR USCG (Ret.), serves as an application engineer at DigiKey. He has a unique electronics and automation foundation built over a 27-year military career as a technician and engineer which was further enhanced by 12 years of teaching (partially interwoven with military experience). With an MSEE degree from Minnesota State University, Mankato, Dahlen has taught in an ABET-accredited EE program, served as the program coordinator for an EET program, and taught component-level repair to military electronics technicians. Dahlen has returned to his Northern Minnesota home and thoroughly enjoys researching and writing educational articles about electronics and automation.
Highlighted experience
Leveraging his military engineering experience, Dahlen provides unique insights into rugged and reliable electronics solutions suited for extreme environments. His articles often reflect the practical, hands-on knowledge gained from his time in the U.S. Coast Guard. At the time of this writing, he has created over 150 unique posts and provided an additional 500 forum posts.
A collection of Dahlen’s industrial control and automation articles can be found here.
Questions
The following questions will help reinforce the content of the article.
-
What materials may be detected by an inductive proximity sensor.
-
Describe the operating principle of an inductive proximity sensor. For full credit, relate your answer to the Figure 5 curves showing the sensitivity to various metals.
-
What is the difference between the PNP and NPN output configuration. For full credit include the terms sinking and sourcing into your answer. Hint: Use conventional current flow to help define the terms. See also xkcd: 567 Urgent Mission.
-
Identify the function and color for each of the E2B’s connecting wires.
-
What is the rule of thumb describing the ability of a proximity sensor to measure distance?
-
Use the OMRON datasheet and the DigiKey search tools to locate and then price:
A) an unshielded E2B NPN sensor with flying leads
B) a shielded E2B double distance sensor with a PNP output and a M12 connector
C) a 5 meter 4-wire right angled M12 cable with flying leads to match the previous sensor -
Using the data from Figure 5, estimate the threshold for the E2B-M30LN30 to detect the circular end of a 20 mm diameter brass rod.
-
According to the datasheet, what is the performance difference between a shielded and an unshielded E2B sensor?
-
The Figure 1 caption states that the parallel sensors are too close together. According to the datasheet, what is the minimum recommended distance for a pair of M30 sensors?
-
Sketch the PNP and NPN sensor in the style of ladder logic. Use panel lamps as the load. For full credit, include the wire colors.
-
What is inductive kick and how does it relate to a proximity sensor with a semiconductor output?
Critical thinking questions
These critical thinking questions expand the article’s content allowing you to develop a big picture understanding the material and its relationship to adjacent topics. They are often open ended, require research, and are best answered in essay form.
-
Suppose your application requires distance sensing that is beyond the range of a proximity sensor. Present at least three alternatives. For each option, include at least one positive attribute of the sensor and one delta.
-
How can a sensor/actuator terminal block such as the Weidmüller 1992240000 or 1992220000 simplify the design of your control panel?
-
Explain how terms such as PNP and sourcing are applicable to the inputs and outputs of a Programmable Logic Controller (PLC). For full credit explain the confusion that arises when shift focus from the PLC output to the sensors output.
-
What are the advantages and disadvantages of the M12 connectors compared to their flying lead counterparts. For full credit, be sure to comment on the physical layer of networks such as AS-I or MODBUS interface that uses a M12 hub.