Author Topic: Decoupling I2C twisted wire VDD and VSS lines  (Read 1777 times)

0 Members and 1 Guest are viewing this topic.

Offline SlowBro

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Decoupling I2C twisted wire VDD and VSS lines
« on: January 11, 2018, 04:57:26 am »
What size and type of capacitor(s) should I use to decouple the VDD and VSS wires in a 1m solid core 22 gauge 4 conductor shielded twisted pair cable with drain wire?

I'm setting up a board with few Fast-mode (400KHz) 3.3V I2C devices, two of which will be on the aforementioned cables. The cables will be used to supply 3.3V (VDD) and GND (VSS) for a BME280 humidity sensor, and the other will be an auxiliary unknown future expansion I2C device. The SCL will be twisted with the VSS and the SDA with the VDD. VSS will be connected to the shielding. I don't yet know the line capacitance but I estimate based on similar cables it will be about 220pF/m. Rpullup of all devices on my bus combined is about 1,125ohm and Rserial will be 100 ohm, all of which appears to my newbie eyes to be in spec.

I read in the NXP I2C-bus specification and user manual the following on page 60:
Quote
If the bus lines are twisted-pairs, each bus line must be twisted with a VSS return. Alternatively, the SCL line can be twisted with a VSS return, and the SDA line twisted with a VDD return. In the latter case, capacitors must be used to decouple the VDD line to the VSS line at both ends of the twisted pairs.

So what size and type of capacitor(s) should I use to decouple?
« Last Edit: January 11, 2018, 03:01:40 pm by SlowBro »
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1419
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #1 on: January 11, 2018, 09:21:01 pm »
The circuit you are driving at the end of the cable should already have bypass capacitors at the VDD to VSS lines. If not, you must add  bypass capacitors, and larger values are better with higher current loads. Most lower power circuits can be compensated for the inductance and resistance of their feed cable lengths with .1 to 100-uF, but when circuit currents are >1A then consider 100uf to 1000uF, depending on the space/cost requirements of the circuit. You can check the effective filtering with readings you can observe on a scope with different values of bypass capacitance. In general, as a rule of thumb, more capacitance for bypass is better, but are costlier in regards to size of space used and price. The idea here, when a scope is not available is to find a minimum value that makes the circuit work well and then double it.
« Last Edit: January 11, 2018, 09:23:39 pm by Paul Price »
 
The following users thanked this post: SlowBro

Offline SlowBro

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #2 on: January 12, 2018, 04:01:20 am »
The BME280 module is very low current, under 10mA (and probably around 1mA) and any accessories I create for the aux port will be low current as well. When possible I will drive them with external power supplies.

I do see what looks like a decoupling cap on the module, between GND and VCC. I don't believe I have the necessary tool to measure its capacitance so is there any concern if they are mismatched? E.g. a nice big honkin' 10uF electrolytic on one end but these tiny caps on the other?

And this is the eBay auction where I bought it:
https://www.ebay.com/itm/Altimeter-BMP280-Breakout-Board-Atmospheric-Pressure-Sensor-For-Arduino-Module/391935290008?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649
« Last Edit: January 12, 2018, 04:07:10 am by SlowBro »
 

Offline JacquesBBB

  • Frequent Contributor
  • **
  • Posts: 784
  • Country: fr
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #3 on: January 12, 2018, 04:06:32 am »
Most probably, at his price, what you received is not a BME280 but  a BMP280 which as no humidity sensor.
 
The following users thanked this post: SlowBro

Offline SlowBro

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #4 on: January 12, 2018, 04:32:51 am »
Most probably, at his price, what you received is not a BME280 but  a BMP280 which as no humidity sensor.

:palm:

The auction even says BMP280...

:palm:
 

Offline SlowBro

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #5 on: January 12, 2018, 06:07:07 am »
I do see what looks like a decoupling cap on the module, between GND and VCC. I don't believe I have the necessary tool to measure its capacitance so is there any concern if they are mismatched? E.g. a nice big honkin' 10uF electrolytic on one end but these tiny caps on the other?

