Hey everyone, I'm trying to figure out a setup for my LED strip that allows it to run on either a battery or a wall outlet. The ideal scenario is that the LED strip should operate on battery power when there's no outlet connection, but shift to outlet power when plugged in. I've had no luck finding clear answers online, so I'm hoping someone here could offer some advice!
2 Answers
It really depends on how deep you want to get with this. If you look up "pmic oring controller battery backup" on Google, you’ll find a bunch of interesting options for managing your power sources effectively. This might lead you to something more complex, but potentially better tailored for your needs.
One straightforward approach is to use a small relay that matches the voltage of your LED strip. You’d connect the relay’s coil to the power supply, so it gets powered when you plug in the outlet. Then, connect the LED strip to the common contacts. The output from the wall power goes to the normally open terminals, and your battery (or a voltage regulator if needed) goes to the normally closed contacts. This way, whenever the outlet is connected, the relay will switch over to use that power instead. You could also add a battery charger connected to the power supply to keep your battery charged while it's plugged in. It’s a simple, effective setup with minimal components!

You might find it even easier to do this with just a diode in series with the battery and the mains power supply. That way, you won't have to deal with a relay, and it simplifies the whole setup.