diy solar

diy solar

Adding storage to my Enphase system

Then you bought more at peak rates. Preferable not to do that. Better to backfeed maximum allowed during that time, if you get credits under net metering.
 
I tried to go in and up the charge current before 4pm, but my PLC kept setting it back to 5%.

Tonight, I will try and have it charge from grid at something like 8 % on the overnight rate.
 
It almost made it to 9 pm, but when the A/C was running, it cut off and kicked back on about 5 times as the battery voltage would dip under load and then rebound. It has adjustable voltage rebound needed for the absolute low voltage shut down, but not for the grid support/grid sell functions.

This happened when the inverter was pulling 90 amps at 51 volts (4,590 watts). When that 90 amp load turned off, the battery rebounded 0.26 volts. That is only 0.003 ohms of series resistance. It really needs to have more hysteresis for the voltage bump when the load turns off. It was taking about 2 minutes to turn back on each time, so it was not crazy fast, but still too much.

I started it charging right before midnight at just 10 amps (520 watts). If I leave it alone, it will run about 8 hours before the PLC start controlling it to follow the extra solar again. 8 hours at 10 amps is 80 amp hours, or about 4 kilowatt hours. That will cost me about a $1.30 of grid power.
 
So tweaks and predictive algorithms will help.
Leave battery low enough to store all power generated on a mild day, but full enough to avoid running A/C off grid peak hours on a hot day?

Now how about boosting efficiency of A/C?
One idea is put a water line in intimate contact with refrigerant tube after outdoor condenser coils (or water jacket, at least for testing, but do have to be concerned about corrosion.) When compressor is on, run tap water through that in reverse-flow direction. Try something like 1/4 gallon/minute, more or less depending on what outlet water and coolant line temperatures are achieved. Discharge the water somewhere it can irrigate plants without cooking them.
 
I had the battery charging at 10 amps (520 watts) las night, and it managed to push 3.3 KWH into the battery before the sun came up, BUT... Once the PLC came online at 6 am, it started using what it saw as remaining battery power, it started using it to run the house until the sun was strong enough to charge again. I didn't catch it right away, and it pulled about 1 KWH back out of the battery bank.

Once the sun was up, it pushed another 4.4 KWH's into the battery bank, but we have clouds moving by, so the charge rate has been going from under 10 amps to over 40 amps, with a peak to 47 amps at 11:40 am. It is now 12:10, and the sun looks pretty solid for now. I am getting 3,300 watts on the Enphase Envoy. It is starting to get muggy in the house again, so I fired up the A/C, BUT... I turned off the PLC and I am leaving it at 20% charge rate (1,500 watts). That still leave 800 to 1,100 watts (changing with the passing clouds) right now going out to my main panel, but the A/C is using 3,400 watts, so I am buying the rest from So Cal Edison, but at the lowest off peak rate right now.

If this works out, I will have to try and write a flow chart to make the PLC understand what is going on to get the battery charged more on these crazy hot days. Having essentially a full week of 100+ days is hard to deal with.

Damn, a big dense cloud just moved by and I went from exporting 1,000 watts, to importing 500 watts, then back to 1,300 export again, all in under 2 minutes.

I will post the battery summary graph later, after it fills in more of the day. The past 2.5 hours was wildly changing the charge current to follow the solar production, and now it is just sitting at 27 amps steady. Another big cloud, it just went to importing 1,400 watts, OUCH! And that is not including the 3,400 watts going to the A/C compressor.

I doo need to wash out my outdoor unit. The birds found a new place to sit and poop. A bunch of it when in the fan on the top of the unit, and it is spattered on the inside of the condenser coils. YUCK! I'm sure it's not really enough to be effecting the efficiency, but it looks nasty. This is a fairly new Carrier high efficiency unit, and it has a HUGE amount of coil area. The fan blows the hot air out the top, and 3 sides of the 4 foot high, 3 foot square cabinet are all condenser coil with the air flowing in.
 
Day after day of 100F + heat is taking it's toll.

My solar array just can't keep up under these conditions. Each day, I am barely able to get the battery bank up to 54 volts, my normal full charge is 57 volts.
Yeah, I had a rough one today. Only made it to 51 volts. I'm going to buys lots of grid power this evening. I really should have more panels, between running the car down and needing to charge it and ambients over 100.
Today, my 6.5kw array maxed out at 4.3kw and the battery only charged from 49.7 to 50.9 volts.
 
