I'm designing and building a breadboard power supply for myself, which draws power from an ATX-like SMPS (Mains in, single Molex plug out) via a 4-pin Molex connector. The design includes a switch to select either 12V or 5V output, but the only appropriate switch I can source is rated for a paltry 30mA!

Obviously I can't switch up to 2A with a 30mA-rated switch, but what can I do (that's cheaper than the ~$5-10 local vendors want for 2A-rated switches)? I thought of using an NPN transistor (see diagram, below), but in simulations that resulted in an unwanted voltage drop, and having the load connected to both emitters seemed to do weird things to the voltage.


simulate this circuit – Schematic created using CircuitLab

(Note: Q1 & Q2 are generic NPN transistors, I've not considered part specifics yet.)

I thought of perhaps using a MOSFET, but decided that since I really don't know what I'm doing, asking for help was perhaps an even better idea.

  • \$\begingroup\$ I realise the obvious answer here is "use a 2A-rated switch", DigiKey have plenty. The trouble is, DigiKey have considerably high shipping charges; I really have to make do with what's available where I live. \$\endgroup\$
    – Calrion
    Mar 5, 2013 at 9:00
  • \$\begingroup\$ Gah! How did I not see this question when I searched? Still, this seems slightly different in that I'm wanting to switch between two (different voltage) supplies. \$\endgroup\$
    – Calrion
    Mar 5, 2013 at 9:05
  • \$\begingroup\$ I noticed your'e in Brisbane, the following is only $3 jaycar.com.au/productView.asp?ID=ST0300 \$\endgroup\$
    – PeterJ
    Mar 5, 2013 at 9:21
  • 1
    \$\begingroup\$ You are selecting between 5V and 12V. For the 5V a simple diode will do, because it will block when you apply the 12V. For the 12V (and for the diode) you will have to use something that is rated for the current you want to draw, no alternative for that! \$\endgroup\$ Mar 5, 2013 at 11:46
  • \$\begingroup\$ No matter what voltage you supply (which transistor conducts), the current source will only take 2A. The rest of the voltage will be dissipated by the transistor. Did you really mean to draw a current source there? \$\endgroup\$
    – jippie
    Mar 5, 2013 at 18:38

3 Answers 3


To return to your transistor solution (as others have opted for a different mechanical switch), it might look like this. I included Wouter's hint for using a diode instead of the second transistor. Also I changed the bipolar transistor to a MOSFET. Reason for a MOSFET is because the base current of a bipolar transistor gets rather high with regular power transistors. Reason for P-channel high side switching is that this way the load can be attached to ground. If this is not a requirement, the circuit can be slightly changed to support an N-channel MOSFET.

  • D1 should be rated > 2A
  • T1 should be rated Id > 2A (P-MOSFET)


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Thanks! I plan on using the FQP7P06 (datasheet) MOSFET; two of them, to skip the voltage drop of a diode and also get reverse-bias protection for when I… I mean, someone doesn't properly wire the Molex plug. I also realised I wanted a power switch, so plan on putting a DPST across the MOSFET gates. I'm not making a fire-starter, am I? ;) \$\endgroup\$
    – Calrion
    Mar 8, 2013 at 8:24
  • \$\begingroup\$ Sorry, I meant FQP47P06 (datasheet). \$\endgroup\$
    – Calrion
    Mar 8, 2013 at 8:33
  • \$\begingroup\$ What will happen if we do not use a diode in there? \$\endgroup\$
    – quantum231
    Jun 15, 2023 at 1:53

What about a simple mechanical switch, or if you want to control with an MCU or whatever, a relay?


If all else fails, mains power switches for wall mounting are available in any hardware store, usually at much lower prices than that!
For a bench power supply, rugged and maintainable is better than elegant.
Installation is simple but may not match the desired aesthetics...


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