NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Would someone explain Proximity Sensor?

February 23, 2015
by Ralphxyz
Ralphxyz's Avatar

How exactly does this Proximity Sensor work?.

It has a NPN Normally Open transistor switch with Output: Current Sink 100mA max.

So upon detection will the signal be High? On my mcu should I be looking for a High?

How is that NPN "Normally Open" transistor work?

February 23, 2015
by JKITSON
JKITSON's Avatar

Ralph

I looked at the Prox Sensor and it states "OUTPUT LOW ON DETECTION".

There for you will normally see a high until detection of something, then goes low.

That is also how the ones I have been using work.

Hope this helps...

Jim

February 23, 2015
by Ralphxyz
Ralphxyz's Avatar

Duh, thanks Jim, how would I test this? And where does the Current Sink come in.

I am really trying to understand how it works.

February 23, 2015
by JKITSON
JKITSON's Avatar

The current sink refers to the max amount of current the sensor can "sink" / handle. The inputs on the mcu's are in the 5 ma I think.

Think of the sensor as a toggle switch. It is open/high until it senses something. Then the switch closes and causes a low level for the mcu to see.

This is a very crude answer but the one that someone gave me years ago and it helped.

Jim

April 26, 2015
by mongo
mongo's Avatar

HI GUYS! Back in for a bit here...

I use prox sensors all the time. Here is how I view them.

Current sourcing sensors use a PNP transistor output (open collector) (some use FETs) and the current is typically from the sensor to the load to ground (-).

Current sinking sensors are basically the opposite. An NPN output, (also open collector) which sinks the load which is connected to the + supply.

There are also combination sensors that can work either way. Instead of three wires, they have four and you select the output wire you need.

These little things are not much good for any real loads, and are intended to drive inputs or relays for output amplification. Many PLC's that take DC input are ideal for this. I use them to drive SSR's (Solid State Relays) if I am stuck using a DC system but because most of the things I do are heavy industrial, I use AC prox sensors and drive AC relays. These are nice in that they only have two wires and can be several in series for say, a safety loop.

Prox sensors come in different styles. RF/magnetic field sensors are great for positioning and the like, while capacitive units work nicely for things like level controls. I uses a number of them in flour silo high and low level detection.

April 27, 2015
by Ralphxyz
Ralphxyz's Avatar

Thanks mongo and of course Jim!!

April 27, 2015
by BobaMosfet
BobaMosfet's Avatar

Ralph,

You could easily build this yourself, and it would be significantly more beneficial to you in learning.

I'll bet you have the parts to do it. It only takes 3 or 4 parts.

BM

April 27, 2015
by BobaMosfet
BobaMosfet's Avatar

Here is basically the same circuit as the sensor, except you'd also have to ass an IR LED and and IR Receiver. Trivial.

Open Collector Circuit

You'll also recognize the 'common emitter' configuration.

BM

April 27, 2015
by BobaMosfet
BobaMosfet's Avatar

add*

April 27, 2015
by Ralphxyz
Ralphxyz's Avatar

"ass an IR LED and and IR Receiver" might be trivial for you but I am not sure of the hookup.

Would Vout vary with distance or just be a on/off within a range?

April 27, 2015
by BobaMosfet
BobaMosfet's Avatar

Ralph-

Here is a circuit showing what you could build to make an IR transmitter-receiver. If you take the Signal Out of this circuit and make it the Vin of the circuit above (add a weak pull-down on Vin)-- you have it. You may have to adjust resistor values, and you could even replace the pull-up resistor on the IR Photo-transistor with a trimpot (so long as you never let it be zero-ohm (which would cause a direct short, frying your transistor) to give you control of the distance you can measure up to a point.

IR LED & Photo Transistor Circuit

As for variation on Vout on your sensor connection-- since we're dealing with transistors (in this case BJTs) Vout always varies in proportion to Vin, in the neither off, or saturated region.

This is a perfect-sized project for you. Not so small as to be useless, not so big as to be impossible-- but it has enough to really make you think about it and learn. In truth, this is how most things a learned-- you have to have a little hurdle to jump over to turn book learning into something you understand.

Play with it! Go! Learn! :)

