0
\$\begingroup\$

I am using an ESP32, which has two i2c buses.

I am thinking of adding multiple devices to each bus (a total of 20 devices, 10 devices per bus).

The maximum length of any device on a bus from esp32 will be less than 1 metre.

The connected devices are of two kinds: 1. Sensors - they return data 2. Motor drivers (drv2605L), which are used to make LRAs connected to them vibrate.

Do I need a repeater or extender? Will I have any problems ? Any suggestions?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Basically the same as : electronics.stackexchange.com/q/479440/152903 \$\endgroup\$
    – Solar Mike
    Feb 4, 2020 at 15:21
  • 1
    \$\begingroup\$ @SolarMike actually this question is about determining the length at which to use repeaters and extenders. The other question doesn’t mention anything about it, and neither do any of the answers. \$\endgroup\$ Feb 4, 2020 at 16:36
  • 2
    \$\begingroup\$ So actually you could have written one question properly... \$\endgroup\$
    – Solar Mike
    Feb 4, 2020 at 16:39
  • 2
    \$\begingroup\$ Try it and find out. You won't do any damage. If it doesn't work you can try reducing the speed. \$\endgroup\$
    – user253751
    Feb 4, 2020 at 17:04

2 Answers 2

2
\$\begingroup\$

You need to check the total capacitive load with the pullup resistor values for the RC time constant check if the rise and fall time (3 time constants long) are enough for your data rate.

Smaller pullup resistors are faster and can work with more capacitance but cause more current to flow through the pin when it drives the line LO, so you can't go too small.

Active pullups also exist, not just buffers, repeaters, or extenders. They replace the pullup resistors and are a constant current source so no RC time constant.

\$\endgroup\$
3
  • \$\begingroup\$ I’m very new to electronics. How to do that? \$\endgroup\$ Feb 4, 2020 at 15:13
  • 1
    \$\begingroup\$ @KaizerSozay See RC time constant. You can probably neglect cable capacitance in this case. Use part datasheets to see if they list input capacitance \$\endgroup\$
    – DKNguyen
    Feb 4, 2020 at 15:14
  • 1
    \$\begingroup\$ See I2C bus manual and application notes to how to calculate those. There will be ready made tables as well. Cable capacitane cannot be neglected, for example I2C bus has max capacitance specification of 400 pF, and about eight meters of Cat5 exceeds that. And it also means that with passive resistive pull-ups the limit due to rise time is about 200pF. \$\endgroup\$
    – Justme
    Feb 4, 2020 at 17:44
2
\$\begingroup\$

The maximum I2C bus capacitance for on segment is 400pF. So you need to calculate the total capacitance including the cable capacitance (e.g. ~100pF/m, depending on the structure of the cable used), device pin capacitance (e.g. ~8pF/pin, depending on the ic package), and PCB wire trace capacitance (e.g. ~3pF/in depending on the trace width and trace to trace or ground plane spacing).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.