Basic Non-Contact Sensors Used for Detection and Measurement

Sensing motions, part presence, and possible crash scenarios is a fundamental aspect of machine design. Some companies put the responsibility for selecting sensors on the mechanical designer and some rely on the controls designer/engineer to make the selections. No matter who actually picks the part number of the sensor (I personally fall into the “mechanical designer” camp because sensors occupy physical space and have to be accounted for, but it can certainly work both ways), everyone involved needs to have an understanding of the technologies, the capabilities, and especially the limitations of the sensors that they will utilize. Hopefully, whether you are mechanical, controls, or project management, this post will help you select the best sensor for each application you run into.

The Big Picture

Regardless of the chosen sensor, there are a few bullet points that apply fairly universally, so we’ll start with those first as a precursor to talking about individual solutions:

  • PNP versus NPN: Yeah, this one is a headscratcher as to why we even need two types. The name refers to the type of transistor inside that governs the switching action. In the US and Europe, PNP is the preferred (and almost exclusively used) sensor type because it “sources” current to the input card and logically behaves much in the same fashion as a light switch in your house. Voltage (a current source) is present on one side of the sensor and when it turns on, it provides a current path to the input card and eventually to the neutral side of the circuit, just like the light switch through the light bulb to neutral/ground analogy. The Japanese have always been big fans of NPN switch circuitry where the input card has the positive voltage and when the switch turns on, it “sinks” the current, giving it a path to the neutral side through the switch, or in other words, zero voltage at the input means the switch is “on.” I was always under the impression that they chose NPN because it had technical or safety pluses despite acting backwards to how most people envision a switch working, but I did a little research and it may simply be because they were early adopters of the technology when NPN was more prevalent in the circuit board world and it ended up a standard for them. Either way, no matter what the history or technical reason, it’s something to watch out for. For a lot of manufacturers, it seems the NPN part number is the default (I’ve never understood that one) and you have to add some designator to get PNP, so you could order the wrong switch inadvertently in NA/Europe. But more importantly, if you are working for a transplant auto manufacturer from Japan or are integrating equipment that has come from Asia, you may have to specify NPN. Check your specs! The transplants have been around so long that now it’s become a mixed bag of what they prefer, so assumptions can get you into trouble.

  • Smart Sensors versus “dumb”: While virtually all modern sensors are 24 volt DC (yes, they used to be 110VAC, which could make life kinda interesting once in a while), you now also have a choice between a “dumb” and a “smart” sensor. Dumb (ok, maybe I should call it “traditional” instead) just means it switches the 24VDC on and off like a light switch and the input card just sees “on” as being above a certain threshold and off being below a second threshold. They either work or they’re broken. The smart sensors give you a bunch more info, but require a communication protocol. There may be competing technologies out there, but the 800lb gorilla is IO-Link (to the point that I don’t even know what their competition is). I believe all the big name sensor manufacturers offer this as an option now. The sensor has an embedded chip that sends digital info over a regular 3 wire sensor cable back to an IO-Link Master (usually in the form of a multi-port block) that then interprets that signal and converts it to a higher level industrial fieldbus such as ProfiNet or Ethernet IP. When you have a smart sensor, you get “health” data like if the on/off voltages start to drift, or if the sensor temperature is above normal, or sometimes physical damage can be registered. On photoeyes, it can even tell if a lens may be getting dirty. Many times, you can use the signal strength feedback as a low end analog device. I have mixed emotions about this move to smart sensors……not that I have a choice, this is the wave of the future, but….. I’ve never actually seen a smarter technology cost less even though they are always touted as saving wiring time or design time or integration time; instead, people just ask the new technology to do more. So, to get the value out of the smart sensors, you can bet controls engineering hours will go up substantially in the next 5-10 years and the market seems to use past benchmarks to establish a price, which in the short term, will drive margins down and make our industry less healthy. Everyone wants predictive maintenance so that you can replace that switch on a weekend instead of after it fails and brings your machine down, but it remains to be seen as to whether they will be willing to pay what that benefit really costs in development time. But back to the less philosophical…..whether the sensors are IO-Link or just traditional is likely driven by either your customer or your own company standards, so double check before you start picking them for your designs.

  • This is an important one…….sensor manufacturers lie. OK, they don’t really lie, but just beware that for everything but the basic proximity switch, the ranges and sensitivity/repeatability numbers listed on their website are under very controlled conditions. If I had a dollar for every time that a salesperson brought in his or her suitcase of sensors and demonstrated on a conference room table something that would work beautifully in my application, only to have to rip it out and replace it with a more mundane and traditional solution, well, I’d probably have an extra $53. You are designing something that needs to basically be bulletproof with limited maintenance and years of hard use. It’s easy to fall under the spell of technology’s siren song, but do yourself a favor and don’t ever implement a sensor that has to meet its published specs for the implementation to be successful. And don’t get me wrong, I’m not saying you have to make everything work with those giant cast iron 1960’s vintage limit switches…..I’m a fan of new technology and there are a ton of great sensors out there…..just remember the environment that your equipment goes in. If you have to adjust gains/reteach or reposition a switch more than once (maybe twice) in debug, it’s likely going to be problematic in the field. You are looking for the most forgiving solution that works, not necessarily the most precise, most technologically advanced solution.

  • No matter what technology you choose for your sensor, the mounting is just as important as the sensor choice. Brackets need to be pretty solid and have adjustability built into them to allow for final alignment at assembly. You have plenty of options, but I do think some stand the test of time better than others. First, you can go stamped/purchased as shown in Figure “A” below. They are inexpensive, somewhat adjustable, and readily available, but I am generally not a fan for three reasons: a) I don’t think they take a hit well which means bumps make them go out of adjustment or act flaky too easily (unless you can find them at least 3/16” [4.5mm] thick); b) I don’t like the idea of redesigning all the expensive bits to save a few bucks on a bracket, which is what you end up doing when you are creating a custom machine. If I have to make a spacer block to get my $9 standard bracket positioned correctly, I may as well make a $20 custom bracket that fits the application; and c) most of them accomplish one axis of sensor adjustability in a manner that i just don’t think works well, namely via a slot for the sensor itself. Yes, I realize I may ruffle feathers with that comment because a lot of companies use that as their standard even on custom brackets (as seen in Figure “B”), but i just don’t think there is enough surface contact between the nuts/washers and the bracket to hold over time. OK, they’ll make it through debug and runoff, and maybe even the first few months of production, but vibration will work the sensor loose over time at a much higher frequency than the options I’m showing in Figure “C,” which to me, is the “proper” way to build in adjustability, although it is definitely more costly. In all three “C” examples, the sensor is mounted through a hole instead of a slot, so that you get 360 degree “bite” on the washers and nuts and the adjustment comes out of separate slots with lots of surface contact.. I did work for a place once that was pretty fanatical when it came to removing non-value added machining, and we actually used the version of the bracket shown in Figure “D,” where the bolts were bigger (5/16-18 [~8mm) versus the more typical 1/4-20 [6mm]), but only one was used for each axis of adjustment instead of two. A little unorthodox, but I never heard a single customer complaint, so it is an option. Finally, there are more complicated purchased brackets that have all the benefits of being inexpensive and off the shelf, still hold the sensor well, and have adjustability built in. I’ve included that in Figure “E,” but full disclosure, I’ve never actually used one, so you’ll have to do further research to see if it is the best option of all.

