Battery Backup System For Laptop

Remember my Modem Backup System ? That was a complete disaster. I spoiled two of my new 6V SLA (Sealed Lead Acid) batteries not so long after I installed it. The time based charging method failed outright. The batteries bulged and I had to scrap the whole system. A similar system was needed for my laptop when the battery pack was no longer be able to power it for even a minute. I can't allow that due to obvious reasons such as losing my data and work progress. Buying a new battery pack will cost a minimum of Rs.3K. I had this idea of building a backup system with Lead-Acid batteries ever since I noticed the degradation of the battery pack. So it was time to build one.

The idea is actually simple. I already have the laptop AC adapter (my laptop is Toshiba Satellite C50A by the way). It outputs 19V with a maximum current of 3.95A. Your laptop's charger might come in different ratings, but they function more or less the same. They're essentially an SMPS with a fixed output voltage. The DC-DC converters inside the laptop will convert this voltage to many different voltages and also charge the battery pack. When the laptop is plugged in, the motherboard will source power from the charger directly, while charging the battery (that's the reason why you should not use the laptop always plugged in becasue the battery pack never get the chance to discharge). Most laptops can be turned on safely without the battery pack installed. You'll see a "No battery detected" message at the taskbar in Windows 7. Now there's an obvious problem; if the power goes out, the lappie will turn off and you'll lose your work. I just wanted a system that can keep the laptop on for sometime when the AC power goes out (power outages are common here) so that I can save my work and shut it down or hibernate. Below is a basic block diagram.

Laptop Battery Backup System Block Diagram


As you can see from the diagram, the backup system sits between your laptop's adapter and the computer itself. The AC adapter will provide enough current for both charging the 12V SLA battery and at the same time power the laptop through the charging port (without the battery pack installed). That is important becasue if the adapter can't supply enough current you'll be overloading and or overheating it and run the risk of an "automatic shutdown" by the adapter which isn't desirable. So make sure it can provide sufficient current.

The next section is an LM317 based charger for the 12V SLA battery. I first tried an XL4015 based 5A buck converter for this and the result was not great. The module was burnt up after it tried to charge the almost depleted battery. I did not have any higher power buck converters to replace it so I had to go by the conventional method which is a linear regulator. It's highly inefficient but that was the only way to go. Definitely, an LM317 can't supply the current we need. So we have to simply add a pass transistor for the excess current while the LM317 will be in charge of setting the voltage. I used TIP3055. The schematic is well known.


The transistor will heat up really quickly when supplying high currents. So it needs a mean looking heatsink. I used an old aluminium heatsink used with old Intel CPUs. The TIP3055 can furnish currents in excess of 10A. If you need more current for some reason, you can connect more of them in parallel but this time with series resistors to equalize the currents through all of them. Otherwise one of them will channel all of the current and die out.

The output voltage of the charger is set to 13.7V becasue we need to use the SLA battery in "standby" mode. A standby mode is where we keep the battery always connected to the charger and ready to kick in anytime. The other mode is "cyclic" where we fully charge the battery once and discharges it after disconnecting from the charger. This is meant for portable applications. Cyclic and standby modes have different supply voltages which are labelled on the battery enclosure. For a 12V one, standby is from 13.5 to 13.8V and for cyclic is 14.4 to 15V. When you disconnect a battery put in standby mode, it'll show an open circuit voltage of around 13.2-13.7V depending on its charge level.

The output of the charger is directly connected to the battery terminals and also to the next section, the input of the boost converter. A boost converter is necessary to boost the 13V of the battery to 19V. If you don't have a boost converter or don't want to use one, you can change the battery configuration to 24V and use a buck converter instead. I used a UC3843 based 150W (as advertised) converter that accepts voltages in the range of 10-32V and boosts to 12-35V. This article, https://martin-jones.com/2013/02/15/150w-boost-converter-schematic by Chris Jones have a schematic and more details on the design of the converter and a way to use it at lower input voltages. One thing you first need to do is, replace the input and output capacitors of the module with better ones. The stock ones won't last.

150W Boost Converter


150W Boost Converter

Adjust the output voltage of the boost converter to the desired voltage, in my case 19V. I had tested the converter for its load capability. It could provide more than 6A at 19V with a 100mV drop which is pretty good load regulation, and it did not even warm up in that situation which proves the 150W claim.

I used two separate voltmeter modules to display the battery voltage, the output voltage and the output current. For the battery voltage, I used a 3 digit voltmeter which is similar to the DSN-DVM-368 module, but with a difference of a potentiometer to adjust the reading. The module has a precision of 0.1V which is enough for this application. For the output display, I used a similar one but with an added 10A ammeter.

Three digit voltmeter


Three digit voltmeter


Three digit voltmeter ammeter


Three digit voltmeter ammeter


The ammeter circuit seems straight forward. There's a metal piece used as a shunt and an LM358 in differential configuration to measure and amplify the voltage drop across it. The output is directed to an STM32 microcontroller (don't know the part number becasue it seems to have been scrapped off). The ammeter section is meant to be connected to the low side (negative side) of the load. Connecting it at the high side (positive side) will damage it. There are two potentiometers to adjust the output reading with the help of a good multimeter. Here are the connection diagrams from AliExpress where I bought these modules from.


