Author Topic: Switch from flat to charged battery while under load  (Read 2348 times)

0 Members and 1 Guest are viewing this topic.

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Switch from flat to charged battery while under load
« on: August 10, 2019, 02:23:53 pm »
Hi All,

I am looking at building a solar charge solution to try to save a bit on my power bill for my soho server. I obtained a 1KW solar array for extremely cheap but due to austalian law with regards to PV and grid tie in, as well as the abysmal byback rates, I have decided to try and go another route. I already have a enterprise grade UPS I use to protect my equipment with which works great, I also know that I consume more then this solar array can generate, so my goal here is to make usage of this system without exceeding ELV (110V DC IIRC) at which point I would require an PV license.

My idea is to switch the UPS between two battery banks, one is maintained full for redundency reasons, the other is charged and discharged by the solar array. When the solar batteries are full I intend to switch the UPS over to them and disconnect the mains feed to the UPS, this should be simple, however the switch back is what I am worried about.

Switching back would require connecting the still charged UPS battery back to the UPS, however doing so will mean that the now flat solar battery bank will try to charge the UPS battery bank at an insane rate. I am looking for a way to avoid this.

The reason to use this method is simple, the cost of a large battery bank is at this time out of the question, and since I only intend to power one device, it doesn't need to be huge. Just large enough to cycle on and off solar power as the cells discharge and recharge.

I hope this makes sense. If anyone has any ideas it would be greatly appreciated.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9320
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Switch from flat to charged battery while under load
« Reply #1 on: August 10, 2019, 02:57:56 pm »
Just add additional battery capacity and a charge controller will take care of maintaining the charge level.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #2 on: August 10, 2019, 03:04:34 pm »
Just add additional battery capacity and a charge controller will take care of maintaining the charge level.

the cost of a large battery bank is at this time out of the question
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9320
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Switch from flat to charged battery while under load
« Reply #3 on: August 10, 2019, 04:21:39 pm »
Then use what you have for now. The charge controller will take care of it.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #4 on: August 11, 2019, 01:15:09 am »
I think you don't understand what I have tried to explain, or I didn't explain it very well..

I have a UPS feeding a server already with a battery bank, I do not want to use this battery bank for solar, i'd like it to continue to remain charged incase of a power outage while a secondary (solar chaged) bank is also flat. This way I wont loose redundency which is the entire purpose of a UPS.

I would like to hot swap between battery banks that are connected to the UPS, the change over will be from the flat solar batteries to the fully charged still unused UPS batteries. The UPS will not be using these batteries at this point as it's AC service will have been restored. I believe the UPS will complain and likely shutdown if I just cold disconnect the battery pack from it, as such I need a way to transition over that wont cause a massive charging current to flow from the still charged UPS batteries back into the now flat solar chaged batteries.

Edit: it might be possible to just switch them fast enough using some relays, I am yet to test any of this as I am waiting on parts, etc.
« Last Edit: August 11, 2019, 01:16:51 am by gnif »
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: Switch from flat to charged battery while under load
« Reply #5 on: August 11, 2019, 01:30:47 am »
Don't usually get confused with a problem, but seems I've managed this time :-) Can you do a rough wiring layout of the components in play / final wiring layouts.
As a quick "guess", can you use 50A+ diodes in a parallel setup to handle switch-over dropouts? And maybe even a small cap, 10,000uF as a filter.
Hello <tap> <tap> .. is this thing on?
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: Switch from flat to charged battery while under load
« Reply #6 on: August 11, 2019, 01:39:47 am »
I think you don't understand what I have tried to explain, or I didn't explain it very well..

I have a UPS feeding a server already with a battery bank, I do not want to use this battery bank for solar, i'd like it to continue to remain charged incase of a power outage while a secondary (solar chaged) bank is also flat. This way I wont loose redundency which is the entire purpose of a UPS.

I would like to hot swap between battery banks that are connected to the UPS, the change over will be from the flat solar batteries to the fully charged still unused UPS batteries. The UPS will not be using these batteries at this point as it's AC service will have been restored. I believe the UPS will complain and likely shutdown if I just cold disconnect the battery pack from it, as such I need a way to transition over that wont cause a massive charging current to flow from the still charged UPS batteries back into the now flat solar chaged batteries.

Edit: it might be possible to just switch them fast enough using some relays, I am yet to test any of this as I am waiting on parts, etc.


add diodes after that charger on both batteries?
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #7 on: August 11, 2019, 01:44:53 am »
Diodes alone wouldn't work as the UPS needs to be able to charge the pack, however it would allow the switch over and then a bypass on the diode to allow the reverse flow after the switch occurs.

:D

Edit: I even have some 35A rectifiers around here I could use simpy as a diode pack
« Last Edit: August 11, 2019, 01:47:00 am by gnif »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10385
  • Country: nz
