diy solar

diy solar

DIY Battery Solar Diverter

Doug42

New Member
Joined
Oct 5, 2023
Messages
18
Location
Ottawa
Okay I am embarking on a mission and want to share my work + Code in case someone else might benefit. also any suggestions or thoughts along the way are appreciated. (not sure if this is the correct place for me to post but it is my best guess)
This is a more matured thought from an earlier post I made here: https://diysolarforum.com/threads/d...tery-cheap-simple-mostly-off-the-shelf.70339/

Goal: - Fully automatic, continuously adjustable, high power AC battery charger which captures excess solar energy.
- Does not require any house/ mains voltage wiring what might require electrical certification.
- 12v, 24v, 48v compatible
- 2000W to 4000W capability

My reason: Home in the UK, 2.8KW grid tied setup on the roof. this was installed with a subsidy so I cant interfere with it. I want to expand the solar and add a battery. I can not connect any more inverters to the mains as that will take me over the 3.9KW limit and require planning permission. My DNO would only let me do that through an approved installer which would cost three times as much. This makes islanding the house and recapturing the grid tied power with a diverter, awfully tempting. However there are no AC 48V battery chargers out there that have this intelligence. AC coupled inverters do, but that brings me back to the planning permission, also I am an electrical engineer and although my day job is working on micro-grids I do not have electrical certification so technically cant so much as tickle a breaker

proposed solution:
Solar Diverter.png
(1) PV inverter CT clamp type £17
(2) House CT clamp type £17
(3) Arduino or other MCU. Running the PID control library ~£10
(4) Adjustable SwitchModePowersupply (SMPS) MZMW S-4000 AliExpress, £300
(5) Solid State Relay 4-32VDC - <280VAC RS Stock No: 903-2977 £24
(6) Battery CT clamp type (make sure no current flows back) £17
(7) Keenso SSR-100DD 3-32VDC £16
(8) Voltage sensitive relay DVRD-48, saftey measure to stop overvoltage £30
(9) Battery, 280Ah prismatic cells 16s DIY with Gobel or JK BMS-14-15KWh £1600
(10) 2.9KW PV with Fronius IG inverter (already exists, DC coupled solar will be added)
(11) Connect to circuit with >4000W breaker. might limit power to~2KW so normal wall socket would suffice
(12) Standard UK house grid connection, 60A

Rough costimate: £450
(ignoring battery)

Signals
(1) 0-5V control signal generated using PID library in arduino CT1 - CT2 = 0 setpoint
(2) enable signal to only turn on SMPS when there is worthwhile power being wasted to grid, say ~50W
(3) enable signal for DC battery output. can disable connection to battery if current begins to flow backwards or goes bellow a threshold when SMPS enters CV mode. this is unecessary if this charger is the only charger connected to battery but in future there will be some DC coupled solar and I am concerned if the absorbtion voltage setpoint is highter than the max voltage setpoint of SMPS, it could force current backwards. there are current blocking circuits, RCPs, that can be bought out of the box but they are expensive ~£200, alternative is mosfet and comparitor DIY circuit as described in https://www.ti.com/lit/an/snoa971/snoa971.pdf but I would rarther avoid the faff and want to keep this as out the box as possible.

There are details I have missed such as signal conditioning to turn Arduino outputs 0-3.3V PWM into true 0-5V analog but the psudo detail is all there

Any thoughts?
At this point i think my main concern is the potential interaction with other chargers such as a MPPT. I may yet implament a current blocking circuit and accept the lost Watts.
 
All looks interesting, but trying to get my head around what you will do with the battery when it is charged - I don't see any inverter to feed it back to the house load?

Also, few questions / feedback on the other comments you've made.

Apologies in advance if I sound sceptical, it's probably because I haven't understood something!

I can not connect any more inverters to the mains as that will take me over the 3.9KW limit
What 3.9kW limit? Grid-tied inverters up to 3.6kW need to be G98 compliant and you need to inform your DNO within 28 days of installation.

Above 3.9kW requires G99 approved inverter and DNO approval _before_ installation and they _may_ restrict the export limit depending on your local network.

I've explained this on here a few times before, but here is a link with some more depth than I just wrote...

and require planning permission.
Planning permission is not related to any kW output. Planning permission is required in some circumstances for PV panel installation, but you're not talking about panels here. Building regulations are required for some electrical work that comes under part P regulations, but building regulations are different to planning permission. Hence I am confused regarding PP.

