I am designing an energy harvesting system from a low power solar panel. I am using the output of the solar panel to power a high efficiency boost converter which charges a single cell Lithium battery as shown in the diagram below. My question is what is the best way to modify my circuit to switch between the solar input and an external 5V supply. Ordinarily I would use a diode in series with each of the supplies to switch between the inputs to the boost converter however given the extreme low power needs of the circuit I may not be able to afford the losses across the diode.
The BQ25504 datasheet says the maximum input voltage at VBAT might be 5.5V. Make sure you don't exceed that and just connect your charger circuitry to the battery in parallel. Battery chargers will have a high output impedance when not powered externally (because they'd otherwise drain the battery), so this will not be a problem.
It might look comfortable to put the 5V supply on the input, but don't: The peak power the BQ25504 will sustain is 400mW, and it's not recommend to charge with more than 300mW flowing through the device (*recommended operation conditions in the datasheet). So, your battery will charge really slow. When you attach 5V, you'll probably just want the battery charged as fast as possible; so invest a couple of cents in one of the hundreds of LiIon Charger ICs and attach that to your battery.