Re: Switch from flat to charged battery while under load
« Reply #8 on: August 11, 2019, 01:53:53 am »
Could you put a supercap stage in there somewhere to buffer the potential difference during changeover.

Supercaps can handle really high charge discharge rates and also store enough energy to run the system for the few seconds it would take to do the transition.

I have not thought through the implications or details of this, but it seems to me that using a supercap with multistage switch-over might solve the problem
« Last Edit: August 11, 2019, 01:56:39 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #9 on: August 11, 2019, 01:56:51 am »
Yeah I thought of a supercap also, but I don't think it would be needed with the diode solution, all I need to do is prevent the UPS from seeing 0v. When the change over occurs it will already be back on mains so the output wont be interrupted.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10385
  • Country: nz
Re: Switch from flat to charged battery while under load
« Reply #10 on: August 11, 2019, 02:05:33 am »
Reading though your post a bit more i have a few more thoughts.

- Be careful trying to utilize a UPS for on time longer than it's original batteries.  They are usually not engineered for always on operation and overheat easily.  When i modified a UPS intended for small SLA to have a big SLA external battery i had to add some case fans to prevent it shutting down from overheating after a few hours.  This point is more of an issue with home UPS, business grade 'always on' UPS's are fine.


- Maybe have a system like this..
   * Supercap bank attached to the UPS through a resistor that limits current flow to whatever the max charge/discharge current is for the supercaps.
   * A relay that connects battery 1 across the supercap
   * A relay that connects battery 2 across the supercap. (these 2 relays could be interlocked to prevent both connecting)
   * A timer system to disconnect one, wait a few seconds and connect the other.

The current limit resistor is there so that the battery banks can only charge/discharge the supercap within its spec.  Since the supercap is quite small this will happen pretty fast.  The bank will charge/discharge the supercap to match its voltage within seconds.


- A diode-OR solution has some losses. Unless you do it using fets.  There are ICs that will drive two fets in a diode OR type config that may work
« Last Edit: August 11, 2019, 02:08:21 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #11 on: August 11, 2019, 02:15:40 am »
Yes, this is a HP Enterprise UPS designed for data center usage and is provided with the means to connect a large external SLA pack to it to allow for extended run time, so I doub't I will see issues. It's also rated for 2200W but I intend to only draw about 500W max from it.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: Switch from flat to charged battery while under load
« Reply #12 on: August 11, 2019, 02:34:07 am »
Diodes alone wouldn't work as the UPS needs to be able to charge the pack, however it would allow the switch over and then a bypass on the diode to allow the reverse flow after the switch occurs.

:D

Edit: I even have some 35A rectifiers around here I could use simpy as a diode pack

does the ups have to charge both batteries? if not maybe could split the connection to the a UPS battery so the charger is directly connected but the inverter after the diode
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #13 on: August 11, 2019, 02:37:12 am »
No, the UPS is intended to only keep its own set float charged. The other pack will be charged from solar. The intent is to completely disconnect the UPS batteries while there is sufficiant power in the pack charged from solar. This way they are not used unless there is an actual power outage and still available as a backup.
« Last Edit: August 11, 2019, 02:39:47 am by gnif »
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9320
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Switch from flat to charged battery while under load
« Reply #14 on: August 11, 2019, 02:44:43 am »
I think you don't understand what I have tried to explain, or I didn't explain it very well..

I have a UPS feeding a server already with a battery bank, I do not want to use this battery bank for solar, i'd like it to continue to remain charged incase of a power outage while a secondary (solar chaged) bank is also flat. This way I wont loose redundency which is the entire purpose of a UPS.
Just connect the batteries in parallel and don't use the full range for solar. For example, switch to solar when the charge level goes to 95% and rising, back to mains at 80% or when the sun goes down. You can even tap into the CPU frequency controls through software and vary it according to system power state, maybe even run a cryptocurrency miner if there's plenty of solar and nothing better to use it on.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #15 on: August 11, 2019, 03:32:56 am »
I have the opposite problem, I am drawing far more then the solar can produce, I intend to run the batteries until flat. I am avoiding using a grid tie in because the rates in AU suck, better to use the power myself.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9320
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Switch from flat to charged battery while under load
« Reply #16 on: August 11, 2019, 04:32:11 am »
It's a 1kW solar array so I would expect it to produce more than most servers use, at least during a few hours per day. It probably won't cover all of the energy use but I would expect some times when you'll have to up the load on the server to actually use the solar, then back it down at other times. I would say that getting enough batteries to store all surplus production probably wouldn't be economical, but dynamically adapting to solar production would be.

There might be a way to tell the UPS to switch to batteries even with the mains present, eliminating the need to actually switch the mains with an external circuit.

