Decoupling I2C twisted wire VDD and VSS lines - Page 1
Forum section: electronics / beginners

author: SlowBro
author_rank: Regular Contributor
timestamp: January 11, 2018, 04:57:26 am
content: 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 estimatebased on similar cablesit 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 theNXP I2C-bus specification and user manualthe following on page 60:QuoteSo what size and type of capacitor(s) should I use to decouple?

author: Paul Price
author_rank: Super Contributor
timestamp: January 11, 2018, 09:21:01 pm
content: 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.

author: SlowBro
author_rank: Regular Contributor
timestamp: January 12, 2018, 04:01:20 am
content: 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

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: January 12, 2018, 04:06:32 am
content: Most probably, at his price, what you received is not a BME280 but a BMP280 which as no humidity sensor.

author: SlowBro
author_rank: Regular Contributor
timestamp: January 12, 2018, 04:32:51 am
content: Quote from: JacquesBBB on January 12, 2018, 04:06:32 amThe auction even says BMP280...

author: SlowBro
author_rank: Regular Contributor
timestamp: January 12, 2018, 06:07:07 am
content: Quote from: SlowBro on January 12, 2018, 04:01:20 amAside 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?

author: tautech
author_rank: Super Contributor
timestamp: January 12, 2018, 06:43:24 am
content: Quote from: SlowBro on January 12, 2018, 04:01:20 amThe 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.

author: SlowBro
author_rank: Regular Contributor
timestamp: January 13, 2018, 01:11:24 am
content: Quote from: tautech on January 12, 2018, 06:43:24 amIt'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?

author: tautech
author_rank: Super Contributor
timestamp: January 13, 2018, 03:09:49 am
content: Quote from: SlowBro on January 13, 2018, 01:11:24 amOver 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.

author: SlowBro
author_rank: Regular Contributor
timestamp: January 13, 2018, 03:38:00 am
content: 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?

author: Ian.M
author_rank: Super Contributor
timestamp: January 13, 2018, 04:02:34 am
content: 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.

author: tautech
author_rank: Super Contributor
timestamp: January 13, 2018, 04:08:46 am
content: Quote from: SlowBro on January 13, 2018, 03:38:00 amFine.QuoteThere'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.QuoteYep.Some time scoping the data and VCC lines with various solutions to the above will show you that these thingssometimeshave 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 theselittlethings.Quote from: Ian.M on January 13, 2018, 04:02:34 amThe USB source type is not disclosed.

author: SlowBro
author_rank: Regular Contributor
timestamp: January 13, 2018, 04:24:02 am
content: Quote from: tautech on January 13, 2018, 04:08:46 amAnd 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.Quote from: tautech on January 13, 2018, 04:08:46 amThe 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.

author: SlowBro
author_rank: Regular Contributor
timestamp: January 13, 2018, 04:27:12 am
content: Quote from: Ian.M on January 13, 2018, 04:02:34 amAfraid some of that is above my head... edge rate... 800KHz... and how does that work with tautech's recommendation of 1mF?

author: tautech
author_rank: Super Contributor
timestamp: January 13, 2018, 04:56:53 am
content: For your little board it's doubtful you'llneed1000uF, 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 andverifywhen the prototype is complete.Device datasheets tell you what parameters you need to work within, read, study and understand them, they are your friend.