Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are building a system that needs to have 2 kinds of USB Switch: one momentary (normally closed) and another that is not momentary (like this). We are thinking about doing something like this:


simulate this circuit – Schematic created using CircuitLab

where SW2 will be used as a normally closed switch, R1 will have some value just to avoid short cuircuits and M1 will be a MOSFET, not sure what (we don't really have an electronics background, it's just to complement an embedded systems course project). Before the USB female VCC we are thinking in putting a LED (perhaps). I don't know if I got the MOSFET pins right, but the idea it's this:

  • If SW1 it's open, nothing goes to USB-F
  • If SW1 it's closed and SW2 it's open, then we "short-wire" the VCCs
  • If SW1 it's closed and SW2 it's open, then it's logic 0 in the MOSFET which will make that nothing goes to USB-F.

Now here are some questions:

  1. Is there any better way to do it?
  2. Do you see any problem with this system?
  3. What happens if SW1 it's open and we close SW2?
  4. Can SW1 and SW2 be those simple switches that only have rating of 20-50mA? I'm a little worried about that because this sources can give up to 2A and I don't know if all of those amps pass through the switches (even if the mosfet requires low power).
share|improve this question
I cringe when I see a Vcc shorted to ground (100 ohm resistor not withstanding). I'm not exactly sure what you want to achieve here - two momentary push buttons to "toggle" the USB power line on/off? – Ron J. Jun 19 '13 at 14:31
@RonJ. the description could be better, I want 2 switches, one to act like a ON/OFF (not momentary) - SW1 - and another that, when the SW1 is closed, can act like a momentary RESET (similar to the ones that we found in Arduinos), but in this case cuts the VCC momentaniously. – rnunes Jun 19 '13 at 14:47
What effect do you want to achieve?? – Wouter van Ooijen Jun 19 '13 at 17:24



simulate this circuit – Schematic created using CircuitLab

The switches don't carry any signifigant current. Closing either of them turns off the output, at the cost of 50uA current from the source (trivial unless you're trying to run off a small battery for a long time).

I've not done the work of picking a suitable P-channel MOSFET. You should choose one with a low Rdson.

share|improve this answer
My go-to P-type MOSFET for small voltages / currents is the FDN340P, 110 milliOhm at 2.5 Volts Vgs, rated for 2 Amps. They're $3.61 with free shipping for 50 units on eBay. – Anindo Ghosh Jun 19 '13 at 15:51

Something as simple as this? SW1 (normally closed, momentary open) and SW2 toggle switch. When SW1 is un-pushed and SW2 is ON - power flows. When either switch is used, power is disconnected. And nothing is shorted out. Note that the Arduino doesn't "short" out Vcc to reset, it has a reset pin that is taken LOW to initiate reset.


simulate this circuit – Schematic created using CircuitLab

share|improve this answer
we we're trying to avoid solutions like that because that will make the cost higher (the cost it's evaluated here too and we might want to sell it after the project is done). With that system we need to have one NC switch and another switch that have 2A or higher DC rating, and they're not cheaper that the others (at least that's what our searches lead us to) – rnunes Jun 19 '13 at 15:08

protected by W5VO Jun 19 '13 at 15:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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