Part Number:BQ27411-G1
Hello,
We are using the BQ27411-G1A to monitor the SOC of our batteries. We are manually setting all values in ROM. Everything is working fine except the current measured by the fuel gauge when it is charging the batteries.
When discharging, the fuell cell measures with great accuracy the current flowing trough the 10m Ohm resistor. Never the less, when the batteries are charging the fuell cell reports approximately double the current that's flowing through the resistor. We have measured voltage drop across the resistor and also measured the current flowing trough the resistor and comparing it with the value reported by the fuel gauge, yielding the following table:
![]()
We tried two different devices with the same results "Equipo A" and "Equipo B". V Bat Tester is the voltage of the batteries reported by a tester, V Bat FG is the Voltage reported by the Fuel Gauge (FG). V R14 is the voltage drop in the 10m Ohm resistor measured with a tester.
As you can see, the FG reports an incorrect value for positive values of current (batteries charging). We are also sure it is reading current incorrectly, because when charging the Remaining Capacity reported by the Fuel Gauge increases to approximately double the design capacity. In the file "serial_20181222_144052_carga.txt" we have monitored the FG behaviour when charging from a full discharge.
(Please visit the site to view this file)
We are using two Li-Ion 3.7V 680mAh batteries connected in parallel. Here are the schematics of our design regarding the Fuel Gauge:
![]()
Also, with this function we are writing the values configured in ROM:
void fg_write_data_memory2 (void) {
unsigned char uc;
int cs;
fg_write(0x00, 0x00); // UNSEAL
fg_write(0x01, 0x80);
fg_write(0x00, 0x00);
fg_write(0x01, 0x80);
fg_write(0x00, 0x13); // SET_CFGUPDATE
fg_write(0x01, 0x00);
uc = fg_read_unsigned_byte(0x06);
while ((uc & 0x10) == 0) {
_delay_ms(100);
uc = fg_read_unsigned_byte(0x06);
}
fg_write(FG_BLOCKDATACONTROL, 0x00); // BlockDataControl
cs = 0;
fg_class(2); // safety
fg_block(0);
cs = fg_write_data_word(0, 550, cs);
cs = fg_write_data_word(2, 0, cs);
cs = fg_write_data_byte(4, 50, cs);
fg_checksum_write(~cs);
//
fg_class(36); // charge termination
fg_block(0);
cs = fg_write_data_word(0, 25, cs);
cs = fg_write_data_byte(2, 40, cs);
cs = fg_write_data_byte(3, 99, cs);
cs = fg_write_data_byte(4, 95, cs);
cs = fg_write_data_byte(5, -1, cs);
cs = fg_write_data_byte(6, 98, cs);
cs = fg_write_data_word(7, 50, cs);
fg_checksum_write(~cs);
//
fg_class(48); // data
fg_block(0);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_byte(2, -13, cs); // not default
cs = fg_write_data_word(3, -500, cs); // not default
fg_checksum_write(~cs);
//
fg_class(49); // discharge
fg_block(0);
cs = fg_write_data_byte(0, 10, cs);
cs = fg_write_data_byte(1, 15, cs);
cs = fg_write_data_byte(2, 2, cs);
cs = fg_write_data_byte(3, 5, cs);
fg_checksum_write(~cs);
//
fg_class(64); // registers
fg_block(0);
cs = fg_write_data_word(0, 0x25F8, cs);
cs = fg_write_data_byte(2, 0x0F, cs);
cs = fg_write_data_byte(3, 0x80, cs);
fg_checksum_write(~cs);
//
fg_class(68); // power
fg_block(0);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_word(7, 3, cs);
cs = fg_write_data_word(9, 2800, cs);
cs = fg_write_data_byte(11, 1, cs);
fg_checksum_write(~cs);
//
fg_class(80); // IT cfg
fg_block(0);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_word(4, 30, cs);
cs = fg_write_data_byte(10, 8, cs);
cs = fg_write_data_byte(17, 70, cs);
cs = fg_write_data_byte(19, 20, cs);
cs = fg_write_data_byte(20, 5, cs);
cs = fg_write_data_word(22, 800, cs);
cs = fg_write_data_byte(28, 10, cs);
fg_checksum_write(~cs);
//
fg_block(1);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_byte(35, 92, cs);
cs = fg_write_data_byte(36, 96, cs);
cs = fg_write_data_word(37, 125, cs);
cs = fg_write_data_word(39, 4, cs);
cs = fg_write_data_byte(41, 3, cs);
cs = fg_write_data_byte(42, 25, cs);
cs = fg_write_data_byte(44, 15, cs);
cs = fg_write_data_byte(45, 20, cs);
cs = fg_write_data_word(48, 500, cs);
cs = fg_write_data_word(52, 0, cs);
cs = fg_write_data_word(54, 0, cs);
cs = fg_write_data_byte(59, 1, cs);
cs = fg_write_data_byte(60, 20, cs);
cs = fg_write_data_word(61, 11, cs);
fg_checksum_write(~cs);
//
fg_block(2);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_word(70, 0, cs);
cs = fg_write_data_word(72, 200, cs);
cs = fg_write_data_word(74, 100, cs);
cs = fg_write_data_byte(76, 2, cs);
fg_checksum_write(~cs);
//
fg_class(81); // Current Thresholds
fg_block(0);
cs = fg_write_data_word(0, 167, cs);
cs = fg_write_data_word(2, 100, cs);
cs = fg_write_data_word(4, 250, cs);
cs = fg_write_data_word(6, 60, cs);
cs = fg_write_data_byte(8, 60, cs);
cs = fg_write_data_byte(9, 1, cs);
cs = fg_write_data_byte(10, 179, cs);
cs = fg_write_data_byte(11, 179, cs);
cs = fg_write_data_word(12, 400, cs);
fg_checksum_write(~cs);
//
fg_class(82); // State
fg_block(0);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_word(0, 16384, cs); // error here
cs = fg_write_data_byte(2, 0x00, cs);
cs = fg_write_data_word(3, 0, cs); // ?
cs = fg_write_data_byte(5, 0x81, cs);
cs = fg_write_data_word(6, 3803, cs);
cs = fg_write_data_word(8, 3752, cs);
cs = fg_write_data_word(10, 1360, cs); // Design Capacity 680+680 mAh
cs = fg_write_data_word(12, 5032, cs); // Design Energy 1360 mAh * 3.7 V
cs = fg_write_data_word(14, 1340, cs);
cs = fg_write_data_word(16, 3200, cs); // Terminate Voltage 3200 mV
cs = fg_write_data_byte(26, 1, cs);
cs = fg_write_data_word(27, 25, cs); // Tapper rate = 10*1032/Charge_current
cs = fg_write_data_word(29, 4100, cs);
cs = fg_write_data_byte(31, 10, cs); // Sleep current
fg_checksum_write(~cs);
//
fg_block(1);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_word(33, 4190, cs); // error ?
cs = fg_write_data_word(35, -50, cs);
cs = fg_write_data_word(37, -50, cs);
cs = fg_write_data_word(39, 1, cs);
fg_checksum_write(~cs);
//
fg_class(104); // Data
fg_block(0);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_byte(0, 0, cs);
cs = fg_write_data_byte(1, 0, cs);
cs = fg_write_data_byte(2, 0, cs);
fg_checksum_write(~cs);
fg_class(107); // Current
fg_block(0);
cs = fg_write_data_byte_dummy();
cs = fg_write_data_byte(1, 5, cs);
fg_checksum_write(~cs);
fg_write(0x00, 0x42); // SOFT_RESET
fg_write(0x01, 0x00);
uc = fg_read_unsigned_byte(0x06);
serial_printf_P(PSTR("flags %02X\n"), uc);
while ((uc & 0x10) != 0) {
_delay_ms(100);
uc = fg_read_unsigned_byte(0x06);
}
uc = fg_read_unsigned_byte(0x06);
serial_printf_P(PSTR("flags %02X\n"), uc);
fg_write(0x00, 0x20); // SEAL
fg_write(0x01, 0x00);
return;
}
Any ideas ?
Thanks, Tomás