It’s not unusual to end up with dead laptops whose battery is still useable for some other projects, the most usual practice, is to dismantle them to recover 18650 cells, but then you will have some prolems with integrating them on your project, the first one is avoiding stuff to catch fire or blow up and the second one is that you have no way to reliably tell how much % of charge is left on these batteries, and their real capacity ( capacity decreases with time and usage ).
These batteries in most cases are connected to an I2C/SMBus of the laptop and they use the Smart Battery protocol, which is a standard of most advanced battery powered systems, especially laptops.
The hardest part normally is to find the pinout of these batteries, but since Acer easily leaks complete motherboard schematics, it has not been hard to find these pinouts.
For now i’ve worked with a AL10B31 battery and a AS07B41 battery, they have different pinout, but both can be found on the respective schematics of the Quanta ZE6 and Quanta ZO3. One important thing to be careful about is that once you are using the connector from the motherboard outside the laptop, it’s easy to insert it reversed by accident and cause serious damage both to the arduino and to the battery itself.
Charging the battery and using it
The AL10B31 and AS07B41 batteries are both 11.1V , that means that there are 3 cells in series, so to charge them you have to use a CC-CV power supply with 12.6V ( 4.2*3 ) and at most 1.5-2 amperes.
The battery of the Acer Aspire One ( Quanta ZE6 ) has an additional safety measure that will prevent you from charging it by just applying 12.6V on it’s + and – terminals.
There’s the pin 3 that has to be connected to ground with a 1KOhm resistor to enable the battery.
|Quanta ZE6 battery connector
Even if in the above schematic it says “short”, i’ve used 1KOhm resistor because that’s the resistance i’ve measured on the netbook’s motherboard between this pin and ground.
The AS07B41 that has same pinout of the AS07A(31/32/41) used by Quanta ZO3 but reversed and it does not have any safety measure that remove power from it’s + and – pins if not connected to the laptop, so if you just want to charge it you are ready to go with 12.6V CC-CV and at most 2 amperes
|Quanta ZO3 battery connector
Connecting to and monitoring the battery with an arduino
SMbus and I2C are physically compatible with each other, so like in the laptops i2c devices and battery share same bus, you can use the battery almost like and i2c device.
The only problem is that arduino Wire library does not give you much control over speed and start/stop, so, you will have to use a software i2c library.
Before including the .h of the library ( if you are too lazy to put the library in a folder, like me , you can just paste the contents on you sketch ), you have to define which pins to use for software I2C.
#define SDA_PIN 3
#define SDA_PORT PORTD
#define SCL_PIN 2
#define SCL_PORT PORTD
#define I2C_SLOWMODE 1
On the arduino mega 2560 these are pins 19 for SCL ( MBCLK ) and pin 18 for SDA ( MBDATA ) .
You have also to define I2C_SLOWMODE in the case you have problems with communicating to the battery.
I’m using that sketch to read values from the battery:
byte deviceAddress = 11;
#define VOLTAGE 0x09
#define TEMPERATURE 0x08
#define CURRENT 0x0a
#define CAPACITY 0x10
#define TIME_TO_FULL 0x13
#define CHARGE 0x0d
Serial.begin(115200); // start serial for output
int fetchWord(byte func)
i2c_start(deviceAddress<<1 | I2C_WRITE);
i2c_rep_start(deviceAddress<<1 | I2C_READ);
byte b1 = i2c_read(false);
byte b2 = i2c_read(true);
return (int)b1|((( int)b2)<<8);
byte i = 0;
for ( i= 0; i < 127; i++ )
bool ack = i2c_start(i<<1 | I2C_WRITE);
if ( ack )
int v = fetchWord(VOLTAGE);
unsigned int tempk = fetchWord(TEMPERATURE);
float tempc = ((float)tempk)/10.0-273.15;
Serial.print(“Current (mA):” );
int ma = fetchWord(CURRENT);
Serial.print(“Capacity (mAh):” );
int mah = fetchWord(CAPACITY);
int ch = fetchWord(CHARGE);
Serial.print(“Charge PCT: “);Serial.print(ch);
Serial.print(” Minutes remaining for full charge: “);
I’ve omitted the beginning because it’s just the software i2c library and some includes like LiquidCrystal.h .
|Quanta ZE6 battery
|Charging AS07A(31,32,41) , Quanta ZO3
|Charging AS07B31 ( Same pinout as AS07B41 )
On the hardware side instead, you have to connect the arduino ground to the battery ground ( BE VERY SURE IT IS THE BATTERY GROUND ) and SCL, SDA pins respectively to MBCLK and MBDATA pins.
You have also, as the master of the i2c bus provide the pullup, so you have to use 2 10K resistors connected between +5V and the SDA,SCL lines.
Once you enable the battery ( if required ) , you should be able to communicate with it using that code.
If you are interested on monitoring other parameters, like remaining time to 0%, design voltage , manufacture date , etc, you can see what is the ID to use here http://sbs-forum.org/specs/sbdat110.pdf
Finally, i remind to who is going to use these batteries, that they have high energy density, so they can start a fire or explode if mishandled.
Edit: I’ve discovered that sometimes reading are wrong, lowering I2C frequency solves that issue , to do that modify
#define I2C_DELAY_COUNTER (((I2C_CPUFREQ/25000L)/2-19)/3)
#define I2C_DELAY_COUNTER (((I2C_CPUFREQ/15000L)/2-19)/3)