So, here is my battery graph for most of today.
XWbatt07-18-22.PNG
You can see that from midnight to 6 am, it was slowly charging at 10 amps. At 6 am, the PLC took over and decided to use that stored power. But the sun was also coming up, so the current form the batteries went from 20 amps, and ramped to zero at 8 am, and by 8:15, it was charging off the extra solar beyond the house draw.

I am only taking mine down to 51 volts, so that is where I have been starting. The slow overnight charge of 3.3 KWH brought them up to 51.85 volts. The morning 1 KWH used, took them back down to 51.7 before they were charging again. The PLC was doing it's job, trying to charge with as much of the extra solar as it could until 11:50 am, when I unplugged the PLC. That froze the current at 39.5 amps, but after noon, the A/C kicked on, so I dropped the charge current to 27 amps. Charging at 27 amps, the voltage climb is very linear. Total for the day, I pushed 12.7 KWHs into the battery bank. I got the voltage up to 55.3 charging just from sun, and using grid to power the house and my A/C. Some solar was also helping run the house as the solar made 26.4 KWHs today. At 3:20 pm I was going out, so I plugged the PLC back in. The A/C was running, so i dropped the charge current back to just 5% 7 amps. At 4 pm, charging stopped, and the PLC went to work making the batteries zero my grid power meter. The A/C stayed running until almost 5 pm on that first cycle. The extra current from 4:30 to 4:50 may have been a refrigerator defrost cycle. Or my son was gaming on his PC. Since there was still sun, the batteries only needed to supply 40-50 amps. From 5pm, to 6:20, the A/C stayed off, and the solar ran the house, and exported a bit. A/C kicked on again, with less solar and the battery voltage a little lower, the current is now 70 to 85 amps as the sun goes down. With the A/C off, the current increased as the sun went fully away at 7:45 pm.

It made it past 9 pm on battery!!

The A/C kicked back on at 9, and you can see the grid support cut off and back on a couple times as the battery dipped back to 51 volts. When I zoom in I can see it was 5 times in the hour before the A/C cycled off again. The battery has rebounded to 51.2 volts, and is running the house with just a 21 amp draw on the battery. It will be shutting off for the night soon though.

So how does this compare to last year? I am 1 day shy of getting the total bill, but I will estimate another 20-40 KWHs tomorrow, bringing my June-July 31 day total to just 180-200 KWH of grid power. Last June-July, 2021, I used 540 KWHs. So even with this insane heat spell, I used well under half the grid power, and very little was peak rate. The bill last year was $68.14 the estimate this year, with the rate and tax changes is $55, but I won't have the exact number for a day or 2.

And YES, the SHTF, good one. Now I need to buy some of that spike strip stuff to make it so the birds can't s#it there.

My dad's friend liked using big words, so it was "The excrement has contacted the ventilator"
 
So Cal Edison issued my bill for the month today. I actually did even better than I was expecting. I did end up buying a total of 206 KWH of off peak power at 29.8 cents for generation and delivery charges. Mid peak was only 10 KWH at 39.5 cents, and peak was 9 KWH at 49.4 cents. And since I did use power, I got the baseline credit, as a savings, chopping off 187 KWH at -9 cents. So the bottom line is $36.81 for the powerbut since my credit from the 4 negative months was $117, my credit balance is now $80 and I still owe nothing for power, making it 5 months now with no charges for electricity. The "Non Bypassable" charges also came out to me owing $8.22, but I had a credit there as well.

On the bottom line summary, I have 2 months left in my full year, and my energy credit is sitting at $80.50 and my credit towards the taxes etc. is showing as $18.70 but for the first 4 months into the plan year, I was under producing and did pay $161.30 in energy charges. My total for the whole year is not going to be under zero. But if I didn't have the solar panels, this last month would have been close to $400 alone. Last year, without the battery working as well, It was just under $200, and with the battery doing the time shifting, the total charge for June-July is just $45 if I didn't have any saved up credit.

So the solar alone cut my bill almost in half, but then adding the battery cut it to less than 1/4 again, or 1/8 of pre solar. And that is with the rate going up a lot in the same time frame. I saved over $300 in just one month.
 
