# How to connect two power sources to a switch?

I want to operate LED lights using either batteries or an AC/DC adapter wall plug. I have a SPDT switch but I’m not sure how to connect the two power sources to the switch. I might be using the wrong switch, if so what switch do you suggest? The main thing is that the AC power source is never connected to the battery and to have a choice by either operating the led lights by battery or AC/DC wall plug.

• Common the neutrals and then put the positives of the battery and ac adapter to the two terminals of the switch - the ones vertically under the T on your diagram. Either position of your switch and your lights are on : disadvantage there is no off position... Do comsider some fuses somewhere though.... Nov 1, 2017 at 18:38

simulate this circuit – Schematic created using CircuitLab

Figure 1. Wiring the components.

If your LED doesn't have built-in current limiting you will need to add a resistor to limit the current to a safe value.

• Thank you for answering. I’m not sure if the LED strip I have has built-in current limiting. I have a LED strip that draws current 260 mA at 12V DC. The AC/DC adapter has output : 2000 mA max and 12V DC. If I should add a resistor, is this calculation correct? R= V/I = 12V/260mA = 46.15 Ohm.
– A.K
Nov 1, 2017 at 19:49
• No. Look at the strip. You should be able to see the resistors. See an explanation I wrote here. Nov 1, 2017 at 20:38

That switch is probably fine. Just make sure it is the break-before-make type. You don’t want the make-before-break type, where the two switched terminals momentarily connect together while the switch is being operated.

Connent all of the negative wires together.

Connect the LED positive to the common terminal of the switch.

Connect the battery positive to one end switch terminal and the power jack positive to the other.

• That should be "Connect all the negative wires together", not "comment all". Nov 1, 2017 at 18:44
• You missed out fuses that I mentioned... Nov 1, 2017 at 18:55