» Topics » Repair, modernization »Device extending laptop battery life

A device that extends the battery life of a laptop

A device that extends the battery life of a laptop

This device, according to the wizard, is able to extend the battery life of the laptop several times. The idea to make such a device came to the master after the battery on a laptop bought two years ago sat down after 30 minutes, and a year later, the laptop turned off after 5 minutes of operation.

After searching for information on this problem on the Internet, the master found a study by CADEX which stated that reducing the battery charge to 40% extends its battery life by 6 times.

Thus, the solution proposed by the CEO of CADEX (a company that develops battery management tools) is to charge the battery when it is discharged to 40%, and turn off charging when it reaches 80% charge. But to constantly keep the battery charged at a level of 40 to 80% is not easy, if not impossible. That's why the wizard developed BatteryCare, a module for disconnecting or reconnecting the power supply to a PC. It is controlled via Bluetooth with a program that monitors the battery level.

For the manufacture of such a device, the following materials are needed:
Bluetooth module HC-05;
-Relay;
Microcontroller ATtiny85;

The circuit is quite simple and consists of an ATtiny85 microcontroller, a Bluetooth HC-05 module and a 230 V relay. In addition, there is a 5V power supply for electronics.

The code is also very simple. Charging starts when the “c” command is recognized and ends with the 'd' command. The wizard uses the SoftwareSerial library because ATtiny85 does not have hardware serial communication.
#include "SoftwareSerial.h"

#define RELAY_OUTPUT 4

const int rx = 3;
const int tx = 1;

SoftwareSerial mySerial (rx, tx);
int i = 0;
char buf [12];
int inByte = 0;

void setup ()
{
  pinMode (rx, INPUT);
  pinMode (tx, OUTPUT);
  pinMode (RELAY_OUTPUT, OUTPUT);
  digitalWrite (RELAY_OUTPUT, HIGH); // turn the RELAY off
  
  mySerial.begin (9600);
}

void loop ()
{
  if (mySerial.available () & gt; 0)
  {
    inByte = mySerial.read ();
    if (inByte == 'c')
    {
      digitalWrite (RELAY_OUTPUT, LOW); // turn the RELAY on
    }
    else if (inByte == 'd')
    {
      digitalWrite (RELAY_OUTPUT, HIGH); // turn the RELAY off
    }
  }
}

The program also needs to be installed on a laptop.
The main principle of the program is to send the character “c”, activate the power supply and send the character “d” to turn it off. These commands are determined by the selected thresholds.

To communicate via Bluetooth, you must first pair the HC-05 module with a PC (parameters> Bluetooth devices and others>, add a Bluetooth device or other device), the requested code is 1234 or 0000.

You must store .exe in the same folder as .dll.You can also start BatteryCare at startup by placing the shortcut for .exe in: C: \ ProgramData \ Microsoft \ Windows \ Start Menu \ Programs \ Startup

The wizard developed this program, trying to simplify the user interface as much as possible.
This program turns off the power when it detects computer hibernation. However, it did not work out immediately to set the same mode when the power was turned off.

To facilitate connecting the module at startup, the wizard created a small configuration file called “config.txt”, it contains the serial communication port number that the computer uses to transmit information via Bluetooth, as well as the charge and discharge threshold.

To overcome the problem of disconnecting the module when turning off the PC, the wizard used a script, or rather two. When the PC shuts down, the BatteryCare_discharge.bat script is executed. He will run the ps1 script himself, which will send the “d” character to the communication port.
To configure the script to run when the computer is turned off, you need to do the following:
Turn on PowerShell script execution:
open PowerShell in the admin section: set-executepolicy unrestricted
win + r gpedit.msc: in user configuration / window settings / scripts / logOFF
Click add, then find and copy 2 files in the open folder and select the .bat file.
This is really not the best way to do this ... but it is the fastest that the master was able to implement.

All software is available at this address: https://github.com/David-LETINAUD/BatteryCare
The master has been using this device for more than 3 years and has no complaints.
Question \ topic is automatically published in the social. site network - stay tuned for answers there:

Suitable for topic

Related topics

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose
7 comments
Quote: Korolev
I think the main advantage of a laptop over a stationary PC is its mobility.
The laptop does not always work on battery power; many people use it instead of a stationary one. And when you need mobility, no one bothers to turn off this mode and work with full charge.
R555,
As for the number of charge-discharge cycles that battery manufacturers say, this is a moot point. When NiCH batteries replaced NiCd, manufacturers claimed that the latter lacked a memory effect. You can recharge without waiting for a full discharge. But practice has shown that this is not so. Same thing with lithium-ion.
pogranec,
I read the article with great interest. I have a problem with the laptop battery has long become relevant. It happens that it turns off after 10 minutes of intensive work (when you mount a video, for example).
I really did so that the screen dims, then goes out while the charge is still normal.
Ivan_Pokhmelev,
The service life is increased by 2.4 times.
I think the main advantage of a laptop over a stationary PC is its mobility. If we take the average battery life from a fully charged battery - 2 hours, then this algorithm of charging - disconnecting the battery will give a battery life of 48 minutes. scratch
reducing the battery charge by up to 40% extends its service life by 6 times.
It follows from the table heading that it does not extend the service life, but increases the number of charge-discharge cycles. The service life is increased by 2.4 times.
Author
Korolev,
I got it right
-right. Also drew attention to this. In the original article, at the end, there is LINK research article (click on the LINK). If you want, you can read.
I correctly understood that when working from a network power supply, this device will charge the battery to 80% capacity, turn off the power supply and discharge the battery to 40% capacity, and so cyclically, thereby "eating" the number of charge-discharge cycles of the battery? And what is the algorithm of the laptop working offline, for 40% of the battery charge? scratch

We advise you to read:

Hand it for the smartphone ...