I2C TXS0108E long cable problems

I have a Teensy 3.2 communicating via I2C to a 20x4 display and a Serial Wombat (PIC16 with custom firmware). The I2C is levelshifted by a TXS0108E bidirectional level shifter board. No external pull ups on lines.

The two I2C peripherals are both connected to a perfboard board just to make connections easier. This board has also been proven reliable.

On a breadboard the setup works perfectly.

I built a perfboard which houses the Teensy and level shifter. This has been tested and works fine.

The long cable is about 30CM or 12in.

The issue comes when I connect a longer cable between the level shifter and the I2C peripherals. The display will not display anything (just squares), and the Teensy will report just random values coming in from the Serial Wombat. Almost as if the I2C was floating.

I tried using the I2C scan sketch with the long cable and it just finds random addresses that change with each scan.

If I disconnect the Serial Wombat, then the display starts functioning as intended - scanner finds the 0x27 address and nothing else. This is with the long cable too.

I’ve tried inserting 4.7K pull-ups on the I2C peripheral side with the long cable - no change.
With no cable, everything still works as intended.
Ive tried 1K pull-ups, still nothing.
Ive tried pull ups on the output side of the logic level shifter, still won’t work.

Any ideas?

Its the Serial Wombat, not the cable.

I2C was developed for chip-to-chip communication on a single PCB. Any I2C connection longer than a few cm can create a problem.

There are various possible fixes. You can try lowering the pullup resistors to 2.2K, lowering the I2C clock speed, use ribbon cable with alternating signal and ground wires, an I2C extender with active terminators, etc.

1 Like

Yes, the issue disappears when the serial wombat is unplugged.

But everything works as it should using the level shifter and serial wombat with the short cable.

The issue only comes backs when using long cable + level shifter.

Everything works fine if I bypass the level shifter. I tried a 2ft cable, no problems.

This makes me think that with the long cable the Serial Wombat cannot make the bidirectional shifter change direction.

I’ve also tried unplugging the display and just having the serial wombat + level shifter. Still has issues with the long cable.

Which end of the cable is the level shifter? Put the level shifter at the far end next to the 3v3 device so the cable is driven by 5v instead of 3v3

The level shifter is next to the 3.3V device (Teensy) already. The idea was to have the cable at 5V.

The Serial Wombat and LCD display are both 5V devices.

I’ll also add that I’ve double checked the OE pin on the TX0108E and it works.

A Teensy 3.2 is a 3.3V ARM Cortex-M4.

What is a Serial Wombat ? https://www.serialwombat.com/.
Can you tell which one you have and where I can find technical information ? With a PIC16 as a I2C Slave, you depend on the quality of the software inside it.

Can you show a photo of the cable or wires that you use ?
Did you put SDA next to SCL in a cable (very bad).

That TXS0108E chip is "smart". It has internal pullup resistors, but also one-shot accelerators for the edges. I prefer to lower the clock speed if the edges are too slow. That one-shot circuit could be triggered by noise.
When I walk down the street, I don't want someone to kick me with every step I make :face_with_raised_eyebrow:

The Serial Wombat works at 3.3V ? So you only need a 3.3V display to make everything work at 3.3V ?

I don't know the Teensy 3.2 board, but sometimes 100Ω resistors are used in the signal path of SDA and SCL to create a slew-rate for the signals, so the sharp edges won't travel along a cable as noise.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.