I’m trying to switch 12 V (max 30 mA) with a signal from a MCU that I’d prefer to be active low (so the output voltage is 12V when the control signal is 0 V, and 0 V when the control signal is 5 V).
Since I have plenty of bipolar transistors at hand, I’m looking for a solution using bipolar transistors. For an active high signal, I found an answer on this site which seems to work perfectly, and it seems this can be adapted to an active low signal by adding yet another PNP transistor:
simulate this circuit – Schematic created using CircuitLab
However, 3 transistors for what seems to be a fairly simple problem seems a bit excessive. Is there a better solution?