Is it possible to connect a PNP Inductive proximity sensor to the digital side car?

We have some PNP Inductive Proximity senors and have been unable to get a digital input read from them. Some raging debate on the team has concluded we need NPN based switches, but would like to hear from the Chief Delphi community.

I'd recommend NPN as well. Can the PNP switches run at 5V? if they only run at 12, you will need something to convert the 12V output down to 5. A resistor network or an op-amp could probably do it. If all else fails, you can run a small relay from the 12V that will trigger the 5V.

It outputs a 12v signal when activated. I think we are going to go hunting for an NPN in the morning. Any other suggestions would be appreciated.

I see another problem with using this device - the +12V output is too high to be used with the DIO input of the digital sidecar. I don't know if it would damage the inputs of the Digital IO module. You will want to use it with a resistor divider network to get the voltage down to the 5 Volts that the Digital IO module can accept.

You absolutely cannot use that PNP sensor directly with the sidecar. The only kind of sensor you could directly use with the sidecar would be a 5V NPN sensor. Anything else is going to require some sort of extra wiring.

If you're prepared to resign yourself to extra wiring, you could use these optoisolators from Mouser. You'll connect your PNP sensor on one side, through a current limiting resistor, and the signal and ground wires from the sidecar on the other. If you do it correctly, all your interfacing is magically taken care of for you and your sensor will work.

__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

You can run an external circuit to power the 12V sensor and not use the digital sidecar power. You will then need to attach a pull down resistor between the signal going into the sidecar and ground. See the pull down resister configuration in http://en.wikipedia.org/wiki/Pull-up_resistor for more information on what I am talking about. The sidecar is simply an IO interface to the 9403 module. Thus the data sheet here http://www.ni.com/pdf/manuals/374069e.pdf will tell you that you the module is protected for up to +- 30 Volts. The AB photo sensors (npn) available from FIRST Choice will feed 12 volts signal into the digital sidecar and I have not heard of any teams having any problems with them, so I think you will be fine feeding a 12V signal to your digital sidecar. In fact, we are currently using a 12 volt PNP prox using the configuration I just described. I would like to comment though, if you use a 12V sensor and your battery voltage drops below 12V, the sensor will turn off. Also, you need to make sure not to have your pull down resistor (a custom circuit) off of the same breaker powering the sensor, as this would be a violation of R47.

You can run an external circuit to power the 12V sensor and not use the digital sidecar power. You will then need to attach a pull down resistor between the signal going into the sidecar and ground. See the pull down resister configuration in http://en.wikipedia.org/wiki/Pull-up_resistor for more information on what I am talking about. The sidecar is simply an IO interface to the 9403 module. Thus the data sheet here http://www.ni.com/pdf/manuals/374069e.pdf will tell you that you the module is protected for up to +- 30 Volts.

There is a 10k resistor from each DIO signal pin to the Digital Sidecar's 5V supply. Connecting 12V to that pin is not recommended.

Quote:

The AB photo sensors (npn) available from FIRST Choice will feed 12 volts signal into the digital sidecar and I have not heard of any teams having any problems with them, so I think you will be fine feeding a 12V signal to your digital sidecar.

The NPN sensors do not source any voltage at all, much less 12 volts. They are the equivalent of a simple switch that is either open-circuit or closed to the power return (ground). That's basically what the Digital Sidecar was designed to connect to.

Quote:

In fact, we are currently using a 12 volt PNP prox using the configuration I just described. I would like to comment though, if you use a 12V sensor and your battery voltage drops below 12V, the sensor will turn off.

The 12V optical sensors provided in the 2011 Kit of Parts will work down to at least 10.5V. Some nominally 12V sensors are spec'd to function at 9V.

Quote:

Also, you need to make sure not to have your pull down resistor (a custom circuit) off of the same breaker powering the sensor, as this would be a violation of R47.

Can you explain why you believe <R47> applies to a pull-down resistor in a custom circuit?

Jeff,
As others have pointed out, the PNP version is difficult to interface. It is meant to drive a secondary device such as a light or relay. You could use it to turn on an external NPN transistor through a resistor. The collector of the NPN device then can be used to pull the input to the DSC low. In most cases, I would recommend that this device be replaced with a NPN output device to prevent any possible damage to the DSC by inadvertently connecting it directly to the DSC.

