Author Topic: DIY AC Battery Storage  (Read 1930 times)

0 Members and 1 Guest are viewing this topic.

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
DIY AC Battery Storage
« on: April 27, 2022, 07:40:16 AM »
Guys

As a a newbie apols in advance if this is covered better elsewhere and/or should be posted in control rather than storage.

We recently added some DIY plugin ground situated solar using grid-tied micro-inverters and it is working fine. I am though interested in storing the peak surplus and replaying it during the dark times to off set all those small home loads that make life convenient.

As a maker of stuff I like to make my own stuff so this is not about buying an off the shelf solution. In any case the off the shelf solutions are overkill and eye waterringly expensive (making break even in a sensible time frame looking tenuous at best).

Having run the Solar PV for a month or so and looked at the graphs etc I can make a significant saving by not dumping as much surplus to the grid. I do accept that there will be some dumped to the grid, similarly I accept that I still want the grid for now mostly as a backup and to provide peak demand. So a cheap small off the shelf grid tied micro-inverter run from a battery store will do fine for most of my immediate needs.

Cheapest option is to just connect the micro inverter to the battery once the sun goes down, let it run all evening/night and early morning or until the battery store dropped below a preset value (BMS should handle this). It might be nice though later to consider putting a variable CC (Constant current) black box between the battery and mico-inverter. for soft start and more intelligent tracking.

This brings us back to charging the battery pack. I ideally want a charger (or intermediary black box) that will throttle the available charge to match the amount of surplus being dumped to he grid and divert it into the battery. So a variable rate charger or throttler (CC black box) is perhaps what I am looking for. Preferably one that is cost effective and can be software controlled in some way.

Before leaping into the long dark teatime of the soul that designing from scratch can be. I though to ask here if other folk have done musing on this already, or perhaps had circuit bent a cheap module form Aliexpress (or similar). or maybe knew of a snazzy off the shelf charging solution I had not found on my cyber wanderings ??

So the question/s are initially all about storage, but could well end up being all about efficient variable constant current controller design.

Thanks in advance.

Tolerance is a two way street

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: DIY AC Battery Storage
« Reply #1 on: April 27, 2022, 11:47:37 AM »
Most AC-coupled batteries will try to only soak up power that would otherwise spill to grid.

So I should think that there are published schematics out there.

Rgds

Damon

PS.  Oblig H&S warning about conncting non-type approved stuff to the mains, Part P rules, etc...
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #2 on: April 28, 2022, 06:28:19 AM »
Sure I am in some ways attempting the recreating a very expensive wheel cost effectively.

I read your posts on  working with the Enphase battery unit. Nice write-up and very useful.

On Mains connections there should be little need to mess with this part. Other than a chunky enough off the shelf SMPSU (if there is no off the shelf variable current constant voltage charger to be had) to produce the relevant charge voltage/power. And a small-ish off the Shelf grid-tie micro-inverter.  All plugin. Separate units for the separate functions.

The power in control and power out control can all be done through current regulation on the low voltage (circa 24V) DC side.

Whilst I am quite capable of doing the mains stuff myself, and the end application of this will only ever be for ourselves and never be sold to anyone else, I prefer to let others tackle the regulatory hurdles and then get on with the rest. There's only so much Yak shaving I am prepared to do and life is ever so short.

Control of in-feed/out-feed, switchover and monitoring for this battery project is easy enough to do with any amount of off the shelf micro controller boards (Pick your favorite I am likely to use and ESP32). I have already scrapped the envoy (metered) outputs into my home automation systems MQTT broker/Nodered.  Hence the requirement for software controlled current regulator/s if I can not get off the shelf software controlled variable chargers and controllable grid tied inverter..

This is of course if there is no sensibly priced off the shelf variable rate charger (software controllable) for the in-feed stage and no sensibly priced software controllable inverter for the out-feed. All ready to go. If there is I can bypass circuit bending or re-inventing the CC power control black boxes.

I think you guys who have been contributing here and doing such things for longer than myself are likely to know what is out there more than I currently do.

