0
\$\begingroup\$

I have designed a basic IO port expander that has uses a bi-directional voltage translator in the hope to have a voltage selectable IO to an external device. Voltages are most likely to be 3.3v / 5.0v.

Unforunately, the output from TXB0108PWR are at only at most half of the VCCB voltage, so if set at 5.0v I am getting 2.5v output. The output sometimes doesn't drop to 0 when the IO expander goes to 0v.

  • I can confirm the PCF8574 output is correctly going between 0v and 3.3v when off/on.
  • 3.3v from a power supply between IO expander and translator works as expected
  • I have tried a 10k and 1.2k pullup between the devices to no change.

I would grealty appreciate some pointers, thanks.

Schematic below.

schematic

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Your requirement is for all the I/O lines to have the same voltage swing? Seems very easy, with one-chip solutions available. For example, TCA6424A explicitly describes "Allows bidirectional voltage-level translation and GPIO expansion" TCA6416A if you want a more convenient package for prototyping. \$\endgroup\$
    – Ben Voigt
    Commented Feb 8 at 22:36
  • 2
    \$\begingroup\$ TCA6408A for 8 GPIO bits at very low cost. TI's parametric search describes this as "Adjustable I/O level". \$\endgroup\$
    – Ben Voigt
    Commented Feb 8 at 22:38
  • \$\begingroup\$ Yes all I/O lines are the same swing. Thanks, not seen these before. Perfect for what I need. \$\endgroup\$
    – Aaron N.
    Commented Feb 8 at 23:14

2 Answers 2

1
\$\begingroup\$

It's easy to be misled by 'voltage translator ICs', which unfortunately sound more convenient and simple than they actually are. Make sure you study the description of their internal circuit in the datasheet and the diagrams usually shown there.

The TXB0108 has 4 k\$\Omega\$ resistors in series with each of its outputs. These ICs are only really intended for driving further logic gates or other high-impedance loads.

If your circuit loads up the TXB0108 output, there will be a voltage drop across that internal series resistor that will cause the lower output voltage you are seeing at the IC pin.

Again, always study the internal description and circuit of these ICs. But the same approach is valuable for many ICs.

(Below diagram is modified from that in Texas Instruments TXB0108 datasheet).

enter image description here

\$\endgroup\$
1
\$\begingroup\$

The TXB0108 is a complex chip because it needs to automatically detect the direction which side is the input and which is the output.

The data sheet says if you intend to put pull-ups or pull-downs, they must be 50k or larger, so 10k or 1k2 will not work properly.

The PCF8574 also does not have simple inputs or outputs. Datasheet uses the word quasi-bidirectional. It has internal weak current source as pull-up and it can be less than 50k.

The chips just are not compatible.

Also it makes little sense to use the IO expander at 3.3V supply voltage and then level convert 4 to 8 lines bidirectionally.

It would make far more sense to level shift the I2C bus if required as it has only 2 lines, and set the IO expander voltage to either 3.3V or 5V so it has 8 IOs at correct voltage without a level shifter on the IO. What you are attempting to do might work with the PCF8547 expander directly, but if you change to another and better IO expander, then you can define the pins as inputs or outputs like GPIO on a MCU.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for your repsonse, I suspected that this might be the case when I started testing. What IO Expander would you reccommend? Would the TCA9534 be a better option if I was to level shift the i2c? Or would you reccommend something else? \$\endgroup\$
    – Aaron N.
    Commented Feb 8 at 22:07
  • \$\begingroup\$ @AaronN. Suggesting specific products or places to buy them are off topic, so I can't answer that. But I did answer the original question. \$\endgroup\$
    – Justme
    Commented Feb 9 at 11:40

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.