__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJwww.wildstang.org
________________________
Robot is bagged, checkoff item 1 on the list. Now to practice. What are we recycling again?

"The NPN sensors do not source any voltage at all, much less 12 volts. They are the equivalent of a simple switch that is either open-circuit or closed to the power return (ground). That's basically what the Digital Sidecar was designed to connect to."

True

"The 12V optical sensors provided in the 2011 Kit of Parts will work down to at least 10.5V. Some nominally 12V sensors are spec'd to function at 9V."

Also true, but based on the original post I was assuming the sensor required above 12V to operate. Even down in the 10V operating range can still cause problems in a match when you are pulling significant enough current to drop the battery voltage below 10V.

"Can you explain why you believe <R47> applies to a pull-down resistor in a custom circuit?"

I am actually am only assuming that it is a custom circuit. I can not find anywhere in the rules where a custom circuit is defined. As I see it, the resistor would creating a circuit. Since I calculated the resistor value to use, I designed said circuit, making it "custom". Thus, why I assumed it would be a custom circuit."

I would agree with Al. The best options are to either find an NPN sensor or wire the PNP sensor through a NPN transistor before connecting it to the DS.

We have a PNP optical sensor (spec sheet, manual) that for several reasons (time, money, size of the hole we need to drill) is really our only option. As I understand it, we need to A - wire directly to the PDB and B - use a pulldown resistor in between the signal on the sensor and the ground, and C - wire it through another NPN switch to make it work?

__________________Research is what Iím doing when I donít know what Iím doing.

Yes NPN outputs are a lot easier and preferred. But if you really need to use the PNP device you have two main problems that need to be addressed.

1. The device you quoted requires 12 volt power and the DSC only supplies 5 volts.. You need to wire a separate 12 volt circuit to power it.

2. The output from the device you want to use is active high with 12 volt logic. You will need some method of getting the input to the right voltage. An opto-isolator is the method normally used in industry. But you may also be able to use a resistor divider network to drop the output voltage to 5 volts. The lower leg of the divider should also act to pull the I/O low when your output is not on.

I would try a resistor network with about 350 ohms between the output of your sensor and the input of the DSC, and then another approximately 250 ohm resistor between the DSC input and ground. I have not tested this, but I think it should get you in the input range you need and limit your signal current to 20 or so milliamps. Any one else see a mistake here?

Yes NPN outputs are a lot easier and preferred. But if you really need to use the PNP device you have two main problems that need to be addressed.

1. The device you quoted requires 12 volt power and the DSC only supplies 5 volts.. You need to wire a separate 12 volt circuit to power it.

2. The output from the device you want to use is active high with 12 volt logic. You will need some method of getting the input to the right voltage. An opto-isolator is the method normally used in industry. But you may also be able to use a resistor divider network to drop the output voltage to 5 volts. The lower leg of the divider should also act to pull the I/O low when your output is not on.

I would try a resistor network with about 350 ohms between the output of your sensor and the input of the DSC, and then another approximately 250 ohm resistor between the DSC input and ground. I have not tested this, but I think it should get you in the input range you need and limit your signal current to 20 or so milliamps. Any one else see a mistake here?

That set up will pull the signal pin down to ~0.1V, which should be far enough for it to switch. Your sidecar wouldn't like you if you ever lost the lower leg while the sensor was on, but it should work.

__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

That set up will pull the signal pin down to ~0.1V, which should be far enough for it to switch. Your sidecar wouldn't like you if you ever lost the lower leg while the sensor was on, but it should work.

I agree. An opto-isolator is the correct way to do this interface. Using a resistor divider is a work around with some disadvantages. Inputs over 5 volts should be avoided on the DSC inputs. Hopefully, having a 350 ohm resistor in series with the 12 volt signal would limit the current enough to reduce the chance of damage even if the lower resistor came undone, But there is no guarantee.

Bottom line, use an opto-isolator if you can. Better yet, whenever possible use NPN output sensors that are active low so that they can connect directly to the DSC without any modifications.