Aside from my previous question above, another: Should I use caps of different sizes to filter out different frequencies, or is this decoupling only intended to reduce the influence of the I2C clock -- so that I only care about 400KHz decoupling?
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 17459
  • Country: nz
  • Taupaki Technologies Ltd. NZ Siglent Distributor
    • Taupaki Technologies Ltd.
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #6 on: January 12, 2018, 06:43:24 am »
The BME280 module is very low current, under 10mA (and probably around 1mA) and any accessories I create for the aux port will be low current as well. When possible I will drive them with external power supplies.

I do see what looks like a decoupling cap on the module, between GND and VCC. I don't believe I have the necessary tool to measure its capacitance so is there any concern if they are mismatched? E.g. a nice big honkin' 10uF electrolytic on one end but these tiny caps on the other?
The module closest to the VCC supply shouldn't need additional bulk capacitance IF it's near to the VCC supply.
For the 'remote' unit however it would be advisable to add additional capacitance as the onboard cap won't provide sufficient decoupling. Leave the SMD cap there for the HF stuff and add either electrolytic or tantalum of 10-100uF.
Watching the remote VCC and a transmit signal line with a scope will indicate if you have added enough remote capacitance.
Avid Rabid Hobbyist
 
The following users thanked this post: SlowBro

Offline SlowBro

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #7 on: January 13, 2018, 01:11:24 am »
I do see what looks like a decoupling cap on the module, between GND and VCC. I don't believe I have the necessary tool to measure its capacitance so is there any concern if they are mismatched? E.g. a nice big honkin' 10uF electrolytic on one end but these tiny caps on the other?
The module closest to the VCC supply shouldn't need additional bulk capacitance IF it's near to the VCC supply.

It's not near the VCC supply. It's plugged in via 15' USB cable to a USB power supply. So if I have money and space for a 10uF on the main unit, are there any concerns with that?
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 17459
  • Country: nz
  • Taupaki Technologies Ltd. NZ Siglent Distributor
    • Taupaki Technologies Ltd.
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #8 on: January 13, 2018, 03:09:49 am »
I do see what looks like a decoupling cap on the module, between GND and VCC. I don't believe I have the necessary tool to measure its capacitance so is there any concern if they are mismatched? E.g. a nice big honkin' 10uF electrolytic on one end but these tiny caps on the other?
The module closest to the VCC supply shouldn't need additional bulk capacitance IF it's near to the VCC supply.

It's not near the VCC supply. It's plugged in via 15' USB cable to a USB power supply. So if I have money and space for a 10uF on the main unit, are there any concerns with that?
Over 15' I'd consider 100uF the very least you'd want and without checking rail decoupling with a scope I'd add 1000uF to be on the safe side. Half that's probably enough, just whatever you have handy.
Remember it will also help buffer the VCC rail for the remote unit and maybe allow for less bulk capacitance there also.
Complex circuits allow for reducing amounts of bulk capacitance progressively along the rails and also the traditional 0.1uF at devices for decoupling and suppression of any HF garbage that might have been induced along the way.
Sometimes tantalum is used as it has better HF properties than electrolytic and can sometimes serve as bulk and decoupling capacitance. 
Avid Rabid Hobbyist
 
The following users thanked this post: SlowBro

Offline SlowBro

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #9 on: January 13, 2018, 03:38:00 am »
I don't understand. As far as I know I'm just trying to reduce cross-talk on the I2C line between the devices. It requires all that because the power supply is 15' away?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 8243
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #10 on: January 13, 2018, 04:02:34 am »
100nF ceramic as close as possible to each end of the twisted pairs will provide a low impedance path between Vcc and Gnd at frequencies up to above 10MHz.   As the edge rate of a 400KHz I2C signal is only 800KHz, that + normal on-board bulk decoupling, should be adequate.

If the device has a USB interface, you must not exceed the 10uF limit on bulk decoupling directly on USB Vbus, or it wont pass the USB inrush current test.
 
