Saturday 26 September 2015

Initial performance data

Just a quick blog about charge / discharge times.

Battery is 28V 4KWh LifePO4.

Inverters are 2 x 500W and 1 x 1KW. (500W inverters seem to supply about 350W, 1KW supplies about 700W, so all together they can supply roughly 1.4KW, although the power they supply does drop when they get warm/hot)

Had bright sunshine in the mornings the past few days, charging the battery up fully in ~5 hours.

System switches to discharge mode when the output from solar panels stops, ~7pm.

With a full battery the system can supply the house (upto 1.4KW demand) from 7pm to ~2am, so runtime is ~7 hours.

Usual demand during that time:-

* 7pm to 10.30pm: 1KW : 3.5KWh
* 10.30pm to 11.30pm: 750W : 0.75KWh
* 11.30pm onwards: 500W : (KWh upto 2am) 1.5KWh

Total KWh: 5.75KWh


Which is interesting.

My guess is the inverters drop down to about half their rated power when they're hot, or the Wattson is overreading consumed power quite a bit.

I'll know which when I add the extra bits to monitor the power going into and out of the solar storage system, and the code to log the readings (from everything) to a file on an SD card.

Right, the battery is full again, time for me to pull the two little breadboards to bits and rebuild them on a bigger one so I can add the third current sensor and an RTC.

Sunday 20 September 2015

Random thoughs & next steps

Arduinos are quite good, aren't they?

When I first heard about them and saw the Arduino IDE with it's 'sketches' I had a very brief look and formed an opinion that they were very basic with a very primitive language suitable for starting to teach kids about basic programming techniques with the ability to connect some LEDs and buttons.

After digging into the AtMega specs, the hardware capabilities, SPI, I2C interfaces and the tons of libraries that are out there for the add on boards, all in C or C++, they care certainly a lot more capable that I first thought.

Takes me back to my days playing around with Z80s, 6502s or early Linux and DIY MPEG software.


Well the storage unit is chugging along nicely now, the charge rate is controlled by the free power so it does its best to keep exported power between 50W and 100W with everything else going into the battery. Night time the three inverters are switched in and out according to demand.

A couple of odd things I've noticed so far:-

* The 2.2" TFT display on the Arduino has a command that rotates the output in 90 degree steps. Occasionally the output is rotated by 90 degrees by itself. I think it's just noise on the data lines going to it, and a proper PCB or shielded cables will sort it.

* The LiPo / LiFEPo4 charger has a current control knob on the front which lets you set the current in the CC stage between 6A and 100A. I struck a home run as this is a simple 5V feed into the charger control PCB! So a nice direct connection from the filtered PWM output from the Arduino to the charger input. One thing that is a little annoying is the charger is a one cycle charger - if it's left connected to a charged battery it doesn't detect if the battery needs topping up and turns it self back on. It'll charge it up and then sit there until the mains power is cycled. Also if the charge rate is set to zero, it sets charger current to 0A causing the charger to think the battery is fully charged. Got round this by using an absolute minimum charger control value that equals ~7.5A so the charger will only think the battery is full when it actually is.

* The Frontius grid inverter cuts out when it's running at high power. In bright sunshine at midday it can run for a minute and then cut out and then take maybe 3~4 minutes before it kicks back in again. Not good. Must call the installer out.

I still have no way of measuring how much charge is in the battery. I know if it's full or flat, but from 20% to 85% charge the battery voltage is virtually constant.

Will use an opamp to boost the voltage across the current shunt which will allow me to work out that info.

I also want to measure the efficiency of the sytem, and to this end I have another current sensor and enough spare channels and parts to add another power sensor which will measure the power going to/from the charger / inverters which will tell me the loss in the charger / battery / inverters. I suspect it'll be around 50%!

Lastly this coming week I'll be leaving the system on and recording the electricity meter readings, and then turn it off next week and record the readings again. Well, I want to do it on two weeks with approximately the same weather, so it may not be those weeks, but close together.

Sunday 13 September 2015

Up and running!

The Solar Storage System is up and running (in a basic form).

The Raspberry PI was replaced by two Arduino boards.

Arduino #1 is an Arduino Nano clone (£3.50p) which is calculating the grid and solar power. Inputs are two current sensors and a 240V AC to 9V AC power pack which is just used to supply an AC waveform to calculate the power correctly. Outputs are two PWM analog values representing the grid and solar power. 2.5V is 0W, with each 1V = 1KW of power, so configured to measure plus or minus 2.5KW of power.

Arduino #2 is an Arduino Mega clone (£9) plus a 2.2" TFT screen along with the 8 way relay and 2 way relay board I already had, and the 12 line potential divider that all the input voltages are fed through, connected to the battery cells and temperature TDRs.

Software is the software I was running on the R PI with a few changes to accommodate the different hardware.

In it's current state it'll happily charge the battery during the daytime (but it isn't using variable rate charging yet) and feed the house during the evening / night time providing ouput that can be 350/700/1050/1400W.

Things still to add or improve:-
* Build a teeny circuit to control the chargers 'charge rate' input. The output to drive this is already being output from the Arduino Mega, just needs connected up.
* Create a hard coded "Voltage > Capacity" look up table for the battery so I can easily display bettery percentage remaining rather than just voltage as it does at the moment.
* I'll probably play around with a few algorithms to control the three inverters so they will better match the requirements, it's fun trying to control them as they reach full power output anywhere from 20 seconds (hot) to 2 minutes (cold) after being turned on, so if you think more power is required, is it because the ones turned on haven't come online fully yet, or do you need to turn another one on? No easy way to find out, apart from only do updates once every 2 minutes. (which is what I'm trying now)
* Everything is breadboarded at the moment, so once happy with it, design and build a single PCB.

Anyway, some pics of the system running at the moment.

The breadboards + relay boards + Arduinos:-



Status display, cell voltages, grid and solar power, battery voltage, and three inverter and charger status (DC and AC power and temperatures):-


 Waveform showing the grid and solar power - solar is in blue, grid is in yellow. A horizontal line 1/4 of the way up the screen is 0W. The timebase (time to sweep one cell horizontally) is set to 20 seconds, so this represents about 6 minutes:-


The rest of it, inverters, charger, main control relays, battery in the background:-