# PNP high-side switching with logic reverse

I am trying to design a High side switch(24V,10A) using a PNP Transistor, the switch control signal is PNP or NPN from the PLC output.

How to select the control signal type (NPN or PNP) using a selectable switch?

• "... the switch control signal is PNP or NPN from the PLC output." It's got to be one or the other. Which is it? Or are you asking how to make it switch selectable? "How to select the control signal type (NPN or PNP) using a button?" You probably mean a switch. A button will change state when you release it. Does it matter if the output is inverted logic (something that is fixable in the PLC code)? Commented May 25, 2021 at 18:43
• @Transistor , Sorry, I edited the question, it should be selectable using a switch. Commented May 25, 2021 at 18:48
• All transistor types invert as switches ! Mind the power dissipation. Commented May 25, 2021 at 20:15

simulate this circuit – Schematic created using CircuitLab

Figure 1. Here's the general idea using a MOSFET.

• For PNP output Q1 is held on by R1. Q1 will turn off when Q2 (the PLC output) turns on.
• For NPN output Q3 is held off by R4. Q3 will turn on when Q4 (the PLC output) turns on.

simulate this circuit

Figure 2. With the addition of an external opto-isolator both PNP and NPN modes become non-inverting.

The application seems a bit daft as with a second pole on the switch the load could be switched to operate as shown in Figure 3.

simulate this circuit

Figure 3. No-nonsense solution using DPDT switch.

• Might be helpful to the OP to show how a DPDT switch could invert the logic for you so you wouldn't have to modify the PLC code for the two cases. Commented May 25, 2021 at 19:15
• Go ahead, @ErikR. I think I've done enough. Commented May 25, 2021 at 19:20
• Thank very much, the application is to switch high current loads using PLC. I will try it. Commented May 25, 2021 at 19:39
• Why aren't you using a relay or SSR? Commented May 25, 2021 at 19:50
• @Transistor Because the relay and SSR are expensive. Commented May 26, 2021 at 5:32