Hi everyone!
I'm currently trying to build a diy UPS that will supply 12V to the attached load no matter what. I used an SLA battery (7Ah) in combination with a 12V power supply that can output up to 13.5V.
Requirement:
Circuit that switches between the 12V PSU and the battery in case of power outage and has it's output connected to the load.
[NOTE]:
A) The 12V battery is connected to the PSU through a boost converter so it can get charged.
B) An Arduino board will be used for another things, so if it is possible to control this with an Arduino (that's running other things though, let me know).
Solutions I have thought that would work:
- Arduino to sense power outage and then switch to the battery (I prefer that but I don't know if there is going to be a delay in that and btw I'm drawing about 5A)
- Auxiliary power supply connected to the gate of a MOSFET that controls battery's output.
Thanks!
lefterisgaryfalakis:
Circuit that switches between the 12V PSU and the battery in case of power outage and has it's output connected to the load.
Just use two Schottky diodes.
Battery --->|----+----Load
PSU --->|----´
You don't need to switch between mains and battery with a lead acid battery.
A 6 cell lead acid battery works at 13V2 (6 * 2V2). You need a power supply set at 13V2, which you connect across your battery and leave powered all the time. You connect your load across the battery. If the mains fails then the battery continues to supply the load.
If you want exactly 12V, not 13V2, then use a buck - boost converter between the battery and the load.
This arrangement is referred to as the battery being floated across the supply.
You can use a slightly higher voltage but not much, if you increase the voltage you risk overcharging the battery and damaging it. 13V5 should be okay. Search for battery university for more information.
It's better solution as Perry desribed. What about if We replace buck-boost with standard zener regulator?
Thank you so much all for your kind responses!
RIN67630:
Just use two Schottky diodes.
Battery --->|----+----Load
PSU --->|----´
Well, that's not going to work because the battery will always have a higher voltage potential and the current would flow from battery to load till the battery gets discharged. A normal 12V lead acid would have >13.5 when fully charged.
PerryBebbington:
You don't need to switch between mains and battery with a lead acid battery.
A 6 cell lead acid battery works at 13V2 (6 * 2V2). You need a power supply set at 13V2, which you connect across your battery and leave powered all the time. You connect your load across the battery. If the mains fails then the battery continues to supply the load.
If you want exactly 12V, not 13V2, then use a buck - boost converter between the battery and the load.
This arrangement is referred to as the battery being floated across the supply.
You can use a slightly higher voltage but not much, if you increase the voltage you risk overcharging the battery and damaging it. 13V5 should be okay. Search for battery university for more information.
I have seen float charging as an option to be honest but I have some concerns about it:
- According to my battery's manufacturer I need 13.8 to float charge it.
- I have seen people saying that at least once per month I should raise it up to 14.2V and then lower it back.
- I have a 13.5 PSU (not PC PSU obviously) and want to do it as much DIY as possible.
So that means I need to connect a boost converter to the battery that is controlled by an Arduino so we can change the voltage once a month using an RTC and since the boost converter has higher potential the battery's output shouldn't be merged with the PSU's one all the time. This is why I think a switch circuit is needed. What do you think?
Again thanks so much!
lefterisgaryfalakis:
Well, that's not going to work because the battery will always have a higher voltage potential and the current would flow from battery to load till the battery gets discharged. A normal 12V lead acid would have >13.5 when fully charged.
That work well indeed, provided that you PSU is at 14V, a voltage that you need anyway if you want to keep the battery at float.
The peaks at 14.4V are only useful if you want to reach a maximum back up time at the cost of reducing battery life.
Else, a 14v PSU, two diodes and a 10Ohm -100Ohm power resistor between the PSU and the battery to limit the float current is the way to go.
lefterisgaryfalakis:
Well, that's not going to work because the battery will always have a higher voltage potential and the
I have a 13.5 PSU (not PC PSU obviously) and want to do it as much DIY as possible.[/li][/list]
Isn't the PSU adjustable?
RIN67630:
That work well indeed, provided that you PSU is at 14V, a voltage that you need anyway if you want to keep the battery at float.
The peaks at 14.4V are only useful if you want to reach a maximum back up time at the cost of reducing battery life.
Else, a 14v PSU, two diodes and a 10Ohm -100Ohm power resistor between the PSU and the battery to limit the float current is the way to go.
No, I stated my PSU is 13.5V (12V +/- 10% is the adjustability). So can I just connect the power supply maxed out at 13.5 to the battery terminals and from there to a load?
I'm a bit confused becuase Perry has been telling me that lead acid float voltage is around 13V and according to a google search it is true but my battery datasheet says float voltage: 13.6-13.8.
Thanks!
I use a 12V 6A LifePO4 wall charger connected to a 12V 6Ah LiFePo4 battery. The battery is connected to a 5V switching regulator, and the regulator supplies an RPi.
The LiFePo4 charge controller has enough capacity to supply the RPi and charge the battery. If the wall power goes away, the battery keeps on supplying the regulator for many, many, many, many, many, many, many, many hours.
Idahowalker:
I use a 12V 6A LifePO4 wall charger connected to a 12V 6Ah LiFePo4 battery. The battery is connected to a 5V switching regulator, and the regulator supplies an RPi.
The LiFePo4 charge controller has enough capacity to supply the RPi and charge the battery. If the wall power goes away, the battery keeps on supplying the regulator for many, many, many, many, many, many, many, many hours.
That's a pretty nice idea indeed! What about if we were talking about higher currents (for example 20A)? I can't seem to find an appropriate charger but only LED PSUs like the one I mentioned earlier...
lefterisgaryfalakis:
13.6-13.8.
Thanks!
For a lead acid charger the battery will float around 13.6 to 13.8 volts.
For a LiFePo4 battery charger the battery will float from 13.6 to 14.8V.
If you got a supply of 13 to 13.8V put a lead acid battery across the line. In most instances the battery will act like a large capacitor.
lefterisgaryfalakis:
That's a pretty nice idea indeed! What about if we were talking about higher currents (for example 20A)? I can't seem to find an appropriate charger but only LED PSUs like the one I mentioned earlier...
Higher currents as in battery supply?
Is your load 20A or you mean for a 20Ah battery?
Like this ECO-WORTHY 12V 20Ah LiFePO4 Lithium Iron Phosphate Battery Deep Cycle Rechargeable Battery with Built-in BMS, 3000+ Life Cycles?
If the battery is a LiFePo4 100Ah battery a 6 amp charger will charge it, eventually. There are higher capacity LiFePo4 chargers.
Idahowalker:
For a lead acid charger the battery will float around 13.6 to 13.8 volts.
For a LiFePo4 battery charger the battery will float from 13.6 to 14.8V.
If you got a supply of 13 to 13.8V put a lead acid battery across the line. In most instances the battery will act like a large capacitor.
Oh that was fun! We posted at the exact same minute!
So, I started getting the point. What you suggest sounds exactly like what I need. Does it work with as low as 13.5V (which is the max voltage my psu can provide)? What if during a power outage the battery discharges a lot and power is then restored? Will the battery get destroyed since there is not a constant-current solution present?
Idahowalker:
Higher currents as in battery supply?
Like this ECO-WORTHY 12V 20Ah LiFePO4 Lithium Iron Phosphate Battery Deep Cycle Rechargeable Battery with Built-in BMS, 3000+ Life Cycles?
If the battery is a LiFePo4 100Ah battery a 6 amp charger will charge it, eventually. There are higher capacity LiFePo4 chargers.
No, I mean the load I want to connect will draw around 10-20Amps. That means when my house has power, it is going to be supplied through the psu so I would need a beefy one...
I have seen float charging as an option to be honest but I have some concerns about it:
According to my battery's manufacturer I need 13.8 to float charge it.
I have seen people saying that at least once per month I should raise it up to 14.2V and then lower it back.
I have a 13.5 PSU (not PC PSU obviously) and want to do it as much DIY as possible.
13V5 is fine. I have never seen any reason to raise the voltage. If the battery is heavily discharged and you want to recharge it quickly then you can use a slightly higher voltage for a quicker charge, that's assuming the power supply can supply the extra current, however, this is not essential. Just float it at 13V5, it will be fine.
lefterisgaryfalakis:
Oh that was fun! We posted at the exact same minute!
So, I started getting the point. What you suggest sounds exactly like what I need. Does it work with as low as 13.5V (which is the max voltage my psu can provide)? What if during a power outage the battery discharges a lot and power is then restored? Will the battery get destroyed since there is not a constant-current solution present?No, I mean the load I want to connect will draw around 10-20Amps. That means when my house has power, it is going to be supplied through the psu so I would need a beefy one...
13.5 volts would not be well for a LiFePo4 and would probably be OK for a lead acid.
If you are looking to supply your house with power you should look into using a MPTT charge controller; look it up, you'll need to know what a MPTT Charge Controller is; does things like load balancing, charge cycles.
You'll have to pick which battery, either Lead Acid or LiFePo4, and then select the charge controller technology to match.
Of course info "like I am going to run my house on a battery" would have been very useful info to have right at the beginning. It would have saved the posters time and energy in replying to a question where not all the facts were in evidence.
At this point, I gave a suggestion which I wish I had not made. It's not that my suggestion is wrong. It's that now I know the user is not familiar enough with the technology and that armed with my suggestion the OP may get him/her self killed.
PerryBebbington:
13V5 is fine. I have never seen any reason to raise the voltage. If the battery is heavily discharged and you want to recharge it quickly then you can use a slightly higher voltage for a quicker charge, that's assuming the power supply can supply the extra current, however, this is not essential. Just float it at 13V5, it will be fine.
Thanks so much Perry! I'm very glad to know 13.5V is okay (thanks to Idahowalker for that aswell!). No, since it's a typical UPS configuration I'm not in need of charging it fast or anything. Again, your help is really appreciated!
Idahowalker:
13.5 volts would not be well for a LiFePo4 and would probably be OK for a lead acid.
If you are looking to supply your house with power you should look into using a MPTT charge controller; look it up, you'll need to know what a MPTT Charge Controller is; does things like load balancing, charge cycles.
You'll have to pick which battery, either Lead Acid or LiFePo4, and then select the charge controller technology to match.
Alright, as I said in the above text I'm very glad to hear that!
No, I'm just looking to supply a few 12V applicances with uninterrupted power. That's all. Yes, I have heard both MPTT and PWM charge controllers. Again, thank you so much for your help!
Idahowalker:
Of course info "like I am going to run my house on a battery" would have been very useful info to have right at the beginning. It would have saved the posters time and energy in replying to a question where not all the facts were in evidence.
At this point, I gave a suggestion which I wish I had not made. It's not that my suggestion is wrong. It's that now I know the user is not familiar enough with the technology and that armed with my suggestion the OP may get him/her self killed.
I see that you edited your answer. What made you think that way?
I'm neither planning to run my house on a battery nor I asked something like that. If you look closely at the original post, you will see that I want to design a 12V UPS. A 12V UPS. And all I want to run is a few 12V appliances. Where's the problem? Which way do you imagine me getting killed? And by the way, your advice that a lead acid battery's float voltage is ~13.5V is enough to get a human being killed? Seriously?
One thing you do need to be aware of is that a lead acid battery can easily supply enough current to start a fire if shorted out. You MUST include a fuse in one of the leads to the battery as close to the battery as physically possible. All the current should pass through the fuse. The fuse should be high rupture capacity, HRC, which basically means filled with quartz sand.
PerryBebbington:
One thing you do need to be aware of is that a lead acid battery can easily supply enough current to start a fire if shorted out. You MUST include a fuse in one of the leads to the battery as close to the battery as physically possible. All the current should pass through the fuse. The fuse should be high rupture capacity, HRC, which basically means filled with quartz sand.
I must admit that I didn't know about the exact characteristics you mentioned, but I will look into how to implement such a fuse. Whatever I do in my life, I always have safety in mind. So do I in electronics. Please take my word for it, I always implement safety measures in each of my projects. So thank you for this very suggestion as it's probably the most important one on such things. Don't take my previous post as "offending". I just thought Idahowalker's post was a bit too much! 
Thanks!
Lefteris