Electrical – Switching Relay with NPN and PNP transistors


I'm designing a locker system using Arduino.
Due to system requirement, two IOs will be used control the relay, and only when two IOs are ON, then the relay will be triggered.

  • PNP = BC807
  • NPN = BC817
  • Coil = 720 ohm, 20 mA
  • Diode = 1N4148

My question is will PNP be switched on/off reliably?
Any risk to consider here?

Any suggestions are welcome.

design draft

Best Answer

If you're using Arduino to control the coil, why are you trying to implement a logical AND with BJTs?

Just keep the NPN transistor and write

if(A && B) digitalWrite(pin, HIGH);
else digitalWrite(pin, LOW);

in your code. A and B should correspond to the activation conditions of the IO pins in your original schematic.