I'm working on a project with 2 batteries: main and aux. The device they're connected two can be both load or charger (depending on whether it's plugged into the wall).

So the PCB must implement both priority charge and discharge. (main battery should be discharged first and charged last)

Since I haven't found any ICs that do this stuff, I've decided to split the charge and discharge lines into two separate ones. Discharge priority is gonna be controlled by TPS2121RUXR. But I'm having trouble designing the charge part. The best I came up with is to place a not gate on the negative terminal of aux, thus when it is finished charging the not_gate will open the diode to charge the main battery.

Can you suggest me better ways to implement this whole PCB? Some folks suggested using a single MCU and a bunch of diodes to control the operation, but as a noobie, I have a feeling that MCU is overkill here

For context: both batteries have their own BMS and consist of 2 high-drain 3.7V cells, so the output might be up to 30W. And another thing to consider is that it's a portable device with uptime of up to 12H, so power efficiency is crucial.

  • \$\begingroup\$ If you discharge the main battery and switch to battery 2, then if you only charge the main battery last you will have 2 flat batteries, no working device and you have to wait for the main battery to charge... \$\endgroup\$
    – Solar Mike
    Jul 18 at 11:58

1 Answer 1


Your design approach seems like a reasonable starting point. The TPS2121 power mux IC is a good choice for handling the discharge priority, due to its built-in power path selection. As for the charging part, it can be a bit tricky since the auxiliary battery needs to stop charging before the main one starts.

Instead of using a NOT gate on the negative terminal, consider using a dual comparator IC with a couple of voltage dividers to sense the battery levels. This would give you a digital high/low signal for each battery, which can be used to control a couple of P-channel MOSFETs that enable or disable the charging path to each battery.

Here's how the circuit could work: -The voltage dividers take a sample of each battery's voltage. This sample is a fraction of the actual battery voltage, set by the resistors' values. -The comparators compare these voltages to a reference voltage. When a battery's voltage is less than the reference voltage, the comparator's output goes high, and vice versa. -If the output of the comparator corresponding to the auxiliary battery is high (i.e., the auxiliary battery needs charging), it turns on the MOSFET that controls the charging path to the auxiliary battery, and charging begins. -Once the auxiliary battery is charged (its voltage equals or exceeds the reference voltage), the comparator output goes low, turning off the MOSFET, and charging stops. -Simultaneously, if the main battery needs charging (its comparator output is high), its MOSFET is turned on, and charging begins. If the main battery is already charged, its comparator output is low, and the MOSFET is off. -Since the auxiliary battery's comparator output is low when it's fully charged, this could trigger the charging process for the main battery.

You would need to make sure the reference voltages are set correctly and the logic is as expected. For more precise control, you may need to consider a microcontroller (MCU) based solution in the future, but for a simple priority charging circuit, the comparator approach can be a good starting point.

Remember, the success of the design greatly depends on the correct sizing and selection of components. Always simulate your circuits before prototyping, and then validate your prototypes with careful testing.


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.