Bracket options

Bracket options

Now I’ll run through a few sensor options. If I try to list all the ranges, sizes, and options for all the sensors, this post would be ridiculously long, even for me, so I’ll try to leave the specification side of things to your own research, but just list a few things that may not make it to the manufacturers’ websites.

Inductive Proximity Sensors

Inductive.jpg

The main workhorse sensor in our industry is the inductive proximity sensor. They sense metallic (electrically conductive) materials via an inductive/magnetic field and are therefore, non-contact. If you’ve been in the business even six months, you’ve probably already seen a host of these and know how they work. There are a few things to know:

  1. Listed ranges on websites and catalogs are for ferrous materials. Range is cut down significantly on aluminum, brass, etc, although they will sense those materials.

  2. Picking the diameter of the prox is all about target material and repeatability. I’ve seen 12mm proxes used on a ton of conveyor systems, but if a pallet is coming into a bouncy or loose fitting section of conveyor, you may have to go up to an 18mm prox. I’ve used proxes all the way down to 4mm diameter successfully in some applications, but at that point, you have to basically be virtually touching your target.

  3. I prefer using inductive proxes to sense motions/tooling, but usually not part presence. You may have decent success seeing ferrous parts with an unshielded prox, but just be very cognizant of the ranges. Many times, between the variation of the parts, the tolerance of the fixturing, and the need to keep adequate clearance for loading, a prox will not see a part reliably. Motions and tooling are great applications because you almost always know where those are down to .001-.025 [.03-.6mm] repeatability.

  4. Speaking of unshielded proxes, just remember, they look to the side just about as well as they look forward, so while you’ll get 2-3x the range, you may get false triggers, too. And, I don’t think they are quite as damage resistant as shielded proxes. It’s a solid solution, just watch the application.

  5. I would try to avoid the use of smooth barrel proxes just because they tend to move and/or get destroyed more quickly. But if you ever do find yourself needing to use one, I would highly recommend the mount shown in the picture below. Yes, it’s more expensive and a pain, but those barrels are pretty fragile and it’s very easy to destroy the prox with a set screw. The mount involves taking an easily machined material such as bronze or aluminum, creating a sleeve with an ID that matches the prox barrel OD and something not much bigger as the sleeve OD and making a cut through the side, then mounting that sleeve in the block with the cut perpendicular to the set screw hole. You can now torque the set screw down very hard and clamp the prox safely. But the sleeve has to compress, which is why you want the wall thickness to be fairly thin. Many times, you can find a catalog bronze bushing the size you need and then you just have to put the cut into it. This mounting method can be used any time you have a delicate sensor/component, some of which are discussed in other posts, so I’ll just refer to it as “split sleeve mounting” when it comes up and link back to this post.

