I2C cable

We need a 1-meter length of 100kHz (or slower) I2C onnection. It'd be nice to use a pre-made cable: micro-USB, 4-wire RJ11, or RJ45 ethernet. Some considerations: SCL and SDA crosstalk(?), high ground capacitance. Also need 3.3V, Gnd.

Micro-USB: SCL and SDA twisted together, bad? RJ11: flat, SCL and SDA on outside lines? RJ45: SCL and SDA shielded from each other.

--
 Thanks, 
    - Win
Reply to
Winfield Hill
Loading thread data ...
- 400pf. Max @100khz . Cat5 should work. There are bus extenders too.

Cheers

----Android NewsGroup Reader----

formatting link

Reply to
Martin Rid

formatting link

--
----Android NewsGroup Reader---- 
http://usenet.sinaapp.com/
 Click to see the full signature
Reply to
Martin Rid

Just for lab use? Or is this part of the flex or beehive question from earlier?

I'd be loathe to suggest anything not shielded at least in some rudimentary way. There are lots of styles of flat or round multiconductor cable that would do, and then a regular header will do on the end, or modular connectors if you like those.

Incidentally, any idea if PVC (outgassing, plasticizers, chewing?) compatible with bees? How about electric fields?

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Design 
 Click to see the full signature
Reply to
Tim Williams

This goes from the little PCB located on the outside of the beehive, mating to the flex.

Well, a nice thing about a CAT5 connector is, readily available in many lengths. I'm adding a Harting RJ45 jack to the PCB now.

Bees are robust, maybe, but hive operators stick to natural materials = wood. Near the end of the season, the environment in the hive can get pretty nasty. That's why I'm adding gas sensors. But dunno what we'll find. Maybe nothing.

formatting link

--
 Thanks, 
    - Win
Reply to
Winfield Hill

RJ11 connectors work nicely for i2c in conjunction with the following four-core flat cable: Farnell 130-2745 which has a pvc outer sheath and polypropylene insulated conductors. I have used this combination in production with cable lengths of 7m.

For such lengths it is important to follow the more recent NXP recommendations: Power and ground in the middle, sda and sclk on the outside. In most systems the largest source of interference is from the adjacent signal transitions. Power and ground decoupled to each other at each end of the cable.

Many devices can be daisy chained, but keep them in a continuous line without branches to form a constant impedance transmission line. Consider some gentle RC damping at the controller end to minimise reflections. Treating the bus as a transmission line really does have benefits. More info later... John

Reply to
jrwalliker

OK, John, yes, crosstalk is the big concern. And, hey, CAT5 is UTP, unshielded twisted-pair, not shielded.

--
 Thanks, 
    - Win
Reply to
Winfield Hill

SHIELDED CABLE (STP) vs UNSHIELDED CABLE (UTP)

Cat 5E cables are most commonly utilized with unshielded twisted pairs (UTP). However, environments with large motors, generators, and certain types of high-voltage lighting are major sources of Electromagnetic and Radio Frequency Interference (EMI/RFI). In these applications, shielded twisted pair (STP) cable will help protect data signals when connected properly

formatting link

Many other examples on google

Reply to
Steve Wilson

Why do you need shielding ?

Put clock in one twisted pair, data in an other pair and Vdd/Gnd in the third pair.

If only two pairs available, use the non-active members of each pair for Vdd resp. Gnd. Use heavy AC decoupling between these non-active pair members.

After all, 100 kHz is a quite low frequency.

Reply to
upsidedown

But the falling edges can be fast enough for transmission line effects to be important when the cable is a few metres long. Double clocking due to reflections makes a mess of i2c.

Using the lowest possible pullup resistors or using active pullup that approximates to a constant current clamped at Vcc can help with noise immunity in the high state.

John

Reply to
jrwalliker

Right, John. Fast falling edges are worrisome. Even more-so, as I'm driving I2C with a fast STM processor. I regret my PCB doesn't have a place for source resistors, or anything (in this rev anyway). I'm using 10k pullups on each end (5k net), and added a spot on the PCB for an additional pullup resistor for SCL.** My flat P6C4 cable has SCL and SDA separated 80 mils, by power and ground.

** A newby on an EE forum claimed he got good results for 15m, with 10k for SDA, and 2k or somesuch, for SCL.
--
 Thanks, 
    - Win
Reply to
Winfield Hill

Do you mean loath by any chance? Just being a bit pedantic.

Reply to
John S

The signals themselves might not need shielding, but that ignores ambient noise. We're considering a clock signal here, so we need to be wary of fast changes from external sources.

I2C is supposed to discard rapid changes -- interfaces are supposed to sample (at fairly high rate) and filter (to avoid noise), but, who knows. Not everyone follows the standard properly, y'know?

Twisted pair, used in unbalanced mode, still helps relative to doing nothing at all, but it isn't much on immunity.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Design 
 Click to see the full signature
Reply to
Tim Williams

I thought I had read the standard once some time ago and don't recall that it is intended to be sampled like a UART. Is that literally in the spec or does it say some amount of noise is to be rejected and not seen as a start condition or clock edge?

--
  Rick C. 

  - Get a 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Rick C

Agreed, but I only have 24 to 36-inches of cable, and beehives are in electrically-quiet places.

Also, it's OK if we occasionally get a bad data transmission. We'll see how it works out.

--
 Thanks, 
    - Win
Reply to
Winfield Hill

Uh, be careful what you wish for. If you are using proper I2C it has a han g condition which the Intel SMBus doesn't since it includes a time out. I don't use I2C or SMBus so I can't say how significant this is, but Intel ad ded the timeout for a reason. I assume your hives are relatively remote. How much impact will it have if you have to go to them once a month to rebo ot everything to unhang the I2C bus?

--
  Rick C. 

  + Get a 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Rick C

do you need UV resistant? weatherproof?

yes bad, maybe put SDA on white as SCL on red and +3 on green

or SDA-0-scl-3.3

or RJ12 0-SDA-0-3.3-SCL-0

meh.

--
  When I tried casting out nines I made a hash of it.
Reply to
Jasen Betts

It's been so long since I looked at the standard in that much detail. But some kind of minor filtering is required. A digital filter would be a typical implementation.

If you have, say, MCU peripherals that require fairly high clocks relative to the data rate (i.e., "400kHz"), say a 16x or higher prescaler, that's probably what's being done.

In a correct implementation, the "400kHz" isn't, it's just the average when everything is behaving as it should, activating and releasing SCK in a timely manner, and with pull-up, capacitance and rise time in spec.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Design 
 Click to see the full signature
Reply to
Tim Williams

The OP had only a 1 m long line, the two way CAT5 cable propagation delay is about 0.01 us. While the fall time can be short, the rise time with 400 pF stray capacitances is up to 1 us and according to the I2C standard, the signal must remain stable for 4 us. No doubt, each receiver must have some hysteresis (Schmitt trigger). In a missmatched line, the reflected signal causes over/ndershot.

Use series termination on each node to tame the reflections.

Reply to
upsidedown

It'd be nice, but otherwise I'll wrap everything with rubber mastic electrical tape, or some such.

This is my choice: RJ12 6P6C connector, except 3.3-SDA-3.3-0-SCL-0 (3.3 and 0 are equivalent) Flat 6P6C cables from Amazon, $4 each. An RJ12 connector at each end, series damping resistors. A bit of a kludge, but beehive clock is ticking.

Mounted RJ45 connector, but too big, cable too stiff, unsure of how the shielded variant works. Went to smaller, simpler RJ12 instead.

--
 Thanks, 
    - Win
Reply to
Winfield Hill

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.