Three Digit Voltmeter Ammeter Connection Diagram

Three Digit Voltmeter Ammeter Specifications


As per the specifications, the module can be powered from 4-30V which is the on-board linear regulator is supposed to reduce to 3.3V presumably. Connecting it to the 13.7V was fine for a prolonged time.

Building and Assembly

Nothing special about the build. In fact it is in contrast to how I usually build things. That was becasue I could not afford the time making everything perfect like I want. My whole day depends on my laptop. I had to put together this as fast as possible.

I used an old PC SMPS' metal enclosure. If you remember, it is what I used for the modem backup system. Made some cuts here and there for the switches, DC jacks and the voltmeters. The wiring is a disaster inside, I know. That is mainly becasue I had already cut, soldered and tubed most of the connections before I had the plan to use this enclosure. I did not want to trim the high quality wires for the sake of installing it.

Laptop Battery Backup System


Laptop Battery Backup System


I connected the two 12V cooling fans to the 13.7V directly. It doesn't seem to be a problem for them. They generate about 50dB noise together. For the output and input ports, I used normal 6.3 mm DC jacks.

Testing

I tested the output currents with some wire-wound resistors. The charger section can supply in excess of 7A and the buck converter up to 6A without any issue. The average current consumption of the computer is 1.5A.

Laptop Battery Backup System


Meanwhile I tried out something else; I tried supplying the battery terminals inside the laptop with 10.8V to see if it'll turn on with the DC pin unplugged. That did not work. Turns out, you need to tell the motherboard there's a proper battery installed through the SMBus. If you can do that, it'll probably work. The mobo will simply detect an always fully charged battery. But the safest option is definitely through the DC port.


Toshiba Laptop Battery Connector

Problems and Troubleshooting

1. Do not let the output voltage of the charger section drop too low, specifically below the battery voltage. This is becasue the charger section is meant to supply power to both the running laptop and the battery simultaneously. If the voltage decreases below battery voltage, that'll reduce the current from the charger, and instead the battery will start to supply current to the computer which after some time will deplete it. This will cause the laptop to turn itself off after detecting insufficient current. This happened to me several times before I had the voltmeters in place while I was testing. As linear regulators have not so good load regulation, the voltage can drop up to 2V. So keep an eye on the voltage at the battery terminals.

2. The ammeter module often restarts, ie the display resets to all 8s and continue to operate within a second. I still don't know why this happens.

3. You'll need to calibrate the voltmeters and ammeter with a good multimeter otherwise will get inaccurate readings. As these make use the internal low precision ADCs of microcontrollers, don't expect much precision.

Result

Everything works fine so far. I often turn off the input and let the battery discharge for a while; it's good for it. The whole build cost me under Rs.1.5K excluding the salvaged items. The 7AH battery costs Rs.750. If you can parallel two of them, that'll double the backup time. The charger circuit is capable of handling two of them.


Links