NO and NC (Normally Open and Normally Closed) Proximity Sensor Basics

When I was learning PLC programming, I remember scratching my head a bit 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, and what effect will it have when I’m checking the state of the sensor at the PLC or other controller?

Proximity sensors set up on an automation line.
Common “barrel proxes” (pronounced “prawkses”) set up to detect parts or features of parts as they move down a conveyor. When objects made of certain materials (depending on the sensor type) pass in front of a proximity sensor (sometimes referred to as a proximity switch), it is “made,” changing the state of its output signal.

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.  Whether or not an object is detected depends on the characteristics of the sensor. 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.

Digital sensors

The proximity sensors shown above might also sometimes be referred to as “digital proxes.”  In this context, digital has a somewhat different denotation than the typical use of the word outside of industrial automation.  When someone refers to a sensor as “digital,” it means that the sensor only has two possible output states: on or off.  There are a multitude of different sensors on the market – small sensors, large sensors, laser sensors, sensors like the barrel proxes above which have no configuration whatsoever, sensors that require quite a bit to set up, and everything in between. If a sensor is used solely to detect whether or not an object is present somewhere, its output is typically digital (either on or off).  For this reason, sensors of this type are also sometimes referred to as “switches,” as they either turn an output on or off, just like a switch.

A child pushing down on a paperclip to turn on a light in a simple electrical experiment.
Image source

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 you used to turn 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.

Analog sensors

Aside from digital outputs, there are devices with “analog” outputs, which output a specific value within a range (anywhere from 2V to 10V, for instance) and can be used, as one example, 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

A graph depicting an example of sensor output behavior for a Normally Open sensor. By default, the sensor's output is off, or "low." When the sensor detects an object in its sensing range, the output is switched on. When the object then leaves the sensor's range, the output returns to its default state of low.
This graph shows the behavior of a simple, Normally Open proximity sensor as an object passes in front of the sensor and then passes out of its sensing range. When an NO proximity sensor detects its target, its output signal is turned on (energized with voltage). When the object is no longer detected by the sensor, the output state changes back to the original state (no voltage on the signal wire).

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.  What I mean by that is that there is a wire that comes out of the sensor that is either energized with a small amount of electricity or not.  By default, when a Normally Open sensor is just sitting there, it is being supplied with electric power (typically 24VDC or 120VAC), but, like a light switch at your house that is off, there is no voltage coming out of it.  Like the paperclip that is lifted off of the thumbtack on the cardboard, the switch is off and the output circuit is broken.  In other words, the default state of a Normally Open sensor’s output is to have no voltage on its output circuit; 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, potentially indicating to a controller that it is “made.”  So long as the sensor is functioning properly, and the object remains within the sensing range, the prox will continue to provide voltage out 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:

MadeNot Made

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.  A simplified graph of the signal behavior for an NC sensor is shown below:

A graph depicting an example of sensor output behavior for a Normally Closed sensor. By default, the sensor's output is high. When the sensor detects an object in its sensing range, the output is switched off. When the object then leaves the sensor's range, the output returns to its default state of being energized.
Here you can see that the behavior of a Normally Closed sensor is directly opposite that of an NO sensor; they are the negation of each other.
When an NC prox is made, the signal is actually “brought low.”

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 StateOutput State When the Sensor is Made
NO SensorsOffOn
NC SensorsOnOff

Why choose an NO or an NC sensor?

Due to the differences in their 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 the day does come that a cable or sensor is damaged and we no longer get the signal that we’re relying upon to control motion of our machinery.

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 an electrical circuit, often caused by a cable being crushed, cut, abraded, or otherwise damaged.

An example of a Normally Closed application: Emergency Stop

A common device found throughout modern factories is an “E-Stop button.”  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.

A red emergency stop button that would be present throughout a factory for use in an emergency to stop the factory.
A typical E-Stop button.

Remember that a prox sensor can be thought of as just another type of switch; while what we traditionally think of as a switch is switched by mechanical action, proxes are switched by their internal sensing mechanisms.  An E-Stop is an example of a mechanical switch, with metal contacts that open or close output circuits if the button is pressed.

NC or NO?

Let’s consider whether the E-Stop should be a Normally Open or Normally Closed device.  If the E-Stop is Normally Open, then when the button is in its default (not pressed) state, its outputs will be off (open).

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 we can detect those outputs at our controller, and use this status in our logic to halt all machine motion.  Cool.

Except… returning 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?

A simplified schematic depiction of an E-Stop circuit. A power supply on the left feeds power to an E-Stop switch which feeds an input to a controller on the right. There is a break in the connection between the E-Stop and controller.
A simplified depiction of an E-Stop circuit. The E-Stop is shown as an NO switch for the purpose of illustrating the concept; in reality, E-Stops are typically NC. If the E-Stop were NO, a break in the wire would prevent the stop signal from reaching the controller in an emergency.

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 – that is, 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.

Safety first

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.

A view of a pilot in the cockpit of an American military jet. The pilot is giving the thumbs up sign with his left hand.
Who’s got one thumb and flies a jet?

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.

NO sensors are often used, for instance, in “Part Present” applications.  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, halting the robot’s motion until the problem can be identified and corrected.

Two yellow Fanuc robots are moving pieces of metal in an automation cell.
Two Fanuc robots performing material handling operations in an automation cell.  Their end effectors are the orange fixtures attached to the ends of the robotic arms.  The end effectors likely use Normally Open “part present” sensors to verify that the part is properly loaded before moving away from the pickup positions.

NC and NO Sensors

In both the Normally Closed and the Normally Open applications described above, 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, and 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), and 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, and 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), and you only want the signal to go high if your part is 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, and in a future post, I’d like to go into more depth about the various types of sensors that are out there and how they work and are set up, and also how they can be used in your logic to control the process.

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. 🙂

1 thought on “NO and NC (Normally Open and Normally Closed) Proximity Sensor Basics”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.