Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

NPN Sensor used as dry contact for Sensing device?

Status
Not open for further replies.

RoboWanabe

Member
Hi

Please correct me if i am wrong.

I would like to use this sensor : https://uk.rs-online.com/web/p/photoelectric-sensors/3728177/

with this device: **broken link removed**

D0 and D1 on the sensing device says that it requires a dry contact, will the sensor above be OK ? I can't see it being a problem with it switching to ground?

I do not want to use a PNP with a relay as this will increase power consumption.

Thanks for your help
 
I'm not sure, but I don't think so. The problem is that the transistor can provide the Logic 1- close to ground as per data sheet (same as short ckt), but for the Logic 0, the dry contact wants to see an open, whereas the NPN must have a voltage on the collector and the data sheet of the WISE is not clear on whether or not you can have a voltage on the pin (I'm thinking no). One possible workaround that I can see is that you use your opto-relay to switch either to gnd or +v and feed that to one of the 2 input voltage channels of your WISE. You then use that voltage control input of the WISE to control thru firmware the relay output channel of the WISE. Use that relay channel to control the digital input channel of the WISE, since it is a true dry contact. I know that sounds goofy, but I think it should work... Let me know if that did not make sense and I will make a drawing for you:)
 
Thank you, yes makes perfect sense but that would mean I loose 2 Analogue inputs and 2 relays?

But that is a very good idea and i will bare it in mind :).

So are you saying that when the sensor hasn't been triggerd there will be a voltage on the collector? will that not be from the Inputs on the WISE unit, so 5 volt's ?

Here is an image of what i thought was going to happen :
SensorSetup.jpg
 
Thank you, yes makes perfect sense but that would mean I loose 2 Analogue inputs and 2 relays?

No, just 1 analog input, 1 digital and 1 relay, I will make a drawing later okay:)

BTW, your connection of the Opto device is not correct.
 
Here is what I was thinking. Now I got errands to do, so hope that makes sense to ya. :) Sorry I hand wrote it and scanned it, was in a hurry.

WISE_IOT001.jpg
 
BTW, your connection of the Opto device is not correct.
What's wrong with his drawing?
I would expect it to work the way he drew it.

The WISE unit says it's looking for a switch closure to ground. That can only mean it's a sourcing input, looking for a sinking sensor.
NPN sensor, saturated low side switch, that fits the bill for a sinking sensor. When ON, (as he drew it) I would expect the sensor's NPN transistor to pull the input low. When OFF, the sensor's NPN transistor would not pull the input low, therefore it would be "floating" or "pulled up" to whatever voltage the input sources (AKA "open").

Or have I missed something?
 
The data sheet does not say what is on the input, is it through a pullup? I can't tell, so I am assuming possibly no. If it has a internal pullup in the wise module then he would be okay. Look at the data sheet and see what you make of it. I think I did read that the input impedance was 100K, so I'm thinking no pullup.
 
I'm thinking the input is an opto. when you short the input, you cause current to flow thru the opto, and therefore input is ON. So maybe not a "pullup" as you would normally think, but when no current flows, the input is effectively "pulled up" by default.
 
Sounds like your making assumptions which may be correct, I dunno, and since the data sheet was not clear to me I went with what should work. The drawing I put up is how I think it should be connected, but I could be wrong.
 
The hardware documentation on this thing leaves a bit to be desired.
I was able to find more info in the **broken link removed**:

wise3.jpg

Wiring diagram of how to connect the 4012 (the version RoboWanabe has):
wise2.jpg

Wiring diagram of how to connect the 4050 (more bells & whistles than RoboWanabe has):
wise1.jpg


Since the 4050 has the option for choosing sourcing or sinking inputs (they call it wet contact or dry contact), they go to the trouble of providing a meaningful hint about the internal configuration. Since the 4012 doesn't have that option, they provide only a half-ass clue. But even the half ass clue shows a pull up.

One thing this means, if the 4012 does indeed have the same sourcing ("dry contact") input circuitry as the 4050, then DI COM is actually a POSITIVE common, and should not be connected to GND.
 
I'm thinking the input is an opto. when you short the input, you cause current to flow thru the opto, and therefore input is ON. So maybe not a "pullup" as you would normally think, but when no current flows, the input is effectively "pulled up" by default.
I just remembered I think you mentioned somewhere that you work in industrial automation on oil platforms or some such. That would make you more knowledgeable in this area, or at least I think so. Therefore I defer to you as the automation expert :)
 
Good job on finding that info Strantor
 
I just remembered I think you mentioned somewhere that you work in industrial automation on oil platforms or some such. That would make you more knowledgeable in this area, or at least I think so. Therefore I defer to you as the automation expert :)
Yeah I guess you're right, must be a niche automation thing. I thought it was universal but come to think of it, the only reason I had a clue was from stepper/servo drives and PLC inputs.
 
Great :)

I will presume that I have brought the correct Sensors then, I was expecting to receive them today so I was hoping to tell you if it worked or not, but no luck yet :(.

Also if it helps the discussion, i have measured 5 volts on D1 and Gnd. So i presume it is using a pull up resistor?

Thanks
 
Hi Guys,

Just letting you know my idea worked, attaching the NPN Photoelectric sensor as a dry contact to the wise works a treat :).

If you would like to know anything specific, please ask.

Thanks again for all your help :)
 
Well, I guess it is a good thing you did not listen to me. Good deal.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top