I have an inverter, a battery bank, a PWM solar controller, and some solar panels. The inverter also supports charging the batteries from the mains power. So if I just plug the inverter into a wall socket, it will charge the batteries. My requirement is that I want the batteries to charge BOTH from the inverter and solar panels (not necessarily at the same time).

My first idea was to just connect both the inverter and solar controller to the battery, like this:

batteries connected to solar controller and inverter at the same time

The problem I see with this setup is that this might confuse the inverter when it sees the battery voltage going up and down as the solar controller tries to charge it. Or, would it damage the inverter as it expects a voltage below 26V from the battery, and yet the solar controller charges it at, say, 29V? Is this a valid concern?

Another approach I can think of would be to use a DPCO changeover switch to change whether the inverter is connected to the battery terminals or to the backend of the solar controller:

Inverter connecting to battery and solar controller through a changeover switch

I could set it to the P1 position when I want to charge the batteries from solar, AND/OR when I want to draw current from the inverter.

I could set it to the P2 position when I want to charge the batteries from the inverter.

Is this an overkill, or should I stick to the first approach? Or is there a better way to implement this?

Ps- I live in a country where access to high power diodes is very limited :)

  • \$\begingroup\$ Could you just keep the battery in parallel to the connection between the controller and the inverter so it float charges? I assume the solar controller regulates the voltage pretty well. \$\endgroup\$
    – forest
    Commented Apr 16, 2022 at 0:46
  • \$\begingroup\$ Not sure, are you suggesting the same thing as in my first wiring diagram? \$\endgroup\$
    – Davcroo
    Commented Apr 16, 2022 at 10:59
  • \$\begingroup\$ "I live in a country where access to high power diodes is very limited" Digikey, Mouser, RS and Farnell all sell whatever diode you need and ships it to any location in the world. \$\endgroup\$
    – winny
    Commented Jan 20, 2023 at 8:13

3 Answers 3


You can try direct connection. It's unlikely to damage anything. But you shouldn't expect it to work.

Charge voltage on the battery could easily be 29V. If the inverter can't handle being connected to a battery, you were cheated. Apparent battery voltage can easily go negative. (because of wire inductance). If something gets damaged because of negative battery voltage, you were cheated.

Neither device is required to work at negative battery voltage: it just shouldn't get damaged.

But it may not work anyway.

Charge controllers measure the battery voltage to determine the state of charge and charge current. But PWM charge controllers can pulse the battery voltage several volts on a 24V system. And your inverter may also be using PWM for its battery charger.

It's like trying to push on a swing when somebody is swinging on it, and somebody else is pushing it, when all you can see is where the swing was a little while ago, and not even which direction it was going at the time.

Your two charge devices may see a low battery voltage, both start charging, drive the voltage up to 32V, drop the charge current down to zero, see the battery voltage collapse to 10V, start over again as the voltage recovers to 12V, and drive it up to 32V again. Over and Over.

Or your battery bank may be so large that neither controller can have much effect on the battery voltage, and your charge wiring may be divided enough so that controllers aren't confused by inductive spike or wiring voltage, and the switching frequencies and sense frequencies may be far enough apart, and the control algorithms stable enough, and it all may just work perfectly.

  • \$\begingroup\$ This is exactly what is happening in my setup. Inverter and solar charge controller compete with each other and keep bumping up the battery voltage from 26.5V(when it was only being charged with solar) to 28.5-28.6V within ~20 minutes. Then, Both of them cut off and I think battery does not get charged anymore. (Solar charge controller indicates 0A out to battery and charge led on inverter turns off). \$\endgroup\$
    – Ishan Jain
    Commented Aug 17, 2022 at 12:19
  • \$\begingroup\$ The only solution I found was to connect inverter with the phase in/out terminals on the charge controller. Then charge controller can control when inverter will get power using either "solar presence" or battery voltage but both of them are not ideal since there could be solar but panels are just not generating enough power and battery voltage values have to be set carefully because there will be a problem if solar panels didn't generate enough power during the day and there is a power cut at night. :/ This is very frustrating. \$\endgroup\$
    – Ishan Jain
    Commented Aug 17, 2022 at 12:22

This is an issue with MPPT especially when you are charging from two or more sources on a very sunny day, with a PWM the current coming from the array will be step down so low while the inverters inbuilt charger is doing it's work and contributing a larger part of the charging current, please note. If you put a very high charging current to a battery bank the battery will just simply full and stop charging without getting anywhere close full and this can be deceiving.


Why endanger your batteries with both source of power charging at a go?(solar/battery charger)I would rather deploy a timer switch and a contactor to mitigate in between the two charges, one timer switch and contactor, switched on (Automatic)during the day when there is sunlight Whiles the other during the night when there is no sunlight(AC Source), in order to minimize your Ac usage, increase your solar panel in accordance with your Mppt or PWM for fast charging of battery, A huge capacity Storage base is also necessary for longer usage of stored power🔋💪🏿



New contributor
Frank Afriyie Agyemang is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • \$\begingroup\$ Welcome. That’s an 82 word sentence. Can you try to clear it up with periods and sentence structure? \$\endgroup\$
    – winny
    Commented Jun 16 at 6:07
  • \$\begingroup\$ Per your diagrams is the inverter been source from the grid(wall outlet 220) Or The inverter converted A C power? \$\endgroup\$ Commented Jun 16 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.