So my PLC crashed again while I was out of town, so it didn't charge for 2 days. It looks like it was a divide by zero error for a second time.

I just looked through all of my code, and I think I may have found it. It reads the wattage being drawn from the main panel, then divides it by the grid voltage to get the amps needed to grid sell. It reads the grid voltage from the XW-Pro. The only thing I can think of is a failed read attempt resulting in a zero. Then it is a divide by zero. This is the ONLY divide, with a variable in the denominator. In all other cases, I calculate the denominator, and test for it being a zero.

I am going to add a check for a bad voltage reading, and if it is below 220, or above 260, I will just set it to 240 for that pass. It does this calculation every 5 seconds when it is selling to grid.

Since it was not charging, I forced the XW to charge at a fixed 38 amps. In a full hour it has put 1.9 KWH into the battery, but that only raised the voltage 0.5 volts. I have less than 2 more hours until 4 pm when the grid rate jumps. I will only get another 3 KWHs into the battery.

On another note, my neighbor just had solar installed. As I left town, I saw the SunRun guys start working. He put up 30 panels. That are 120 cell half cut modules. I would guess 330 watt or more each. That is more than double what I have. His roof is a "T" shape, so he has the whole south face covered, and a chunk on the east and west as well. I have not talked to him since I got back, but it looks like Solar Edge optimizers under the panels. Last month I talked with him a lot about my system, and using batteries. I am curious if he put in storage. On the Sunrun web page they offer Tesla Powerwall or LG Chem Resu batteries.
 
Regression testing, automated test?
Maybe a job for Python, throwing a bunch of scenarios at the PLC in much less time that it takes for the real world to produce them?
 
I looked through the code some more, and that is literally the only divide with a variable in the denominator. I don't see any other way it could have had a divide by zero. So I just need to test the voltage reading and make sure it is in range before it does the divide. The battery is about to run out for the night, so I can work on code without it messing up the system operation.
 
I think I just got my proof.
As I was looking at the code, the live data of the running code popped up "runtime error" again. Variable "Y" is the voltage it read from the XW-Pro over Modbus TCP, and the value is ZERO! That's it. It happened on my watch. I open the Modbus TCP channel to the Gateway, and then test for a valid connection, and it got it. The status is connection good. It then reads all the data into variables. And checks for a good checksum, and it was good, but it looks like several of the data fields got zeros on that last failed read, not just the grid line voltage. My guess is that this is a Gateway issue. I have now had this happen at least 4 times in a week, and was blaming the PLC, but the PLC has been getting rebooted. I have not rebooted the Gateway. I am going to go do that now. And I am still putting in the code that will test for out of range values, and make sure it ignores a zero and does not pass it to the divide.
 
So much for my "test your code with simulated data" suggestion.
Networking. I can't stand it.
 
The only code change I did for now was add a pair of "IF" statements for a grid voltage that is either way too high or way too low. And it replaces that with a value in range.

After the reboot of both the Gateway, and the PLC with the new code, it is running just fine, but I will have to see if it does it again. I should have it set flags when things go out of range, even if it self recovers. When it first started updating, I was a bit surprised to see the grid volts a little over 245 L1 to L2 at 11PM at night. I went out and checked it with my Fluke 76, and sure enough, 245.1 volts. And even the cheap PZEM power meters are showing 122.5 volts on each leg. I am not exporting at all, in fact I am charging at 600 watts right now, an my house is using 1,100 watts. So the grid is actually high, even with my load on it, and there is no grid tie solar doing anything either. Makes me wonder why the grid is over spec. It was right at 240 earlier in the day. I thought everyone was worried all the charging EV's was going to suck the grid down overnight.
 
The only code change I did for now was add a pair of "IF" statements for a grid voltage that is either way too high or way too low. And it replaces that with a value in range.

Makes me wonder why the grid is over spec. It was right at 240 earlier in the day. I thought everyone was worried all the charging EV's was going to suck the grid down overnight.
Manual transformer taps? Lower grid load than monthly average?
 
When it first started updating, I was a bit surprised to see the grid volts a little over 245 L1 to L2 at 11PM at night. I went out and checked it with my Fluke 76, and sure enough, 245.1 volts. And even the cheap PZEM power meters are showing 122.5 volts on each leg. I am not exporting at all, in fact I am charging at 600 watts right now, an my house is using 1,100 watts. So the grid is actually high, even with my load on it, and there is no grid tie solar doing anything either. Makes me wonder why the grid is over spec. It was right at 240 earlier in the day.

