Electronic – arduino – Wiring a switch to toggle both usb power and external power on Arduino

arduinopower supplyswitches

I have a 5v Arduino Pro Micro. I am using it to run a series of motors. I am controlling it through the USB port. The USB power doesn't supply enough current to power the motors, so I am using a 9v external power supply and a series of transistors etc. I want an on/off switch for my project, but I need it to toggle the power for the 9v power supply and the USB connection at the same time. How could I do this?

Best Answer

Used a double-pole toggle switch (DPDT or DPST) - one pole to switch the USB power, and the second to switch the 9 volts.