On cost effectiveness, We have no objection to kit that is sensibly priced and does a job well. I usually end up building a lot though as I have fundamental objections to the emperors new suit that is vendor lock in and gouging. I guess there are also some sensible arguments in favor of reliability/repair-ability and maintenance when looking into implementing stuff as discreet units rather than some magical and expensive all in one appliance. But even implementing stuff as discreet blocks they should be able to talk to each other in some way, I am a big fan of sensible autonomy in my SCADA.

On software controllable constant current controllers I am finding it a touch surprising that there is a bit of a hole here. I would have though that these would have been massively in demand for folk custom mcgyvering up their own other power solutions. But there you go, maybe they are plentiful and I am just looking at it wrong. LOL

The nearest thing I seem to have found so far that can be circuit bent into service is one of the 300W Buck CC CV units from aliexpress.

All thoughts on the subject welcome.







Tolerance is a two way street

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #3 on: April 28, 2022, 06:52:24 AM »
For the sake of completeness there's an instructables article on hacking the CV side of one of these modules for microcontroller PWM control.

The articles is called "Controlling DC Converter Modules", I would love ot include a link but the BBS software tells me I am not allowed to post external links.

Nice article though and worth the read, there are also Youtube videos on doing stuff with the same unit.

Tolerance is a two way street

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #4 on: April 28, 2022, 11:57:42 AM »
On the charger side, having had a read about and studied a schematic or 5. I think I am coming to the conclusion that the best way to do the variable output battery charger is to hack an off the shelf mains to  24v 500W SMPSU.

The schematics for the XL4016 based 300W CC CV buck modules mentioned in the instructables article are basically retarding the FB (feedback) input to the switcher chip. So the voltage is set with one pot and then a current sensing circuit drives the FB input to reduce switcher output when limiting current.

Oddly enough when I went rummaging about on aliexpress the more cost effective Lifepo4 chargers that were variable current output looked remarkably like a re-purposed server or telecom's SMPSU with a simple controller bodged onto the case.

Rather than sticking another module in line between battery and SMPSU output I may as well plat up a current sensing circuit to retard the SMPSU's output via the feedback input on the switcher chip. Getting the whole thing out of one unit. Plus I only have to monkey with the LV side of the switcher. The battery packs BMU will shut off the feed to the battery once the battery is full and I can adjust the output voltage of the SMPSU (using its own built in trim pot) to be just more than the BMU's cut off charged voltage. Worth a play with, just need to order up a victim SMPSU to try this with now.
Tolerance is a two way street

MagnetJuice

  • Hero Member
  • *****
  • Posts: 558
  • Country: ca
Re: DIY AC Battery Storage
« Reply #5 on: April 28, 2022, 03:02:04 PM »
Welcome to the forum aka.

I think this is the link that you wanted to post.

https://www.instructables.com/Controlling-DC-Converter-Modules

Ed
What can I do TODAY that would make TOMORROW a better world?

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: DIY AC Battery Storage
« Reply #6 on: April 28, 2022, 03:52:47 PM »
Yes, indeed, welcome to the forum!  B^>

Rgds

Damon
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #7 on: April 29, 2022, 05:56:52 AM »
Cool

Thanks for posting up the link for me and thanks for the welcome.

Both are appreciated.
Tolerance is a two way street

OperaHouse

  • Hero Member
  • *****
  • Posts: 1309
  • Country: us
Re: DIY AC Battery Storage
« Reply #8 on: April 29, 2022, 09:42:12 AM »
They copied my designs.  I've been doing that for years.  I keep the panels near power point by faking the feedback pin into thinking the output is too high. With Li that is about all you need to do.  For lead I just set it to 14.5V and feed that to a $5 PWM charge controller.  Only problem is most of the buck or boost modules have way lower conversion efficiency than they state and really heat up.

Those 5 pin chips that have a shutdown pin are really nice.  That pin is very fast and it can be controlled directly.

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #9 on: May 03, 2022, 05:07:09 AM »
Hey operahouse, thanks for chipping in.

I have read a bunch of your other posts.

On the SMPSU control it looks like you have already got it sorted, I guess I have a bunch of reading to do to catch up. Could you point me at a bunch of your most relevant posts to catch up with ??

If you were a less prolific poster I could narrow it down quickly by searching for your posts. LOL



Tolerance is a two way street

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #10 on: May 03, 2022, 05:12:11 AM »
On SMPSU's as chargers with Lead acid variants.

