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.
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.
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.
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.
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.
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.
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.
“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?
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.
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.
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.
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.
connect a 10kOhm, 1/4W resistor from the Base to the Emitter
connect a 100kOhm, 1/4W resistor from the Base to the output of your sensor
connect the Collector to the Digital Sidecar input pin, “Sig”
connect the “-” pin of the Digital Sidecar input to the Emmiter and the 0V of your sensor
It would be best to install the transistor and resistors on a small piece of “proto-board”.
You do not need to use exactly the one shown above if you cannot wait for the shipping and you can find an electronics shop in town. You will need an NPN with Vce > 30V and hfe > 15. I selected one that has a much higher current rating so that it would be physically larger so it would be easier to work with. Do watch out that the metal tab does not short to anything by wrapping it with electrical tape or heatshrink tubing.