2
\$\begingroup\$

I am trying to build an UPS for my laptop. My laptop doesn’t have a battery and battery port is damaged, only way I can power my laptop is from the DC port. But the problem is where I live power outages are frequent and it becomes really annoying while I am working.

I made an UPS circuit that will be connected between the DC adapter and the laptop, the circuit will be connected with 4s lithium-ion battery and includes a boost converter to get the needed voltage. So the circuit will switch between the battery power and the adapter.

I have provided the schematic here:

Schematic

The problem I am having is while switching from the adapter to battery. The circuit is working fine, when I simulate a power outage, it switches to battery power, but there is a slight delay of about 0.5 sec to 1 sec, which means my laptop turns off, defeating the purpose. (I don’t know why it’s happening) I want it to switch instantly.

I have used a 6V relay to do the switching and used this mini buck converter to power the relay also added a free wheeling diode (not mentioned in the schematic) to protect the buck converter.

This is the boost converter I used.

The circuit can only charge or power the load; it can’t do both simultaneously. The charger is disconnected via the DPDT switch. This is the charger I used.

The SR560 Schottky diode is used to prevent reverse current flow to the boost converter and the adapter. And a 1000uf capacitor (not mentioned in the schematic) on the output to smooth out the voltage.

\$\endgroup\$
3
  • \$\begingroup\$ What is the current drawn by the laptop? \$\endgroup\$
    – AnalogKid
    Apr 25 at 20:48
  • \$\begingroup\$ It varies, I measured it while doing my usual work it draws about 800-1000 mah at max. I generally use chrome and Microsoft office. So, I loaded my chrome with 5-7 tabs with various websites running in the background and using ms office in the foreground….. it consumes 800 mah to 1000 mah. I did this test connected to the battery and the boost converter and measured the current draw from the battery…. The current draw from the boost converter would probably be lower \$\endgroup\$
    – D vlogs
    Apr 25 at 21:02
  • \$\begingroup\$ Also my laptop adapter is rated for 3 amps \$\endgroup\$
    – D vlogs
    Apr 25 at 21:10

2 Answers 2

3
\$\begingroup\$

See that buck converter which drives the relay to connect the battery to the boost converter? That converter has a certain hold-up time. When Vcc drops, the output of the buck converter does not drop instantly. As a result, the relay does not kick in instantly either.

it's made worse by the behavior of the relay. Relays have both pull-in and pull-out ratings, typically something like 85% and 15% of rated voltage. So, when the buck converter DOES start dropping, since it will follow something like an inverse exponential, it can take quite a while to drop low enough for the relay to release.

To work around this, try adding a big extra cap for extra storage, set up like

schematic

simulate this circuit – Schematic created using CircuitLab

The cap is going to have to be pretty damn big, in order to supply the laptop for about a second. And you may well need a series resistor on the input section of the cap circuit to limit inrush current when Vcc turns on.

\$\endgroup\$
5
  • \$\begingroup\$ Do you have any recommendation for the rating of the caps and the resistors? \$\endgroup\$
    – D vlogs
    Apr 25 at 21:21
  • 2
    \$\begingroup\$ Why use a buck converter instead of connecting an appropriately rated relay directly to VCC? \$\endgroup\$
    – BobT
    Apr 25 at 21:25
  • \$\begingroup\$ Well, i just had that on hand ... And also if i see options ... 6v, 12, and 24v relays are available to me .... In which 6v, 12v are out of the question. My adapter is around 19.5v .... My question is will it be able to turn the 24v relay on ?.... I will try it tho .... If it does ... Then all good \$\endgroup\$
    – D vlogs
    Apr 25 at 21:50
  • \$\begingroup\$ @Dvlogs Good chance the 24V relay will turn on at 19.5V but please check the datasheet. You can also consider using a resistor or Zener diode in series with the relay to drop extra voltage. \$\endgroup\$
    – user253751
    Apr 26 at 9:40
  • 1
    \$\begingroup\$ @BobT - Well, you'll want at least a 20 volt cap, and 25 is probably a good place to start. If you're feeling conservative, 35V is a standard value. The capacitance depends on how much current your load takes, and exactly ho much voltage drop you can accept on the output during the relay delay. The formula is dV = it/C, where dV is the voltage drop, i is the current in amps, and C is the capacitance in farads. This works for t small enough to give a dV less than than about a third of the start voltage. \$\endgroup\$ Apr 26 at 18:29
2
\$\begingroup\$

It can be made much simpler. No relay needed. No buck needed. Only one diode. And a DPST switch :)

schematic

simulate this circuit – Schematic created using CircuitLab

Given that you're putting this together from modules - the simpler the better. Leaving the boost converter in-circuit won't do any harm, although you want to set its output voltage slightly lower than the voltage on the cathode (output side) of D1 when fully loaded.

That way, the boost converter's controller will keep the switch off, and no boosting will be done, as the output voltage will be above the regulation target.

Once VCC is lost, D1 turns off, the load voltage starts to fall, and the boost converter's control loop kicks in and starts commutating the MOSFET switch to do the boosting, to regulate the output voltage.

With SW1 open, the load is turned off, but the battery is still being charged.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Given that the load is a laptop with its own power switch (and a power cable you can unplug),you might as well drop SW1 completely. \$\endgroup\$
    – TooTea
    Apr 27 at 6:32
  • 2
    \$\begingroup\$ Some laptops also tend to have a switching power supply stage built in and hence a fairly wide input voltage tolerance. With some luck,you could then drop the external boost converter as well. \$\endgroup\$
    – TooTea
    Apr 27 at 6:39
  • \$\begingroup\$ @BobT thanks for that I replaced the relay and .. it works, tho the problem is not gone ... I did figure it out what was happening .... It's actually my laptop charger... Please see the the comment below i will explain it there \$\endgroup\$
    – D vlogs
    Apr 29 at 19:59
  • \$\begingroup\$ @Kuba well the charger i am using ... Keeps an led on when the battery is connected but not charging, and it bothers me. Also, i don't want to keep it "on" all the time..... Since the charger gets really hot even at 1 amps and these all will be fitted in a small box ... Not to mention keeping my battery topped of 24/7 kinda feels unsafe even tho I have a bms .... I want to discharge the battery but don't want to charge it frequently.... See powers downs are frequent in my place but ...the time frame is short ... So .. i want to let it discharge before recharging it back up.... \$\endgroup\$
    – D vlogs
    Apr 29 at 20:10
  • \$\begingroup\$ Ok so, here is the problem i am facing.... The circuit i made 1st was alright ....later I modified it and replaced 5v relay to 24v relay and removed the buck... It works as well but with the same problem..... Upon further testing i realised it was the laptop adapter that was causing the delay.... See when there is a power outage the ac supply to the adapter stops but the dc side does not drop instantly its a graduate drop even with the load connected, must be the caps, laptops turns off at a certain voltage... But the relays have even lower release voltage ... \$\endgroup\$
    – D vlogs
    Apr 29 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.