Need some guidance on main/battery solution

I have some questions about how to power a project through main if available, and rechargeable batteries when disconnected from the main. In a nutshell, lets say I want to power some ws2812B RGB Leds (24 LED Ring) for about an 1-2+hours using NIMH batteries, and otherwise use a 5V 3A (or 12V 3A adapter with step-down buck converter to get 5V since I have many) adapter when the batteries run out or are not needed.

I attached an image with 2 possible solutions, but not sure they would work.

Solution A would have the 5V adapter simultaneously power a battery charger, the nano, and RGB leds. If the main was disconnected the batteries would power the 5V pin on the nano and leds.

Solution B would have the 5V adapter power the battery charger only if needed, otherwise the batteries would power everything else. (Probably not a good solution using batteries as they're charging)

Any advice on either of these methods or a better solution to do this? The plan is to use a pro micro later that controls the RGB leds and does other things like goes into sleep mode after a certain amount of time and other things. The battery charger module would be something like this: https://www.aliexpress.com/i/4000557338699.html

Nice concept drawing but lacking lots of details, a detailed schematic would be much better. Your link is useless, it shows two different type of batteries but no technical information. Post links that give technical information on the hardware items. Your source and others like azon are sales without any real technical information. Two other questions how much current is this going to draw and how long do the batteries need to last. It appears you have a solution looking for a problem.

I'm mainly trying to figure out the best method from switching between adapter power and battery power, so don't get hung up on the details, and assume there will be enough current/voltage to power the LEDS or whatever. I can worry about the details later.

Does "A" make sense in powering the Arduino if both the batteries and main are connected to the 5V pin? Will the batteries being charged while they are powering the Arduino be a problem? OR does "B" make more sense in the order everything is connected?

Sorry but the details do matter! You can use a relay or diodes or ???

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