I'm trying to make a Li-ion battery control circuit. I would like to be able to charge the battery via USB and power the load (at 5V) at the same time.
I know how to make a circuit that disconnects the battery from the load using a MOSFET and powers it only from USB (something like http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf).
However, with this approach (if I understand correctly), plugging a USB cable connected to something that can't supply enough current (eg. 500 mA when 1 A is needed) would still switch off battery power completely.
How can this be avoided? The ideal scenario for me is that in this situation the load is powered from both USB and the battery. If such a circuit is very complicated, simply ignoring the USB power and supplying the requiered current solely from the battery would still be OK. I will be powering a Raspberry Pi, so I would like to avoid a sudden current (or voltage) drop.
I found some load sharing ICs on the Internet, but they are designed to drain equal current from two loads, which might not be the case here.
I hope my question isn't stupid, I'm an electronics newbie :)