I have built a number of UPS solutions for smaller projects using a pair of cheap  postage stamp 2A buck converters and recovered Gel Lead acid batteries and an old laptop PSU.

I the set the buck converter between the laptop PSU and the battery at the battery manufacturers recommended float voltage and the buck converter between the battery and the load at the loads preferred voltage, ie 5v in a Raspberry Pi's case.

For a rack of raspberry Pi's (Eurorack) mounted on Eurocard plugins (plus other stuff) I used an off the shelf 12 V SMPSU 500W brick and adjusted it up to the float again. The euro-card connectors had a bus running at the float voltage and we put buck down converters on each  card for whatever was running on the card. It got nicknamed the Pie Shelf or Fruit Bowl for the number of different Pi type computers it was running (Bannana, Orange, Raspberry etc).

The aim was to filter the supply and protect against spikes and intermittent power dip/loss as the setting was semi industrial. I should have swapped the small Gel Lead Acid for a decent size AGM one at some point, but never got around to it for that particular project.

Not a perfect solution there was no real under-voltage cut-off/protection on the battery other than running it flat.

A useful technique to know about for that sort of application though. Especially for stuff like Raspberry Pi based SCADA and home automation stuff.

The Pi shelf was running a whole bunch of space automation and member projects in a Hackspace.
« Last Edit: May 03, 2022, 05:25:41 AM by aka47 »
Tolerance is a two way street

OperaHouse

  • Hero Member
  • *****
  • Posts: 1309
  • Country: us
Re: DIY AC Battery Storage
« Reply #11 on: May 03, 2022, 10:44:07 AM »
I've just bought a couple of 120V/240V 12V 10A and 15A switchmode LED power supplies as I was getting back into Dwell Flash at ebay auction.  If you are patient, these can be had for as low as $8 shipped. Those will be turned into power point control chargers.  Over 200W these supplies turn into voltage doublers on the input making them unsuitable for lower voltage PV arrays. I'm in crunch time right now packing up for the move to the summer home in a month. So, a delay in those projects.

JW

  • Development Manager
  • Super Hero Member Plus
  • *****
  • Posts: 4049
  • Country: us
    • Flashsteam.com
Re: DIY AC Battery Storage
« Reply #12 on: June 30, 2022, 06:23:06 PM »
...  I have always missed the old forum software that the Dan's started with, since you reply to an old post and it would hit the front page list.

We have that on SMF now cant believe it ;]

OperaHouse

  • Hero Member
  • *****
  • Posts: 1309
  • Country: us
Re: DIY AC Battery Storage
« Reply #13 on: June 30, 2022, 08:26:04 PM »
In a couple of days I'm going lithium and will be connecting one of these 120W 10A supplies to charge up the 50AH battery. Not sure why I bought this battery as it is too small to run the refrigerator.  Just something to power the TV and fans at night. My other lead batteries are getting tired and can't binge watch dvd at night.

JW

  • Development Manager
  • Super Hero Member Plus
  • *****
  • Posts: 4049
  • Country: us
    • Flashsteam.com
Re: DIY AC Battery Storage
« Reply #14 on: July 01, 2022, 09:03:18 PM »
Man I do a lot with PWM.

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #15 on: July 03, 2022, 06:44:53 AM »
I think everyone does a lot with PWM when they dig into how stuff works lol.
Tolerance is a two way street

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #16 on: July 03, 2022, 07:17:09 AM »
On going Lithium, I bought in enough 280Ah cells from china to do two 24V battery's.

And paired them up with the smart JK 8S 200A (2A balancer) BMU.

I did this after doing a quick and dirty total cost of ownership calculation.

Initially Lead Acid looked to be the cheapest buy in, but when you factor in really available capacity, lifetime in cycles etc the LiFePo4's come out on top. By a big enough margin to make them a no brainer. I guess though it depends on whether your circumstances will let you front load the investment or not though.

I have a prototype battery built on the kitchen table and have been using it to trial some kit with.

The kit I was trialling was a cheap grid tie micro inverter from china (180W).
A pair of XL4016 Buck CV, CC regulator boards from china (Supposed to be up to 300W, but no where near really)
A 36V 500W mains SMPSU again from china.