If the server has a redundant PSU setup, check if it prefers to draw most/all power from one input in normal operation or load balance between the two. (That could even be adjusted through BIOS in some cases.) In the latter case, there might be some merit to adding a transfer switch to allow one of the inputs to bypass the UPS, allowing some control over how much to pull from the UPS. Ideally, there would be some way to program the power balance dynamically for fine tuning.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10385
  • Country: nz
Re: Switch from flat to charged battery while under load
« Reply #17 on: August 11, 2019, 04:45:22 am »

There might be a way to tell the UPS to switch to batteries even with the mains present, eliminating the need to actually switch the mains with an external circuit.


Yes, some UPS have a serial/USB test command.
You can say, run on battery for X hours or Run on battery until flat.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3051
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Switch from flat to charged battery while under load
« Reply #18 on: August 11, 2019, 04:47:57 am »
You want to limit the current drawn from the fresh battery put in parallel until the flat one is disconnected (some milliseconds later).

No different that limiting the current until big capacitors are charged, ie, this is a soft-start situation with the added factor of disconnecting the flat battery during the soft-start.  You can probably find a soft-start controller (inrush limiting PMIC) that can do that.

Or, use a micro, switch in the new battery in parallel through a suitable resistor, disconnect old battery, short out the limiting resistor so full current is now available.

~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #19 on: August 11, 2019, 04:54:06 am »
It's a 1kW solar array so I would expect it to produce more than most servers use

This is not most servers, is a 16 core threadripper with two GPUs and 4 monitors running an array of 15 spinning disks and multiple virtual machines, it will certainly consume more then the array can produce.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Switch from flat to charged battery while under load
« Reply #20 on: August 11, 2019, 08:17:53 am »
I would like to hot swap between battery banks that are connected to the UPS, the change over will be from the flat solar batteries to the fully charged still unused UPS batteries. The UPS will not be using these batteries at this point as it's AC service will have been restored.
That sounds like a fine moment for mains outage :-+

I think the diode solution may be OK. But do check what happens if the UPS tries to charge in the short window when one battery is connected only with diode and the other not connected yet.
« Last Edit: August 11, 2019, 08:20:37 am by magic »
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Switch from flat to charged battery while under load
« Reply #21 on: August 11, 2019, 08:33:28 am »
Back-to-back connected MOSFETS of appropriate rating and control circuitry would be able to switch over from one battery to another within some 10 to 100us. The UPS buffer cap should cover for that. Back-to-back MOSFETS operate like a "real" switch, conducting and isolating in both directions (within their capabilities).
Currently I'm thinking about extending the capacity of my homegrown solar battery system using such a configuration, adding a second battery that would be charged by another source (more solar power):
http://wunderkis.de/pvbat/
Safety devices hinder evolution
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Switch from flat to charged battery while under load
« Reply #22 on: August 11, 2019, 08:45:26 am »
It is not good idea to modify your "last line of defense" UPS. I would leave it alone. As you consume more than PV can produce - why don't you just install grid-tied inverter w/o batteries. Does "PV license"+ grid tie inverter is more expensive than battery pack for 1KW solar?
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1716
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Switch from flat to charged battery while under load
« Reply #23 on: August 11, 2019, 10:58:30 am »
It is not good idea to modify your "last line of defense" UPS. I would leave it alone. As you consume more than PV can produce - why don't you just install grid-tied inverter w/o batteries. Does "PV license"+ grid tie inverter is more expensive than battery pack for 1KW solar?

It's not my last line of defence, it's one of two. Grid tied inverters in australia are a joke, we have to have a seperate meter that measures what we generate, and we are reimbursed that amount on our electricity bill, but at the abysmal rate of 6c/kwh. Dave did a video on his grid tie in a little while back that explains all this and how much we get ripped off over here. If I stay within ELV and don't mess with the mains directly there is no issue and instead of getting 6c/kwh saving on my power, I will get 58c/kwh.
« Last Edit: August 11, 2019, 11:00:31 am by gnif »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Switch from flat to charged battery while under load
« Reply #24 on: August 11, 2019, 12:21:33 pm »
Grid tied inverters in australia are a joke, we have to have a seperate meter that measures what we generate, and we are reimbursed that amount on our electricity bill, but at the abysmal rate of 6c/kwh.

Sorry, didn't see video about PV in Australia because honestly don't care. Your grid buys electricity from individuals at 6c/kwh rate, right? This is important for those who during day are able to generate more than they consume, who use grid as a "storage" - sell excess power. This is not your case because your PV generates less than you consume at any time of the day. You may just plug grid-tied inverter into socket and do not tell anyone ;)
« Last Edit: August 11, 2019, 05:26:57 pm by ogden »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf