Typical that the wind should die just as I want to test something. We'd had 40km/hr plus winds all morning averaging some 500 watts out with peaks over 1400watts on the 3m mill here and I was busy debugging the controller software.
The secret to the controller is two Dallas 1-wire chips, the DS2438 battery monitor chip and the DS2413 GPIO chip. The latter is a 2 channel device and I'm using it to emulate the remote control that came with my inverter. This remote is a push button with an LED on it at the end of 10m of phone wire that has an RJ11 connector that plugs into the inverter. One press and the LED comes on to indicate the inverter is running, a second press stops it and the LED goes out.
My emulated button uses one channel of the GPIO chip to operate a relay to simulate the button press and then the LED output goes to an opto isolator chip so I can read the state of the LED on the other GPIO channel and make sure I know whether the inverter turned on or off. It works well and means I can retry under software control if a 'button press' doesn't work.
Just got to tidy up some of the wiring after fitting a new fuse holder (I blew a 50amp fuse on the battery bank trying out the domestic water pump on the inverter) and fixing the PCBs into the controller box with some hot melt glue.
I can now control at what point I dump power from the battery bank to the swimming pool pumps (the design aim from 18 months ago) using either voltage and/or charge counting measured with the battery monitor chip (whichever comes first!!) to determine the state of charge of the batteries.
Final part will be making a house over the batteries to stop the pigs chewing on the cables - they do seem to like plastic!!