Priority charge/discharge of 2 batteries design  - Page 1
Forum section: electronics / beginners

author: Nolv
author_rank: Newbie
timestamp: June 22, 2023, 12:29:03 pm
content: I'm working on a project around SBC(Single Board Computer) that is powered by a replaceable battery pack(bp) to which he can be both load and charger.To avoid SBC restarting during pack replacement I want to add a reserve power source that is gonna be active during either pack replacement or out-of-battery scenarios.But I also want to define charge and discharge priority: 1st to charge is an emergency bp; 1st to discharge is the main bp.I wasn't been able to find any ICs that do exactly what I want, so I decided to split charge and discharge into 2 different channels delimited by diodes.To implement discharge priority I use the simple 2i1o priority power mux: TPS2121RUXR.But can't really compose a schematic for the charge priority.The best idea that I have looks something like this, but something seems off to meCan you check whether anything wrong with my idea or propose a better one?

author: Nolv
author_rank: Newbie
timestamp: June 22, 2023, 01:29:06 pm
content: For some reason I haven't thought of relay, it looks much simpler. But I bet you, people, have better ideas

author: bc546kkkk
author_rank: Newbie
timestamp: June 22, 2023, 03:32:27 pm
content: Wouldn't it be simpler and smaller if you just build two chargers on the board with control pins connected to some small MCU, which will read voltages and decide what to charge and what not? And an LED to indicate state of batteries and DC to the user ?

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 22, 2023, 06:08:27 pm
content: Easy with comparators and/or some TTL/CMOS logic!But being sincere, the cheapest mcu will be able to do this, avoiding the complex circuitry and allowing lots of flexibility.

author: Nolv
author_rank: Newbie
timestamp: June 23, 2023, 11:27:59 am
content: I thought using MCU just for charging is overkill compared to a simple relay.Btw do you suggest keeping the discharge part the same and using MCU for charging?

author: beanflying
author_rank: Super Contributor
timestamp: June 23, 2023, 11:32:44 am
content: Take a look at this and consider not replacing the packs but keeping them charged. I have been meaning to have a play with one of these and a 6V Solar panel but I haven't got around to it yet. Otherwise they are a nice solution and work much better than any power bank based solution that tend to shutdown if you use sleep or low power.

author: ArdWar
author_rank: Frequent Contributor
timestamp: June 23, 2023, 11:41:31 am
content: Most BMS IC (even as simple as DW01) have overcharge and overdischarge output pin. You can implement priority charge and discharge using combinatorial logic with those inputs.

author: mariush
author_rank: Super Contributor
timestamp: June 23, 2023, 11:43:44 am
content: You could use some ideal diodes to auto switch between input voltage and battery when an external power supply is inserted. This way you would be able to disconnect the battery and the device would continue to run from DC In.Alternatively you could just have a slide switch or something that creates a connection between input voltage and battery output allowing you to remove the battery (but you'll then need some diode or ideal diode on battery output for protection, to not push higher voltage into the batteryThere's charger ICs which can charge a battery pack while passing through input voltage, or the voltage used to charge the battery (ex 4.2v)For example MCP73871 can charge a lithium battery while also passing through power and when power is removed, it switches to output power from the battery.MPS (monolithic power systems) also has a bunch of charger ICs, have a look here :https://monolithicpower.com/en/products/battery-management/chargers.html