Electronic – How to determine number of devices that can be connected to 3v3 pin of ESP32

esp32i2c

I am not an electrical engineer. I’m experimenting with an ESP32 Dev Kit.

I was looking at this image:

multiple devices on single i2c bus

I had a couple if questions.

  1. In this diagram, there are two devices connected to the 3v3 pin. Is there any limit to the number of devices that can be connected to that pin, so as not to damage anything?

  2. Multiple i2c devices are connected to the same pins (21,22). How can I determine how many more devices I can connect to the same bus without damaging anything?

I guess what I’m trying to figure out is, when looking at the data sheet for my devices, what should I look for, so I can compute how many I can connect to a single esp32 in this fashion (same i2c bus, same 3v3 and gnd pins).

Best Answer

In this diagram, there are two devices connected to the 3v3 pin. Is there any limit to the number of devices that can be connected to that pin, so as not to damage anything?

You'll have first to understand what is the power regulator on that development board and how much current at the 3.3V voltage can it deliver (output current capacity). Then, you'll need to figure out both the device's maximum current consumption (how much current they are each sinking).

Once you got the 2 current numbers for the devices, add them up and verify that the sum doesn't exceed the power regulator current capacity. This quick method should guarantee that the 3.3V rail stays at that voltage value and does not drop under.

To really damage the power regulator, you may have to try harder as most power regulators monitor their output current and if their limit is exceeded they will protect against permanent damage. Low-dropout voltage regulators tends to be more "fragile" than DC-DC converters. Do you have a part number for this regulator?

Multiple i2c devices are connected to the same pins (21,22). How can I determine how many more devices I can connect to the same bus without damaging anything?

As long as you connect the I2C lines correctly to each device, you wouldn't damage anything.

I2C bus relies on external pull-up resistors for the rising edges of the signal. These resistors do exactly what they are intended to which is to pull the voltage on the bus back to the "high" state (or in your case, it would be 3.3V). Because of their current-limiting property, the resistor can only pull the bus back up at a limited rate (the bus needs to source current from 3.3V rail to "recharge" itself).

The more devices you have on the bus, the more it needs current from 3.3V to recharge itself and the slower the rising edge of the signal will be. At one point, with many, many devices connected, the edge will be so slow that you will "break" the data integrity of the bus (eg. you won't be able to read correct values from devices anymore). However, the hardware itself will remain fine.

Related Topic