4mm prox mount.jpg

Capacitive Sensors

capacitive prox.jpg

Capacitive sensors come in all the same physical forms as inductive proxes (barrel and rectangular), although I think you’d find them to be more in the 18-30mm barrel size to get any kind of reasonable range to them. The benefit of a capacitive sensor is that it can sense non-ferrous items (in additional to ferrous items) such as plastics, wood, or liquids, and can be tuned to look through non-metallic containers at the materials inside. Here are a few applications notes:

  1. They are tunable to some extent so that you only sense the material you want to sense and not something randomly coming into proximity with the sensor. But, at least in my limited exposure to these, it’s not perfect, so it’s best to experiment to make sure you see what you want to see and don’t see what you don’t. Test the sensor with anything that may come in contact with it accidentally in a sequence (operator brushes it with gloves, other materials in the product, etc). You don’t want any false triggers to send your program off into the weeds!

  2. Looking through the container wall is a very cool capability. Wall thickness, consistency of switch placement, rigidity of the mount, etc, are all important. You will want to try the sensor before building an entire design around it. Make sure you are testing it at the extremes, not at the ideal.

  3. These used to get fooled by moisture levels in “dry” material and the film that sticks to the walls of a container above the actual level line on viscous liquids, but they’ve come a long way in the last 10 years to eliminating false triggering. Some sensors are specially made to handle these situations, so shop wisely.

  4. They’re bigger, more sensitive, more prone to false trips, and more expensive than inductive, so while it seems like the perfect “one size fits all” sensor, I’d only use them when you need to look at non-ferrous and only after experimenting with the actual conditions.

  5. In certain applications when there is a lot of high voltage noise present, they can act very flaky. I’ve seen entire cells that have had the switches replaced because even with proper shielding, routing, and power management, the noise crept through and caused false trips.

Ultrasonic Sensors

ultrasonic sensor.jpg

Just like the other proximity sensors, these come in both barrel and rectangular form. I don’t have a huge amount of experience with ultrasonics, so take what I’m saying with a grain of salt, but they tend to have much longer ranges than a traditional prox and it’s the first sensor we’ve talked about that can be used for rudimentary distance measurements when you buy the analog or IO-Link version. Only a couple of cautions that I know of:

  1. You do need a fairly flat surface for the signal to bounce back from, and if you are using it for distance instead of just presence, you’ll really want to pay attention to that.

  2. Unlike inductive and capacitive, this really doesn’t care what you put in front of it, so you need to make sure that you watch out for false triggers that come from things passing by it randomly or something behind the intended target. You can tune the distance window to keep some of that from happening, but you do need to keep it in mind in design and implementation.

Photoelectric Sensors

