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?

  • \$\begingroup\$ No pull to ground = RTL. \$\endgroup\$ Jun 29 '15 at 14:01
  • \$\begingroup\$ Can't you just add pulldowns? \$\endgroup\$ Jun 29 '15 at 14:03
  • \$\begingroup\$ I tried to simulate with a pull-down but it doesn't seem to work: <partsim.com/simulator/#33536> \$\endgroup\$
    – vg425
    Jun 29 '15 at 14:19
  • \$\begingroup\$ What kind of an output is required? PNP also? or NPN? \$\endgroup\$ Jun 29 '15 at 14:23
  • \$\begingroup\$ The output should be PNP. \$\endgroup\$
    – vg425
    Jun 29 '15 at 14:31

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.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ One issue I have is I have a very small amount of room for the circuit so it would be nice to simply be able to add a pull down resistor. However, when I simulated this, it did not seem to work. \$\endgroup\$
    – vg425
    Jun 29 '15 at 15:17
  • \$\begingroup\$ Your sim used a high pull down compared to pullup. It has to be opposite, but it may not be reliable. \$\endgroup\$ Jun 29 '15 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.