The following users thanked this post: SlowBro

Offline tautech

  • Super Contributor
  • ***
  • Posts: 17459
  • Country: nz
  • Taupaki Technologies Ltd. NZ Siglent Distributor
    • Taupaki Technologies Ltd.
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #11 on: January 13, 2018, 04:08:46 am »
I don't understand.
Fine.
Quote
As far as I know I'm just trying to reduce cross-talk on the I2C line between the devices.

There's three parameters for digital coms that need be considered.
Impedance of supply.
Decoupling.
Crosstalk.

Each can be addressed separately and sometime one remedy will be a fix.
Crosstalk is less common and can be mitigated with pull up or pull down resistors on the data lines.

Quote
It requires all that because the power supply is 15' away?
Yep.

Some time scoping the data and VCC lines with various solutions to the above will show you that these things sometimes have little effect on the operation and other times show that there are indeed effects that might of might not effect proper operation.

This is the difference between throwing something together and it usually working or employing decent design practices to ensure it works and under any condition.
Experience gives us clues to what might be needed to make a circuit bulletproof beyond just the basic active components that make up the guts of the circuit.

When you deal with digital devices, the fast risetimes from their outputs suck little chunks of power and these need be managed and provided for in the design. The supply need be low impedance and local bulk capacitance provides for this. Decoupling caps manage the amount of impact the draw of the chunks affect the supply and maybe also affect another device on the same supply.

When a prototype is complete it is very important to verify the VCC rails are not influenced too greatly by normal operation so that communication thresholds are not challenged by blips on the supply rails.

Some time on a circuit with a scope will reveal all these little things.  :)

If the device has a USB interface, you must not exceed the 10uF limit on bulk decoupling directly on USB Vbus, or it wont pass the USB inrush current test.
The USB source type is not disclosed.
Avid Rabid Hobbyist
 
The following users thanked this post: SlowBro

Offline SlowBro

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #12 on: January 13, 2018, 04:24:02 am »
This is the difference between throwing something together and it usually working or employing decent design practices to ensure it works and under any condition.

And that's what I'm after, a solid design.

Thanks, I just wanted to ensure the situation was well-understood. I thought a 1mF cap seemed excessive, but then I switched from tantalum to electrolytic in DigiKey and saw the price/size difference, and breathed a sigh of relief :-) A 15 cent 8mm cap is within budget, price and size-wise.

If the device has a USB interface, you must not exceed the 10uF limit on bulk decoupling directly on USB Vbus, or it wont pass the USB inrush current test.
The USB source type is not disclosed.

The I2C cable wouldn't be directly on the USB Vbus but coming from the +3.3V pin on the RPi.

Anyway the source type is just a wall wart. Unless I misunderstood the question.
« Last Edit: January 13, 2018, 04:27:39 am by SlowBro »
 

Offline SlowBro

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #13 on: January 13, 2018, 04:27:12 am »
100nF ceramic as close as possible to each end of the twisted pairs will provide a low impedance path between Vcc and Gnd at frequencies up to above 10MHz.   As the edge rate of a 400KHz I2C signal is only 800KHz, that + normal on-board bulk decoupling, should be adequate.

Afraid some of that is above my head... edge rate... 800KHz... and how does that work with tautech's recommendation of 1mF?
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 17459
  • Country: nz
  • Taupaki Technologies Ltd. NZ Siglent Distributor
    • Taupaki Technologies Ltd.
Re: Decoupling I2C twisted wire VDD and VSS lines
« Reply #14 on: January 13, 2018, 04:56:53 am »
For your little board it's doubtful you'll need 1000uF, I was just giving an example of what might be required with a more power hungry circuit.
Understand that blips on the VCC line could potentially induce blips on data lines but they're unlikely to challenge data thresholds.
Principles are what need be understood, allow for them and verify when the prototype is complete.
Device datasheets tell you what parameters you need to work within, read, study and understand them, they are your friend.
Avid Rabid Hobbyist
 
The following users thanked this post: SlowBro


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf