Design challenge n.15: Pull-up resistors on I2c bus

A project log for Green BMS

Open source Bluetooth Smart Battery Management System

sergio-ghirardelliSergio Ghirardelli 10/25/2021 at 17:140 Comments

The last difficulty I had to overcome came when the project was finished.

While charging the battery, noises from the charger caused communication losses.

The good news was that the system went into protection, blocking the charge, and that the system reset itself and resumed its normal functions.

But the bad news was that the I2C network was too sensitive to noises.

I immediately thought about the filtering problems, questioning the size of the capacitors I installed in the boards.

By researching the typical problems of an I2c network, I realized that I was neglecting the pull-up resistors: with the increase of the connected bus cards (in my case 16), the capacity of the line increased.

So I tried to add the pull-up resistors in the free I2c connector on the last bus board, making a termination connector

In my case I did this: I removed power from the bus and measured the resistance value between 5v and SDA (and 5v-SCL). I measured 10 Kohm.

After that I applied a Resistance of 1.8 k (parallel of 3.3K and 3.9K) in order to bring the total pull-up resistor of the bus = 1,5 Kohm.

Maybe the method I used is a bit empirical ...

For those who have time, a more scientific method is to connect with an oscilloscope, view the signal and use a trimmer to find the suitable resistance.

In any case, the empirical method worked well: the network no longer crashed due to the noise of the charger!