# Circuit

Consider the following U-Shaped Micro Photoelectric Sensor Panasonic PM-T54P with two PNP Open-Collector Transistor outputs:

I chose the supply voltage to be 12V DC. In the place of the two loads I want to place two voltage meters (to be more precise the NI 9401), which can endure a maximum voltage of 5V DC.

After some calculations, I came up with the following first schematic for Output 1 (the one for output 2 is identical, so I leave it out):

simulate this circuit – Schematic created using CircuitLab

Some explanations:

• The connection to ground at the pull-down resistor R_GND is supposed to prevent a floating input into the NI 9401.
It should be possible to get a switch into the schematic between V_A and V_In, which physically opens or closes the connection, but I did not know how to do this.
• The resistance R_NI is supposed to limit the current into the NI 9401 to less than 250uA in case the circuit is compromised and the resistors R_A and R_GND are bridged, so that R_NI alone has to deal with the full 12V of V_A.

# Questions

1. Do I really need the connection to ground at R_GND? Can one tell from the internal circuit on the I/O circuit diagram if e.g. Output 1 will float or will have 0V if the transistor Tr1 is non-conducting?

2. Let's assume that V_A rises due to a control error of the user up to 30V, but I still want exactly my 12V at V_In.
Could I accomplish this task with a 12V Zener-Diode between V_A and V_In as shown in the circuit below?

3. Finally I want an additional protection for V_Out, which should be capped at exactly 4.7V independently of what happens before it.
Could I accomplish this task with a 4.7V Zener-Diode between R_NI and V_Out as shown in the circuit below?

This is my draft for both question 2 and 3:

simulate this circuit

And here is the result for a DC Sweep of V_In between V_In = 0V and V_In = 30V. It seems to be OK, right?

# Update

Now it states here that the input impedance of the NI 9401 is 47kOhm, so I tried to create a new schematic accordingly, based on the remarks from Bruce Abbott and rioraxe. Would that be correct?

simulate this circuit

Here's the result:

• I don't feel like reading through all this. – 12Lappie Feb 1 '17 at 20:32
• We're not sure if you are asking the right questions since the design requirements, all the fault conditions and test requirements are not clear. IT is a simple voltage switch with uncertainty on layout EMI problems and noise immunity needed. There is insufficient clarity need to define what is needed for all environments and possible fault conditions and all Input/function/output and environmental stresses and fault requirements ought to be summarized. – Sunnyskyguy EE75 Feb 1 '17 at 20:42
• the Panasonic sensor provides redundant complementary switched low impedance outputs for Dark and light sensing operating over a wide range of 5 ~24V. Why introduce another supply of 10 15 to 24V with such uncertainty unless it could not be avoided, then introduce a messy diode resistor circuit that raises the resistance and thus lowers the immunity to noise? i.e. why not use 5v low impedance switches and redundancy? – Sunnyskyguy EE75 Feb 1 '17 at 20:52
• "to be more precise the NI 9401" - The NI 9401 has TTL level digital inputs, with input current specified at +-250uA between 0V and 4.5V. If that really is what you have then I suspect it may need much lower driving impedance than 100k (250uA*100k = 25V!). – Bruce Abbott Feb 2 '17 at 2:44
• @BruceAbbott Thank you for the comment. Unfortunately I have never worked with sensors before, so I am in the dark about most stuff such as TTL and Digital Inputs. I created a new Update section to my question, could you please check if the circuit and its results make more sense now? Also, are the +-250uA input current maximal levels or should I try to provide a constant level of e.g. +250uA in the whole operational range between 0V und 4.5V? – Discbrake Feb 2 '17 at 8:49

• Looking up the NI 9401 Datasheet, on page 5: Input current $\pm$250 uA. What that means is that within the input voltage range of 0 to 4.5V, the NI 9401 input can source or sink up to 250uA. So the worst case calculation for the pull down would be when the input is sourcing 250uA, it must be of low enough resistance to pull the voltage to below certain threshold which was chosen to be 0.4V. The NI 9401 does not care how much current the resistor sinks when the output from the sensor is at 5V. – rioraxe Apr 11 '17 at 0:15