My DNO would only let me do that through an approved installer which would cost three times as much.
You have not been given the correct information. DNO permit self-install. They are concerned about export power and using type-tested equipment. You _may_ require a sparky to comply with BS7671 IET regs or Building Regs part P, depending on your existing wiring.

AC coupled inverters do, but that brings me back to the planning permission
See above.

proposed solution:

<.... lot of fun stuff... >

Any thoughts?
What are you going to do with the charged battery? I would have thought buying a Solis RAI inverter with batteries would achieve all of this and power your house.

Why 2 CT clamps (solar + house feed) - surely one CT clamp on the grid live connection will tell you if you have spare being exported?

Basically, what you have described is just like an immersion diverter, but rather than heating up water with AC you are charging a battery with DC.
But then what are you using the battery for?
 
I would think an “all-in-one” unit has most of the functionality you require with far less effort. Example video:
 
As I mentioned in your other thread, you can use those sun2000 inverters you can for example buy from gwl for dumping energy on the grid. You can run them in all kinds of "modes".

For the charging of your battery you can use those eltek flatpacks that can be controlled over can bus with arduino for example.
 
It's disappointing when people ask questions & several of us reply. Then no response from the OP, despite them logging on the next day... and then they disappear for 3 weeks. Guess real life may have got in the way... note to self, must be more compassionate.
 
Okay I am embarking on a mission and want to share my work + Code in case someone else might benefit. also any suggestions or thoughts along the way are appreciated. (not sure if this is the correct place for me to post but it is my best guess)
This is a more matured thought from an earlier post I made here: https://diysolarforum.com/threads/d...tery-cheap-simple-mostly-off-the-shelf.70339/

Goal: - Fully automatic, continuously adjustable, high power AC battery charger which captures excess solar energy.
- Does not require any house/ mains voltage wiring what might require electrical certification.
- 12v, 24v, 48v compatible
- 2000W to 4000W capability

My reason: Home in the UK, 2.8KW grid tied setup on the roof. this was installed with a subsidy so I cant interfere with it. I want to expand the solar and add a battery. I can not connect any more inverters to the mains as that will take me over the 3.9KW limit and require planning permission. My DNO would only let me do that through an approved installer which would cost three times as much. This makes islanding the house and recapturing the grid tied power with a diverter, awfully tempting. However there are no AC 48V battery chargers out there that have this intelligence. AC coupled inverters do, but that brings me back to the planning permission, also I am an electrical engineer and although my day job is working on micro-grids I do not have electrical certification so technically cant so much as tickle a breaker

proposed solution:
View attachment 178293
(1) PV inverter CT clamp type £17
(2) House CT clamp type £17
(3) Arduino or other MCU. Running the PID control library ~£10
(4) Adjustable SwitchModePowersupply (SMPS) MZMW S-4000 AliExpress, £300
(5) Solid State Relay 4-32VDC - <280VAC RS Stock No: 903-2977 £24
(6) Battery CT clamp type (make sure no current flows back) £17
(7) Keenso SSR-100DD 3-32VDC £16
(8) Voltage sensitive relay DVRD-48, saftey measure to stop overvoltage £30
(9) Battery, 280Ah prismatic cells 16s DIY with Gobel or JK BMS-14-15KWh £1600
(10) 2.9KW PV with Fronius IG inverter (already exists, DC coupled solar will be added)
(11) Connect to circuit with >4000W breaker. might limit power to~2KW so normal wall socket would suffice
(12) Standard UK house grid connection, 60A

Rough costimate: £450
(ignoring battery)

Signals
(1) 0-5V control signal generated using PID library in arduino CT1 - CT2 = 0 setpoint
(2) enable signal to only turn on SMPS when there is worthwhile power being wasted to grid, say ~50W
(3) enable signal for DC battery output. can disable connection to battery if current begins to flow backwards or goes bellow a threshold when SMPS enters CV mode. this is unecessary if this charger is the only charger connected to battery but in future there will be some DC coupled solar and I am concerned if the absorbtion voltage setpoint is highter than the max voltage setpoint of SMPS, it could force current backwards. there are current blocking circuits, RCPs, that can be bought out of the box but they are expensive ~£200, alternative is mosfet and comparitor DIY circuit as described in https://www.ti.com/lit/an/snoa971/snoa971.pdf but I would rarther avoid the faff and want to keep this as out the box as possible.