BM

April 30, 2015
by mongo
mongo's Avatar

I just looked at the sensor in question... Duhh, Shoulda looked there first.

That is an opto sensor. The ones I use most of are metal detecting or capacitive, but I do use opticals a lot too. Here is a can smasher that uses an optical sensor to detect the can and a metal detecting sensor to know when the ram is back out of the way. Can smasher

Yeah, I got bored one day...

They come in a few different styles. One style that detects specular reflection, one that detects diffuse reflection and then there are the thru-beam and retroreflective sensors, which can also be polarized.

The outputs, whether sourcing or sinking are still the same as I noted earlier however.

Specular reflective sensing can also be passive, not requiring a light source. Most do have one though just to make them all the same. They pick up shiny objects and can be at a long range as well. Some are adjustable too.

Diffuse scan sensors are more in tune with proximity detection of objects that are not necessarily shiny. I have used these in packaging machines to detect a box blank in a box former.

Thru-beam are the long range units that take a transmitter and a receiver.

Retroreflective sensors require a corner reflector if they are polarized, or reflective tape minimum, (though a corner reflector is still preferred). Their ranges depend on a lot of things. Size of the reflector is one factor, the focus of the unit is another, and many have a sensitivity adjustment. When polarized, they are more immune to external light noise, which can cause false triggering or, blinding them altogether.

All of these can be strobed. Flashing at high frequencies, which also reduce external interferences. Some can be side by side and not affect each other if they are at different frequencies.

April 30, 2015
by mongo
mongo's Avatar

Oh, and there is another kind that is a set distance. It has the transmitted beam and received beam in the same housing but at an angle. They share a common focal point where the sensor "sees" the target. They work well for level controls in things like paint cans, so when the level reaches the focal point, valves shut off.

April 30, 2015
by Ralphxyz
Ralphxyz's Avatar

It's the paint level which I am most interested in!

"It has the transmitted beam and received beam in the same housing but at an angl" do you have a link for these?

May 04, 2015
by mongo
mongo's Avatar

Banner Engineering

They make a whole bunch of different ones. Here is just the first one that popped up on the search:

Convergent

It's a PDF data sheet for one.

Here is the link to their sensors page:

Sensors

If you saw the can smasher video, the little yellow sensor with the metal mirror is a Banner.

May 04, 2015
by Ralphxyz
Ralphxyz's Avatar

I saw the can smasher, here in New York we have a deposit on most cans and bottles so you don't want to crush them.

May 04, 2015
by Ralphxyz
Ralphxyz's Avatar

Wow, mongo those Banner sensors are kinda pricey!! But nice!!

May 04, 2015
by mongo
mongo's Avatar

Yeah, they are. I find most of my industrial components like these in salvage projects. I used to buy old decommissioned equipment for pennies on the dollar and strip the controls out. Sell the framework for scrap and I pretty much break even with a lot of parts like PLC's, power supplies, prox sensors of all kinds...

Lately though, I have been getting a lot of email from Banner. I guess I got on their mailing list, but that's OK. When I build or modify a machine, price is usually secondary to functionality, so I do buy a lot of banner stuff. But there are many other companies with equally good and versatile components. Allen-Bradley, Sick, Omron, Schneider, and lots more. Most of the time, I think it really comes down to just what you want to do with it.

May 04, 2015
by mongo
mongo's Avatar

Around here, smashed is the way to go with cans. Scrap is paid for by the pound and it goes straight to the shredder. When they are smashed, they know you can't fudge the weight by filling them with rocks or dirt.

Post a Reply

Please log in to post a reply.

Did you know that you can make a spooky Halloween Jack-O-Lantern with a microcontroller? Learn more...