This project started with the purpose of provide running water to my house when the grid goes dead. This is not an unusual event since I am living in a rural area and strong winds and/or rain may cause tree branches to fell into power lines. Repairs take at least few hours, sometime days (five, when my region was struck by a magnitude 9 earthquake) . I have a small emergency  system (130 W solar panel, 100 AH battery, 500W inverter) to provide the minimum power to a small LCD TV, a lamp, and the heating (gas) system. However the lack of running water makes these episodes rather uncomfortable.

The basic components were to be:

- 2 Solar panel, 24V 185W each.
- MPPT solar controller
- submersible 24V 1/8 HP pump in the well
- surface 24V 1/8 HP pressure pump
- 2x100 AH 12V AGM batteries
- underground plastic storage tank 750 liters.

The system went together pretty easy. However, the pressure pump was unable to prime itself from the tank and its flow was insufficient. So it was replaced by a conventional 1/2 HP, 220V peripheral pump fed by 1 kW pure sine wave inverter.
The peripheral pump is in series with the existing 1 HP pump feeding from another storage tank. The (wrong) idea was that the solar pump should stay in standby with its pressostat rated lower than the one on the primary pump to kick in when the primary one was not starting for lack of power. In practice the solar pump was working together with the primary since the depression at the inlet of the primary pump when it was active always started the solar one. The proper connection would have been in parallel.
Solar pump system
The monitoring system.

There are a number of reasons for a monitoring system. The most important is to ensure that the batteries bank is never discharged below 80% to ensure long life to the most expensive component of the system (BTW already one battery had to be replaced after one year in service).

My monitoring system (Schematic) is based on an Arduino clone (seeeduino). The sensing is done using the cable that goes to the battery as a shunt. So the system had to detect not just the voltage drop but also the sign, to increment or decrement the computed stored capacity.