when battery of my laptop, a very old DELL E5400, stoped working, i start to investigate to find what was the problem.
first i build the I2C sniffer you can found here: [I2C] Yet another I2C logging program.
with use of I2C sniffer i found that my battery say it has a negative total capacity, for this reason PC ignore it at all, and don’t charge it anymore.
after hours of search on the web, i wasn’t able to find a way to fix the battery, so i decided to build a Smart Battery emulator with Arduino.
first, i tried the good work made by @General_Victm posted here: Trying to simulate a SMBus from an Smart Battery accu pack with the Arduino Uno.
the original sketch was partially working on my PC, but i done a lot of changes to make it fully working on my DELL laptop.
sincerly is not 100% working, because DELL battery have a kind of authentication mechanim that i don’t know, but this don’t let the sketch unusable, because authentication code change only when AC charger is connected with PC turned off, so the workaround is simple, first turn on PC then connect AC charger.
you can find the sketch as attachment.
SMBusBatteryEmulator.ino (18.3 KB)