Solar Load Control

I created a project to control loads attached to my off-grid solar system. The concept is that once your batteries are charged, you turn on devices to use the electricity that would otherwise be lost. Typical uses are pumping water up an elevation or compressing air.

Solar System:
12 Volt
1660 watts in solar panels that produce approx 1300 watts of power during peak time.
8x 6 volt “Golf Cart” batteries
Outback FM80 Charge Controller (1250 watts of panels)
Tracer 40A MPPT Charge Controller (410 watts of panels)
Xantrex PROwatt 2000 Inverter

My objective was to control the inverter that has an air conditioner attached to it to keep my RV cool while I’m not there. Turn on the AC when the batteries are fully charged (13.6v) and turn it off when the batteries are somewhere below resting voltage(12.6v). I’m turning the inverter off below 12.3v which gives it plenty of time to charge up to 12.6v at the end of the day.

There are Low Voltage Disconnect devices made to control this type of behavior but the Xantrex inverter doesn’t start back up when power is re-applied to disconnect circuit. The inverter is turned on by pressing and holding a button until it powers up. This was the behavior I had to emulate with the Arduino. I soldered wires to the remote start button and connected them to an Arduino relay board. The inverter has a USB power output which I used to detect when it responds to the emulated button press. The relay returns to NC when the USB voltage change is detected.

Additional relays are programmed to control a swamp cooler pump and a fan that is used to cool the charge controller and inverter.

The project uses a 3.2" TFT LCD screen that isn’t required for core functionality. It displays current voltages, load states, temp and humidity values. It can also be used to adjust voltage, temp and humidity settings.

Project source code is attached for anybody that is interested.

SolarLoadControl.ino (32.7 KB)

Very nice project. Im interested in building one just like, only in my case there are 3 loads, and ill measure consumption on each load and also the on-grid and off-grid PV production. The main rule is that if the battery is under rest voltage and PV production is less than total consumption one of the load will be disconnected to even the odds, and some other rules that are secondary.

Can you share your drawings and how did you made an accurate reading of the battery voltage ?

Thank`s !

I used an analog voltage divider like this one from Elec Freaks:
http://www.elecfreaks.com/store/octopus-analog-voltage-divider-brick-obvoltage-p-429.html

You can make one yourself but the brick is cheap and easy to implement. The voltage it reads from the analog pin is multiplied by a constant to get the actual voltage. I calibrated the constant by comparing the brick output to my multi-meter. I’m not sure why but I got different readings when I ran it powered by USB versus being powered by the jack. I put a small 9 volt power regulator between the batteries and the Arduino power supply so that it would be over powered.

A conceptual drawing of the circuitry is attached. Pins used by the LCD controller have a blue line across them. I attached all of my wires to a prototype board that is sandwiched between the Arduino board and the LCD controller.

Updated code file and photos are attached.

Additions:
Programmed relay 4 to flush out the swamp cooler every 30 minutes.
Added screens to set the time and date.
Updates to layout and cleaned up the code a little bit.

SolarLoadControl.ino (40.9 KB)