switch buttom from power USB and DC Extaernal Adapter?

Hi, I have a project that could be feed power with usb and dc external Adapter.

How can i add a switch to decide which source of power to use?

could not find any example of this. its possible?

What is your level of experience in electronics, soldering and working with SMT boards and part?

Yes use a single pole double throw (SPDT) switch and switch the + with the grounds connected. If you are using an Arduino UNO or similar just plug it in and remove the unwanted, the switchover is automatic. Typically the external adapter (5V or greater) takes precedence over the USB because of hardware design and a diode. If your external adapter is over 5 volts it should be at least 7.5 and plugged into the barrel connector.

aarg:
What is your level of experience in electronics, soldering and working with SMT boards and part?

Pretty basic, is my first project with an arduino uno.

gilshultz:
Yes use a single pole double throw (SPDT) switch and switch the + with the grounds connected. If you are using an Arduino UNO or similar just plug it in and remove the unwanted, the switchover is automatic. Typically the external adapter (5V or greater) takes precedence over the USB because of hardware design and a diode. If your external adapter is over 5 volts it should be at least 7.5 and plugged into the barrel connector.

Yes Im using an Arduino Uno... and my idea is that use the USB port with a battery holder so the project is portable and can work when there is no chance to plug the dc adapter.
But when I can use the DC Adapter I want to be sure that the USB port with the batteries will be bypassed.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.