Electronic – Switch between 2 power supply feeds without device losing power

mainspower supplyswitches

I have done a search on here but didn't find the answer (maybe "woods for the trees") but here goes…

A brief 'background' — In my house, there's a switch by my front door that turns on/off the outside light above the door. The wiring is obviously cemented in place and has been for 15+ years that I know of… Where the light is, there's a round junction box of sorts, wiring is buried in solid walls etc so, for now at least, re-wiring is NOT an option. The oddity is that, there is 2 feeds at this point – and they are the opposite of each other. 1 is connected to the exterior light, the other is connected to nothing. When the Light is ON, the other feed is off, when the light is OFF, the other feed is ON. I've no idea why!

Anyways, this is the only feasible external power supply point to use for a CCTV camera being fitted (2 actually, Using MotionEyeOS – a Raspberry Pi OS for using a Pi as a CCTV system).

What I had done as a temporary measure, was I wired in 2 sockets, and simply plugged in a 5v USB plug in each. They then joined via a USB Y cable, and connected to a PowerBank device that is capable of charging whilst simultaneously powering 2 connected devices to a max of 3.1A (1 USB Port is 2.1A, the 2nd is 1A) – and then the Raspberry (x2) were connected to the powerbank. This worked nicely for some time, but of course, due to the power consumption of the 2x Raspberry's, it's power eventually depletes quicker than it can charge.

This brings me to my questionhow can I wire these sockets (is there something I can buy?, or do I need to make a circuit?) so that the power to the Raspberry Pi's is not cut momentarily when turning the light on and off? – In other words, How can I keep the 2x Raspberry Pi's powered when the switch is turned on or off? (and the power switches from one feed to another)

Note: Total power usage would be 5v x 2, and 2.5A max x 2 (So 5v, 5A max)

I realise the power loss would be something like a nano second, but I imagine it still has potential to lead to untold issues!?

Best Answer

It sounds like someone installed a "double throw" switch. (aka three way switch)

two pole switch

Consider the circuit on the right. The red light is the one connected to your exterior light. And the other wire connected to the green light (in the image) is the extra circuit that goes nowhere.

What I would do is disconnect the wire on the switch that goes to the green light (the one that goes nowhere) and connect it to the power feeding the switch. (the left side of the switch) You then would have continuous power on that line regardless of the switch position. This would be a lot simpler than trying to cobble something together as you described above. While it is an option I would prefer the simpler approach.