I have a circuit that is currently powered by two 18650s connected in parallel via a TP4056 USB charging and protection module. The circuit uses very low power and therefore it lasts for weeks if not months.

The load is a number of RGB LEDs with some 8h on/16h off timer circuits repurposed from some cheap LED candles creating an effect of the lights being green during the day, turning amber in the late afternoon and then red in the evening before being off overnight. Setting this up involves using the remote that came with the LED candles to start the 8h on period for each timer at the correct time of day. Therefore when the batteries finally die setting it back up is a pain.

What I want to do is add a secondary power supply (made up again of two 18650s in parallel via a TP4056) but in a way so that it only kicks in once the primary power supply has turned off (which is at 2.5v due to the over discharge protection).

Ideally once the secondary power supply has taken over seamlessly a single warning LED would come on to remind me to charge the primary pack at which point it seamlessly takes over again.

I've searched quite extensively and so far only found circuit designs that either allow two independent battery packs to be toggled back and forth depending on which has the highest voltage at the time or are UPS style things where the primary power source is expected to be a constant voltage and cut off entirely, not slowly drop.

Is there a simple IC out there that will take two power sources to power one load but preferring one power source over the other, regardless of voltage? Or can/does this need to be somehow built from discreet components, hopefully with a minimal power consumption and a low parts count if so.

  • \$\begingroup\$ does this need to be somehow built from discreet components <-- yes. \$\endgroup\$
    – Andy aka
    Sep 13, 2022 at 14:34
  • \$\begingroup\$ Consider changing the control circuit to one that does not require you to manually measure several 8-hour intervals. E.g. your favourite Arduino board, with timing from your favourite timing source (a real-time-clock chip, a GPS receiver, Network Time Protocol, WWVB, or the actual amount of sunlight) \$\endgroup\$
    – user253751
    Sep 13, 2022 at 18:40

2 Answers 2


Your need an powerpath controller IC

An powerpath controller has 2 or more voltage inputs, and passes one of hem to the output

For example, take the LTC4418, which has 2.5V t 40V input, and prefers the first power input if it falls within tolerance, otherwise it uses the second input

For finding other IC's that serve this, use a parametric search option on a manufacturers website, such as: https://www.analog.com/en/parametricsearch/11029#/p5573=-500|2&p5574=4.2|80

  • \$\begingroup\$ Very nice! <filler> \$\endgroup\$
    – user253751
    Sep 13, 2022 at 18:51
  • \$\begingroup\$ Interesting, "powerpath controllers" seems to be the phrase I was missing in order to search for, thanks. From a look at the LTC4418 though it seems very complex and requires lots of support components to correctly configure it? Looking at others in the 'LTC' range there seems to be simpler options but I think they have slightly higher acceptable minimum voltages, but they may still be an option. Unfortunatly I've so far struggled to find a good option that is easily available in the UK in small quantities and isn't a hard to use/solder surface mount, etc. I'll keep looking though. \$\endgroup\$
    – Gavin
    Sep 14, 2022 at 13:18
  • \$\begingroup\$ @Gavin Try to use an parametric search function to quickly find chips: analog.com/en/parametricsearch/11029#/… Take for example the LTC4419, which has build in mosfets (but only has a max current rating of 0.5A) \$\endgroup\$
    – Ferrybig
    Sep 14, 2022 at 14:55

This is an XY problem. Your real problem is the arduous reset process.

Instead of "using the remote that came with the LED candles to start the 8h on period for each timer at the correct time of day", program a microcontroller to do that. E.g. any Arduino.

The most convenient source of timing would be a real-time clock (RTC) module (or Arduino shield) - example. These have some inaccuracy* so for long-term stability you could consider connecting the microcontroller to GPS or NTP instead. Otherwise you may have to adjust the clock every now and again. Every RTC has a small battery to keep the clock running even while the circuit is off - this battery should last years.

Then you program it to check the time and turn certain LEDs on and off at certain times.

You could also use the microcontroller's built-in timer to control a 24-hour cycle, but since it doesn't know what time it was turned on, you'd have to start it at a certain time to make the cycle match the real world time. (On the upside, if it drifts too much then resetting it is easy)


* If using an RTC, you might want to Google the chip name and 'drift' and see what other people reported. This link goes to a forum thread where a few people complain about their DS1302's accuracy and suggest the DS3231 is better.

  • \$\begingroup\$ Thanks but this seems a very over the top approach to what, at least to me, sounds like a fairly simple problem that I would have thought would come up in a variety of other applications. My use case is a framed ski resort map with lights that change throughout the day in a similar way to the ski lift status lights on the slipe would do. \$\endgroup\$
    – Gavin
    Sep 14, 2022 at 13:10
  • \$\begingroup\$ If I was to rework this issue while also hopefully simplyfying it I would probably say that the actual issue is that I don't know that the battery is getting low and it needs to be charged. Perhaps I should be looking at a circuit to turn on another light when the voltage drops below a threshold that is still higher than the 2.5v cut off. \$\endgroup\$
    – Gavin
    Sep 14, 2022 at 13:12
  • \$\begingroup\$ @Gavin if you've ever used the Arduino system before then the idea of using one is not really over the top. If you've never used it then I suppose it might seem like that. How is manually setting a bunch of different timers not over-the-top? \$\endgroup\$
    – user253751
    Sep 14, 2022 at 13:35
  • \$\begingroup\$ @Gavin if you're opposed to microcontrollers, and like circuits more, you could perhaps use some kind of timer, a decade counter to count up to 10, and a diode matrix to select which LEDs are turned on in each stage. \$\endgroup\$
    – user253751
    Sep 14, 2022 at 13:51
  • \$\begingroup\$ @Gavin at the very least, maybe you could chain together the timer circuits, so that one starts when another one finishes, and then you could have the starting time happen automatically \$\endgroup\$
    – user253751
    Sep 14, 2022 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.