There are details I have missed such as signal conditioning to turn Arduino outputs 0-3.3V PWM into true 0-5V analog but the psudo detail is all there

Any thoughts?
At this point i think my main concern is the potential interaction with other chargers such as a MPPT. I may yet implament a current blocking circuit and accept the lost Watts.
i think you may wish to consider what i have done in similar circumstances (Feed in Tariff which i didnt want to lose!) but wanted to add battery storage and potentially more PV.

i have fitted a Sunsynk ECCO hybrid inverter (5kw) and 14.3kw of storage (soon to be increased to double that size battery) - it has been set NOT to export to the grid, but it does accept power from the grid to charge at off peak rates and it is able to make use of and capture any energy produced by my existing 4kw PV (FiT) system. i have kept my existing inverter and the existing system unaltered so my FiT payments remain as they are.

UK Power Networks accepted my system without any fuss, though i needed to get approval before it was fitted due to it being over 3,5kw HOWEVER, i originally fitted a SOFAR ME3000 SP, which is only 3.5kw and i didnt need permission, i just had to notify them within a month of it being fitted (though i didnt get that because i had it removed and replaced). importantly, you only need a competent electrician to fit the additional system (inverter and battery) NOT an MCiS installer, as youre being paid for what you produce !!!

i also purchased a PVMate from china so that when my PV is producing energy, it supplies it in the following order of priority, House load, Battery Charge, Hot Water (immersion heater) and then any excess back to the grid. When there is little production from the sun, the battery charges up during off peak octopus rates and, as in the case today, whenever Octopus offer their free energy periods (today os 3pm until 5pm, so i will set the battery to charge for free and will get around 10Kw for free for the battery, i set the PVMate for 90 mins 'boost' plus use the dishwasher, tumble dryer, washing machine and meals cooked for the freezer. in short anything i can turn on, i do!

if you want any more info about dding battery storage, drop me a PM? i am not an installer, not trying to sell you anything, just offering my experience of what has worked for me.

ps, total cost for 14.3kw of storage and inverter plus install costs came to under £4k - which will be paid for by my FiT payments in just over 4 years !!
 
It's disappointing when people ask questions & several of us reply. Then no response from the OP, despite them logging on the next day... and then they disappear for 3 weeks. Guess real life may have got in the way... note to self, must be more compassionate.
Hey SeaGal, sorry for the silence, you have a fair point, I know it takes time and effort to reply to these things and I am sorry for absorbing your energy. Yes life got in the way. I read all of these very helpful and in depth comments and realised there was a lot i needed to research to check my assumptions and have an intelligent reply, then i got ill, then I temporarily moved country, then work. I'm only now getting back to this project and the replies are still very helpful!
 
What 3.9kW limit? Grid-tied inverters up to 3.6kW need to be G98 compliant and you need to inform your DNO within 28 days of installation.

Above 3.9kW requires G99 approved inverter and DNO approval _before_ installation and they _may_ restrict the export limit depending on your local network.
Yes, this is what I was trying to avoid, when I looked into my DNO to get a G99 they did not seem to have a way for me to apply not as a qualified installer so i sensed it was going to be problematic. My DNO is "Uk Power Networks". If I install even a small inverter then on top of the existing one then i will be over the 3.9KW threshold.

The MSC change is quite interesting though. Maybe I can get onto the SEG payments one day. But right now I am mostly interested in self consumption. the feed back payment does seem like peanuts right now. Unfortunately I don't have a lot of time and want to avoid getting caught up in bureaucracy as much as possible
You have not been given the correct information. DNO permit self-install. They are concerned about export power and using type-tested equipment. You _may_ require a sparky to comply with BS7671 IET regs or Building Regs part P, depending on your existing wiring.
Sorry, I have not been careful with my language and mixed up planning permission with DNO permission. Do you think I would need a sparky if I was to connect the house to a battery inverter through an automatic transfer switch such as:
That way my inverter can't get connected to the grid but there is no problem if the battery runs out. I know most inverters have the switch built in but from what I have read they do not dicern between inverters that will or wont feed the grid, if it is connected it counts.
What are you going to do with the charged battery? I would have thought buying a Solis RAI inverter with batteries would achieve all of this and power your house.

Why 2 CT clamps (solar + house feed) - surely one CT clamp on the grid live connection will tell you if you have spare being exported?

Basically, what you have described is just like an immersion diverter, but rather than heating up water with AC you are charging a battery with DC.
But then what are you using the battery for?
I simplified the drawing which was a little misleading. I will have a battery inverter and extra solar panels. I feed all of the house circuits off of the battery inverter but I seperate them from the above circuit so they are sort of islanded.

The two CT clamp actually comes from an interesting electrical conundrum, how do you tell which way the current is flowing from an AC signal? the answer is you need to look at the voltage and current phase diffrence. voltage reading is a bit more of a pain with a low voltage micro controller, Definatly doable but I figured the easy way is a second CT, calculate rms and look at the diffrence (Because you know the solar current can only be positive)

Yes you are right this is like a immersion heater except it only draws as much power as you have excess and puts it onto a battery in stead of heat which I can then use to power the whole house. Much more useful in summer. Sorry i was not more clear about the house part, I was trying to keep the scope on the diverter part- This was a mistake, this conversation is maybe changing my approach.
 
While I appreciate your desire to build a neat thing, I think you’re trying to reinvent the wheel, and you will end up with a bespoke solution. It will suck up a lot of your time and energy. Can you get a new inverter like the EG4 18 Kpv and some number of batteries and just program it to not push more than 3.9 kW into the grid?
 
While I appreciate your desire to build a neat thing, I think you’re trying to reinvent the wheel, and you will end up with a bespoke solution. It will suck up a lot of your time and energy. Can you get a new inverter like the EG4 18 Kpv and some number of batteries and just program it to not push more than 3.9 kW into the grid?
I am getting the same feeling. If I had more time I would do the solar diverter for the fun of it but that is not the case right now. Sadly no, the regulations are fairly clear that they will not take the settings of your inverter into account which is sort of fair enough as trusting someones put the right settings in so your infrastructure doesn't melt isn't a great strategy. they only care about the maximum your system could push to grid in order to require the G99. Having zero export implemented in the system I apply with will help getting approved I am sure, but it will require approval
 
i think you may wish to consider what i have done in similar circumstances (Feed in Tariff which i didnt want to lose!) but wanted to add battery storage and potentially more PV.

i have fitted a Sunsynk ECCO hybrid inverter (5kw) and 14.3kw of storage (soon to be increased to double that size battery) - it has been set NOT to export to the grid, but it does accept power from the grid to charge at off peak rates and it is able to make use of and capture any energy produced by my existing 4kw PV (FiT) system. i have kept my existing inverter and the existing system unaltered so my FiT payments remain as they are.

UK Power Networks accepted my system without any fuss, though i needed to get approval before it was fitted due to it being over 3,5kw HOWEVER, i originally fitted a SOFAR ME3000 SP, which is only 3.5kw and i didnt need permission, i just had to notify them within a month of it being fitted (though i didnt get that because i had it removed and replaced). importantly, you only need a competent electrician to fit the additional system (inverter and battery) NOT an MCiS installer, as youre being paid for what you produce !!!

i also purchased a PVMate from china so that when my PV is producing energy, it supplies it in the following order of priority, House load, Battery Charge, Hot Water (immersion heater) and then any excess back to the grid. When there is little production from the sun, the battery charges up during off peak octopus rates and, as in the case today, whenever Octopus offer their free energy periods (today os 3pm until 5pm, so i will set the battery to charge for free and will get around 10Kw for free for the battery, i set the PVMate for 90 mins 'boost' plus use the dishwasher, tumble dryer, washing machine and meals cooked for the freezer. in short anything i can turn on, i do!

if you want any more info about dding battery storage, drop me a PM? i am not an installer, not trying to sell you anything, just offering my experience of what has worked for me.

ps, total cost for 14.3kw of storage and inverter plus install costs came to under £4k - which will be paid for by my FiT payments in just over 4 years !!
This was great to read, thank you MisterB! Yes your problem is exactly my problem. as you have found success I will try my hand at the official slightly more bureaucratic route and see if i can make it through before committing to beating a new path
 
You MUST get permission before installing anything over 3.6kw (though I think it's a little bit more) under that it's only notification
 
You MUST get permission before installing anything over 3.6kw (though I think it's a little bit more)
It's over 16A at nominal 230V which works out as 3680W. But the DNOs just call it 3.6kW.

under that it's only notification
... with the caveat that this applies only if the inverter is on the ENA Type Test register with G98 certification.

Yes, this is what I was trying to avoid, when I looked into my DNO to get a G99 they did not seem to have a way for me to apply not as a qualified installer so i sensed it was going to be problematic. My DNO is "Uk Power Networks". If I install even a small inverter then on top of the existing one then i will be over the 3.9KW threshold.
Self install is acceptable to DNOs, but you will likely need a sparky for the part-P aspect. UKPN were quick to respond to my G99 application.

Sorry, I have not been careful with my language and mixed up planning permission with DNO permission. Do you think I would need a sparky if I was to connect the house to a battery inverter through an automatic transfer switch such as:
Yes. Provision of a new circuit comes under Building regs Part-P.

The two CT clamp actually comes from an interesting electrical conundrum, how do you tell which way the current is flowing from an AC signal? the answer is you need to look at the voltage and current phase diffrence. voltage reading is a bit more of a pain with a low voltage micro controller, Definatly doable but I figured the easy way is a second CT, calculate rms and look at the diffrence (Because you know the solar current can only be positive)

Not that hard - but the solar panels output is DC not AC as your diagram implies. I still don't understand why you are trying to re-invent a hybrid grid-tied inverter though.
 
It's over 16A at nominal 230V which works out as 3680W. But the DNOs just call it 3.6kW.


... with the caveat that this applies only if the inverter is on the ENA Type Test register with G98 certification.


Self install is acceptable to DNOs, but you will likely need a sparky for the part-P aspect. UKPN were quick to respond to my G99 application.


Yes. Provision of a new circuit comes under Building regs Part-P.



Not that hard - but the solar panels output is DC not AC as your diagram implies. I still don't understand why you are trying to re-invent a hybrid grid-tied inverter though.
as usual, great information and clarity from a very helpful member !

@Doug42 - this lady knows her stuff much better than i ever will !
 
Yes, thanks SeaGal!
I simplified the diagram to make it less messy and easier to follow the concept but I may have over done that an obfuscated important details. in the description of what I meant by each icon in the diagram I mention the Fronius grid-tied string inverter 2.4KW which is actually what is connected to the solar panels, No I haven't wired the solar panels directly into the mains.. there would probably be a lot of smoke..
Self install is acceptable to DNOs, but you will likely need a sparky for the part-P aspect. UKPN were quick to respond to my G99 application.
That is good to know, I think their wording and website tries to divert you away as a non registered individual, "as you cant complete the work your self" and "Only approved installers can use Smart connect on behalf customers" which if I had read more carefully does not mean I cant do it on my own behalf.. but if you keep clicking you can in fact make an account and begin an application. I have begun the application but I have realised that you can also apply by filling out the G99 and supplementary form, and sending it to their email direct. Which I might do as their portal does not much like my DIY battery...
Which option did you use @SeaGal or @MisterB1959 Portal or Email?

Not that hard - but the solar panels output is DC not AC as your diagram implies. I still don't understand why you are trying to re-invent a hybrid grid-tied inverter though.
I can see why the logic does not quite line up. I originally thought that I could not get a G99 without a lengthy bureaucratic procedure and having a pricey certified installer come and do everything. I have since realised that is not the case so I am trying for the G99 and to find a friendly electrician who does not mind me doing the majority of the work.
But originally I was trying to get around the G99 hurdle by Islanding the house which is none of the DNO's business and only needs an electrician, but that left the unsatisfactory situation of either losing FIT payments or not getting access to the existing solar output for battery charging hence trying to bodge a controllable battery charger to re-capture that juice. Obviously none of that makes sense if I can get a G99.. as you pointed out hybrid inverters with zero export functionality have that capability

I have work to do but hopefully I will get the G99 application off this week. I'll post back on here if i get news

Anyone have a G99 I could borrow as an example? Im an electrical engineer but sanity checks are always great

I still think there is a market hole for a zero export battery charger, its not complicated and off grid inverters are much cheaper. I was going to use Growatt SPF5000ES and get 10KW of capacity for the same price that I will get 5KW of grid tiedness
 
Back
Top