Realy I was using all this manually to try out the idea and it worked sort of. The plan then was to replace the pots on the XL4016 buck converters with digi pot's and bring it under software control, Linking it back to my household automation and the house Enphase Envoy Metered.

Observations

The XL4016 boards are great as a simple charge controler for the LiFePo4 but will run no where near the spec'd 300W as they thermal limit due to their construction and heatsinking. The leads on the XL4016 are a bit skinny for the rated 8A continuous too.

It did all work though till I powered up the charger half one morning and let the magic smoke out of the XL4016. Seems they are really not great with power on surges when operating in the upper part of their spec. Despite me having replaced the heat-sink with an ex zeon processor heat-sink.

The inverter I initially connected straight to the battery and it got quite hot very quickly but seemed to thermal limit. It did not like being fed by  a low impedance (low internal resistance) source. it performed better when I put an XL4016 inline but see above notes re spec and wattage rating. The cheap Chinese micro-inverter seemed to settle to drawing at 16V when there was enough current limit applied. I guess this is what the micro-interver's MPPT voltage was supposed to be.

With it insisting on drawing down to 16V though the current limit had to be higher and again we were running into issues with the XL4016 regulator board. I think the micro inverter would be OK with a suitably matched solar array but was a poor match to being battery fed at 24V.


So overall a mixed bunch of results so far.

Having had a deep read around I have plumped for a Victron Multiplus, to do the inverter/charger bit at least for now while I experiment more. The price of energy in the UK has gone a bit mad.

The Victron kit though looks to be fairly easily controlled (it is for me anyway, as a linux and developer type). I have already built out a Raspberry Pi with the Venus OS image and am currently hooking up a DIY serial/USB converter to the battery BMS's serial port.

Next step is to enable the Venus OS's mqtt and integrate it with my houses automations MQTT broker. this should be fairly straight forward, Thereafter I will create a Nodered flow to control the charge/discharge levels using hte import/export values already available in my node red form the Envoy.

I have got root control over the Venus OS Pi so tweaking it's operation a little like this is doable.

Victron seem to have embraced open source enough for me to work my way around getting what I want using their multiplus unit, together with what I already have. They are not the cheapest on the planet, but when you factor in the cost of my time, effort, lost energy getting something going and all else, their prices start to look reasonable.

This is not the ned of experimentation though, just a gain of needed function way point. LOL

I can give my cash to the gouging energy company's in the UK or I can spend it on experimentation. Close but not that close.

Tolerance is a two way street

aka47

  • Newbie
  • *
  • Posts: 19
  • Country: gb
Re: DIY AC Battery Storage
« Reply #17 on: August 03, 2022, 09:43:11 AM »
Ok a quick update

In the end I found a git hub repo with a victron script to go on my Raspberry Pi Venus OS controller (GX device) that will talk serial to the smart BMS and use the values and an example git hub repo with a MQTT power meter victron script.

(Would love to post up the external links to the Louisvdw/dbus-serialbattery, and Marv2190/venus.dbus-MqttToGridMeter github repo's, but the forum wont let me)

I had to hack about the MQTT power meter script a little to get it working with my house automation, but it is working well. My node red pulls the current grid state from the Envoy Metered and publishes it out via MQTT. The Venus OS controller gets this and uses it along with ESS to drive the multiplus as an AC battery charger/inverter.

Having been running this for a week or two it seems to be all working reasonably reliably. My biggest disappointment is that the charge rate for the multi-plus has proven to be a bit wimpy and is not scooping up all the solar surplus at peak production. I was also disappointed that it is not possible to configure the multiplus devices without windows and victron config. Even though all the rest of their kit (firmwares etc) is clearly Linux/OpenWRT and I exclusively run Linux. Having to buy a windows license or borrow someone else's windows PC just to config a product and get it working is pretty poor.

Overall then I am happy to buy into the notion that using an off the shelf inverter that is signed off against the appropriate gird tie requirements is a good idea.

That does leave though the question of an affordable and controllable CC & CV high current charger. 1KW. would be great. So this is probably where I will put some effort over the coming weeks/months. I am not terribly impressed with the grid metering options that were available so this is an area where a self build or open source solution would be good too. Being able to run a storage setup without needing to get fleeced for the Envoy Metered would be cool.
Tolerance is a two way street