I am trying to build an off-grid automatic watering system, and I was thinking of many options and the most reliable one that I found is to use a power bank which is charged by a solar panel.
So, I have a solar panel that outputs 5V, and I can charge a standard power bank with it. In addition to this, I bought a USB pump which I can also power with the power bank and controlled using an Arduino board. The problem is that the power bank doesn't support charging and discharging at the same time, and I thought that I could use an Arduino board to control this, but I have no knowledge on this. Therefore, I need help.
Is it possible to have a system like the one sketched below, where the Arduino board controls the input/output of the power bank?
The black path is my current path, but I was wondering if I could do the red path so that I can have both chargings from the solar panel and discharge due to the pump and Arduino board.