How to build a 2 input AND gate 24VDC PNP inputs and 24VDC output

digital-logicdiodes

I'm trying to build an AND gate that takes two inputs from standard 3 wire 24VDC PNP sensors and provides a 24VDC output.

I was thinking using some sort of diode resistor logic (link to circuit: http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/diodgate.html). However, I can't get this to work because when the sensors are off, the output of the sensor does not pull the inputs of the gate to ground.

What is the best / simplest way to to this?

Best Answer

One possibility, it could be that you could get away with simply using a very low pull down and a relatively high pullup, but the below will definitely work.

schematic

simulate this circuit – Schematic created using CircuitLab