Photoelectric sensors are possibly the most versatile but also most finicky sensors you will use regularly. There are a ton of different options, so I’ll try to go over the typical applications, pros and cons of a few, but first, a general note….I was always taught to avoid using a photoeye to sense a machine motion. They are more prone to misadjustment and false triggers which can create major machine crashes, so unless there is just no other way, stick with proximity switches, magnetic cylinder switches, linear scales, or limit switches for motions. For many of the sensors described below, you can get distance feedback from them and use them as a low end measuring device (and I mean really low end…..more like “it’s kinda in this area” than “it is exactly 3.452 inches away") via an analog signal or IO-Link. Some also have multiple setpoints so you can tell when something is in a specific window. The old school, inexpensive versions still have gain adjustment done through a potentiometer, but most of the newer versions have pushbutton teach mode setup. Now, for the overview:

  1. Through beam photoeyes (figure A) - this is the most reliable photoeye solution and should be used whenever possible. The only real failure mode is if one of the units fails or if it gets too dirty or misaligned to see, but it can be backchecked in the program very easily. They are available in the two versions shown plus proximity style barrel format, small blocks with barrel mounts, and more.

  2. Retroreflective photoeyes with a reflector target (figure B) - This is also a pretty reliable solution. Obviously, it doesn’t care what it’s looking at, so you have to make sure you think about false triggers. The only other thing you have to worry about is the sensor getting feedback from the object itself which will have the unintended consequence of never showing “blocked.,” but specifying a polarized light source and using a special reflector will eliminate this problem. As you can see from the second picture in that square, they can also tune these to see clear objects passing by, which seems like witchcraft to me, but it apparently works well.

  3. Diffuse mode photoeyes acting on the part itself (figure C) - Here’s where things get a little trickier……the success of this is very dependent on distance, target material, target color, surface finish, target perpendicularity to the sensor, etc. I don’t want to make it sound like a moon shot; this technology is used all the time very successfully, but you do have to be a little careful. If there is tooling right behind the part and the part is maybe a dark color or can move around a lot and requires the gain to be turned up, you may see the nest when the part isn’t there. Or you may find it is more sensitive to dirt and oil than the first two solutions. They have improved this technology with the addition of convergent beam sensing and active background suppression, so it can be very effective.

  4. Area sensing photoeyes (Figure D): I have limited experience with this style of sensor, but I think they’re worth mentioning because they have some pretty cool features. You can set them up so that a certain percentage of blockage, no matter where, turns on the switch, which is beneficial if you aren’t always sure where your product is going to be. You can get them to tell you the % blocked, so that you can use it to sense object size. I believe you can also teach multiple setpoint windows to differentiate between different parts digitally instead of dealing with a raw analog value.

  5. Several photoeye manufacturers also offer the ability to add fiberoptics to their sensors. This greatly increases the physical mounting options that you have, but it does cut down on the sensitivity. I am a big fan of opposed beam sensors where there is a sender and receiver fiber bundle that plug back into a diffuse mode photoeye body. Examples of those are shown in Figure E. To me, the least reliable solution is the bifurcated fiber (figure F) where the send and receive are in the same bundle and it acts as a diffuse mode sensor described in item 3 above, but the fiber bundle cuts down the sensitivity drastically. It can still work well, but you need good control of the part and color, surface finish, and the distance to the part becomes more critical. Regardless of the fiber style you choose, I think glass fibers (as opposed to plastic) with stainless sheathing (as opposed to PVC, rubber, or polyethylene) are the best choice for quality of signal and longevity, but of course, other options will work.

Photoeyes.jpg

Laser Displacement Sensors

I won’t go into a ton of depth on laser measurement sensing (unintentional nerd humor there), but I did want to mention a few things about laser sensing. First, they are incredibly accurate and can measure down into single digit microns. They can range in price from $300 for really simple units all the way up to $30k for surface profiling units. The single biggest thing to watch for is your surface finish versus the “dot size” on the sensor. To be able to get down to that single micron accuracy, the laser dot is only somewhere between 30-150 microns depending on the model. If you are trying to measure most of the parts that we deal with in our normal assembly and test world, the surface finish of the parts is very “rough” by comparison, which gives the laser fits. You will get all kinds of erroneous measurements if you have this condition. Most if not all of the manufacturers have hardware/firmware/software filtering built in, which helps some, but no post processing will be as effective as specifying the lowest accuracy/highest dot size hardware from the start. You may be inclined to think “more accuracy gives me the most flexibility” when shopping, but this is a case where the exact opposite is true. You’ll spend all your time chasing ghosts in debug. Try to find a hardware combination that is maybe 100-200x better resolution than the tolerance you are going to be looking to reliably measure. That may be tough to find with a laser (they will likely have much more resolution), so you should do some testing to make sure the combination of physical laser and filtering options get you what you want. This is the style of sensor that I probably would have made the most money back on my “if I had a dollar for every time” comment above. They always seem to work on the conference room table in demo mode and create the most headaches in real world implementation, so make sure your testing is robust….throw different parts at it at different orientations. Move things around and watch the measurement closely. And again, I am not saying this is a bad sensor. It’s actually some pretty amazing technology. It just needs proper application.

laser sensor.jpg