Over nominal, not over spec.

Service voltage 120V +/-5% = 114V to 126V (252V line to line.)
About 110 to 125 expected at service entrance.

Table 1 National Standards 114 to 126V.
Switched transformer taps, and excursions < 2 minutes.


My connection rises to about 250V when I feed it.
Utility might hold near high end for potential loads.
 
Yeah,
I am being picky. less than 6 volts over out of 240 is not crazy.
This morning it is now at 241.1 volts total. L1 = 120.8 and L2 = 120.3

And I think I know why it was high as well. I took a late night walk to the 7-11 3 blocks away last night, and it was closed and dark. The whole shopping center across the street from it was dark too, even the gas station on the corner, and the traffic lights. There was a crew working another block up. Looks like transformer failed or a line was down. I'm sure that shopping center is 3 phase, and it was all dark, so they probably pulled a disconnect so 3 phase loads don't get damaged with only 2 live phases.

Remove the load from that whole area, and the primary line was up a bit. I walked back the other way, past the fire station. They had a diesel generator trailer running next to the building. I don't know exactly where the dividing line is, but the transformer for my block still had power, but less than 2 full blocks away it was all dark.

The sun is coming up, the PLC stayed running through the night, and it is ramping up charge current. I left it charging at 10 amps all night again, and it only got the battery up to 51.87 volts at 6 am. It's now 9 am, the charge current dropped to 7 amps at 6, and is now ramping up and back to 10.5 amps now. It has pushed 4.4 KWHs into the battery bank so far since midnight. The voltage is now up to 52.3 volts. The high today is once again predicted to hit 99F, but it is a nice 71 out now.

I only pulled 5.33 KWHs net from grid yesterday, and that was pretty much all to charge the batteries off peak. And that was enough that I managed to zero the grid during the 4-9 peak rate time. But I will admit, I manually shut off the A/C for a bit as I knew the battery was getting low. Shortly after 9 pm, I turned it back on to cool the house a little more. Then I opened windows when it got under 75F outside for the night.

As more and more solar is actually coming online, the grid voltage is actually dropping. Not a lot, but it is now at 240.4 volts. My solar is up to about 25% of peak output for the day, so I would expect most of my neighbors with solar will be pushing that as well. So Cal Edison must be compensating for it somehow. Maybe we are starting to power the pumped hydro at Castaic Lake, pushing that water up to Pyramid lake??
 
I woke up to get ready for work, and out of curiosity, I checked to see if the battery made it through the night.

It was inverting and running all of the house loads. I knew it was cooler and the A/C didn't run as much, so I didn't think much of it. But then I noticed the battery was nearly at full charge at 56.6 volts. How can this be?

I look at the battery summary and find it was charging up to 3:40 AM. That's odd, I didn't trigger a charge event last night. I go back and look at yesterday. Sure enough, it started charging at 10:24 PM. And it charged at 40 amps! The PLC should have shut that down. The PLC is running, and it appears to be properly controlling now that it is in grid sell mode.

I check the Event Log and find that at 10:24 PM, the XW went off grid due to Over Frequency on the grid. When the grid came back, it went right to charge mode. Not sure why it would have done that. And the charge current in the battery summary was not constant. The PLC was adjusting it. It dipped it as low as 14.6 amps for a while, but then ramped it back up to 40 amps. It was either on grid doing this, or there was one heck of a search light blasting the solar panels. When the battery became full at 3:45 am, it switched back to grid sell and powering all of the house loads. It looks like it was working fine at that point, but I want to be sure. I rebooted the PLC and all seems happy now.

I think I need to add some watch dog functions to test that things are operating properly.
 
Your pleas to Schneider to further develop their software seem appropriate. I love the idea of an external watchdog, but you shouldn't need to do both control and watchdog externally.

I really hope you provide periodic feedback to Schneider to make sure they are aware of the edge case issues you run into! I remember the lengths we had to go to at work to get them to fix bugs in their large UPSs; I knew someone who did not like getting complaining emails from me that was high enough up that things happened, wish someone knew a person in that role for solar.
 
Back
Top