When I was learning PLC programming, I remember scratching my head about some of the concepts surrounding proximity sensors. Digital, analog, Normally Open (NO or N.O.), or Normally Closed (NC or N.C.)? What exactly does it mean for a sensor to be NO or NC? What effect will it have when I’m checking the state of the sensor at the PLC or other controller?
NO and NC, and Other Proximity Sensor Basics
NO or NC refers to the way that a sensor is wired and in what state its output signal will be when the sensor is “made.” A sensor is “made” when an object is present that the sensor has been set up to detect. The characteristics of the sensor determine whether or not an object will detected. These characteristics can include its detection type (inductive, capacitive, ultrasonic, photoelectric, etc.), sensing range (how far away the part can be from the sensor), and other factors. The point of a proximity sensor, or “prox,” is to know that an object is there or not there. When a sensor detects an object, its output state changes.
Someone might refer to the types of proximity sensors described above as “digital proxes.” In this context, digital has a somewhat different denotation than the typical use of the word outside of industrial automation. If a sensor is “digital,” it only has two possible output states: on or off.
There are a multitude of different sensors on the market. There are small sensors, large sensors, laser sensors, sensors like the barrel proxes above which have no configuration whatsoever, sensors that require quite a bit of set up, and everything in between. If a sensor’s sole purpose is to detect whether or not an object is present somewhere, its output is typically digital (either on or off). For this reason, people sometimes refer to sensors of this type as “switches”. Like a light switch in your home, they either turn an output on or off.
In this regard, you can think of the behavior of a prox switch or other digital output as being just like that of the paperclip switch that turned on a small lightbulb in your 2nd grade science class. The prox sensor is the paperclip, and the target passing in front of the prox is your hand pushing down on the paperclip to change the switch’s output state.
Aside from digital outputs, there are devices with “analog” outputs. Analog sensors output a specific value within a range (anywhere from 2V to 10V, for instance). As one example, sensors with analog outputs can be used to tell a machine how far away something is. I’ll have to cover analog devices in another post. For now, let’s take a look at how Normally Open and Normally Closed sensors differ in their behavior:
Normally Open Devices
As mentioned above, the purpose of a proximity sensor is to tell a machine when something is present in front of the sensor. So, what actually happens when the sensor detects an object? Well, the sensor’s output changes state. This means that the sensor either energizes an output signal wire with a small amount of electricity, or not.
Like a light switch at your house that is off, an NO sensor will not, by default, put out a voltage to its output wire. Returning to the paperclip circuit analogy, an NO sensor’s default state is similar to the paperclip lifted off the thumbtack. The switch breaks the output circuit by default; hence, the output circuit is “normally open”. Referring to the graph above, when an NO sensor is in its default state (does not detect a target), the sensor’s output is off.
What happens when the sensor is made?
When an appropriate object passes within the sensor’s sensing range, the sensor outputs a voltage through its signal wire. This signal can indicate to a controller that the target has “made” the sensor. So long as the target remains within sensing range, the prox will continue to provide voltage on its output signal. What’s the point of this? This is how the sensor “tells” the controller: “hey, I’m energizing my output as a signal to you that there is something in front of me right now.”
As you can see in the graph above, once the object passes out of the range of the sensor, the sensor will turn off its output. A controller would now see that the sensor is in its normal, “off” state.
As a brief aside, there are quite a few ways to refer to something as being “on” or “off”. Below are some other ways you might hear someone refer to a signal as being on or off. In my opinion, all of these are more or less equivalent:
Have I left anything out of this list? Let me know in the comments below. 🙂
Normally Closed Devices
NC sensors and other devices behave exactly opposite to NO devices in regards to their outputs. NC devices are, as indicated by their name, normally closed, meaning that their output is on by default. Only when an object makes the sensor does the signal actually turn off. Here’s a simplified graph of the signal behavior for an NC sensor:
If you understood the behavior of Normally Open sensors, then you also understand the behavior of Normally Closed sensors; one is simply the inverse of the other. If an NO and NC sensor were set up to detect the same object, the NO sensor’s output would be on when the NC sensor was off, and vice-versa.
NC and NO Sensor Behavior
|Default Output State||Output State When the Sensor is Made|
Why choose an NO or an NC sensor?
Due to these differences in output behavior, Normally Open and Normally Closed sensors are better or worse for certain applications.
All cables and electrical components will eventually fail. To get an idea of why you might choose one sensor or another, let’s first talk about how we want our systems to behave when a cable or sensor is damaged, and we no longer get the signals we’re relying on to control machine motion.
The most two common types of electrical failures are “opens” and “shorts,” with opens being the most common. An open is an unwanted break in a circuit. Cuts, crushing, or other damage to the cable can cause an open.
An example of a Normally Closed application: Emergency Stop
Modern factories are populated throughout with “E-Stop buttons”. Emergency Stop buttons can be used by anyone in the facility if an unsafe condition is observed. Slap an E-Stop, and all machine motion will come to a halt as quickly as possible.
Remember that a prox sensor can be thought of as just another type of switch. What we traditionally think of as a switch is typically switched by mechanical action. Proxes are typically solid-state devices with internal electronics that turn outputs on and off. An E-Stop is an example of a true mechanical switch. When someone presses an E-Stop, metal contacts inside of the device open or close its output circuits.
NC or NO?
Let’s consider whether the E-Stop should be a Normally Open or Normally Closed device. With a Normally Open E-Stop, the button’s outputs will be off (open) when the button is in its default (not pressed) state.
In an emergency, someone hits the E-Stop. The mechanical action of pressing the button causes the normally open contacts to close, energizing the button’s outputs. Now the controller can detect those outputs, and we can use this status in our logic to halt machine motion. Cool.
Except… let’s return to the concept of an unwanted break in our circuit. What happens if the cable that connects the E-Stop button to the controller has been damaged?
If the E-Stop is a Normally Open device, and its cable becomes damaged, then when we go to activate the E-Stop, we will never get a signal back to our controller telling it to halt production. To the controller, a damaged electrical system and the default output of a Normally Open switch look exactly the same. In either case, there would be no incoming voltage to the controller’s input.
If the E-Stop in this example were Normally Open, you would only check for its output signal when you needed it to stop the line. As a result, you have no way of knowing whether the button or cable is damaged until it’s too late. A Normally Open switch wouldn’t just be a bad choice for this application, it would be dangerous. In an emergency, an ineffective E-Stop could contribute to someone being severely injured or killed.
Making the right choice for the right application
For this reason, E-Stops and most safety devices are Normally Closed. When a Normally Closed E-Stop is in its default position, the contacts close the circuit and return a signal to the controller indicating that the system is safe. Because the E-Stop returns a signal constantly, any condition that causes the E-Stop signal to go low will be detected. Aside from someone actually pressing the button, some other possible causes for losing the E-Stop safe signal might include loss of power to the system, failure of the E-Stop’s cable, or failure of the E-Stop button itself.
Now, since our Normally Closed E-Stop is always sending a signal back to the controller when it’s in the safe position, we set our logic up so that we must constantly see the signal from the E-Stop to allow the factory to run. You could think of this type of Normally Closed signal as a constant “thumbs-up” to the controller that the system is safe. In the controller logic, machine motion would only be permitted when the expected signals from all safety devices are present.
Along this same line of thought, other sensors that detect unsafe conditions, such as tank overfill, are typically Normally Closed. Because NC sensors return a signal by default, any loss of that signal will immediately indicate that the system is not safe.
An example of a Normally Open application: Part Present
For less safety-critical applications, Normally Open sensors work just fine and in fact are found more commonly in industrial automation than NC sensors. In certain cases, use of an NO sensor would actually be preferable, and many people find it easier to interpret the behavior of NO sensors when it comes time to debug an electrical or programming issue.
“Part Present” applications, for instance, often use NO sensors. Let’s say that you want a robot to pick up a part and move it to another location. When the robot moves to the “pick position,” you want to be able to verify that the part is positioned in the robot’s “end effector” – a fixture bolted to the robot arm that is custom-built for picking up a particular part – before allowing the robot to attempt to move the part. Normally Open sensors are ideal for this type of Part Present detection, as they only send the signal that the part has been picked up if they actively sense material. If a cord or sensor is damaged in this type of application, the sensor will simply never output its signal. Because the robot won’t see the necessary signal, robot motion will be halted until the problem can be corrected.
NC and NO Sensors
There’s a common thread in both the Normally Closed and the Normally Open applications described above. In both cases, you want positive indication before you allow the system to move. By positive indication, I mean that you want the PLC to see the signal from the sensor go high.
In the E-Stop application, you want to be able to move the system by default. You only want to disable motion if a certain condition is met (someone slaps the E-Stop). Hence, you want the signal to be on by default (Normally Closed). You only want the signal to go low if your system isn’t safe.
In the Part Present application, you want the robot to stop at the pickup position by default. You only want to enable motion if a certain condition is met (the part is positioned in the end effector). Hence, you want the signal to be off by default (Normally Open). You only want the signal to go high if your part is properly loaded.
I hope that this has shed a bit of light on some of the basics of proximity sensors, including the concepts of Normally Open and Normally Closed. There is a lot to be said about the many sensors on the market and their functionality. Click here for an in-depth look at the various types of sensors and how they work and are set up.
Anything you think I should add to this article? Send me an email or let me know in the comments section!
If you found this content to be valuable, let me keep you posted whenever I have something new for you! Sign up below; it only takes a second. 🙂