Controlling 3.3v with 3.3-5v IO

Here is a summary of what I am trying to do.

I have an IO board which has many inputs and outputs and an SD card slot.

the IO expander IC's run on IIC (or I2C if you prefer), and the SD card slot is connected via SPI.

The thing is, the board needs to be compatible with different arduinos and the raspberry pi. So some will run on 5v, others will run on 3.3v, we might have some that run as low as 2.7, but I don't anticipate that.

The original idea was to simply use an 8-bit level translator IC (ADG3308BRUZ), but it has caused many issues. For instance, this particular IC could not sink enough current to pull the I2C line down. Later, I disvoered most of these IC's have to translate voltage in a particular direction. That is, one side has to be the higher voltage, and the other has to be the lower voltage, and both sides can't be the same voltage.

This normally isn't an issue, because the conditions are controlled. But in this case, I could be plugging in any source of SPI/IIC (and the IOREF pin or equivalent) and translating it to the voltage the IO board uses.

I see your summary but I do not see a question.

However...

I suggest that you look at translators from TI, especially the SN74GTL2003, which has no direction control pin required. According to TI, the device allows bidirectional voltage translation from any voltage (0.95 V to 5 V) to any voltage (0.95 V to 5 V).

Are you sure you need a level translator?

This and other expanders might directly meet your requirements

  • Operating power supply voltage range of 2.3 V to 5.5 V
  • 5 V tolerant inputs/outputs

For I2C I just pull up to 3.3V rather than the 5V. For SPI I use a 74LVC07 open drain buffer which I let the target power. If the target is off it disables the IC (e.g. the open drain is hi-z). If the target has 3.3V the IC is on and tolerant of 5V on its inputs. The outputs can be pulled up to 5V or 3.3V as needed.

SPILvl.png

vaj4088: I see your summary but I do not see a question.

I guess the question is "How can I do it". Lol. Thanks for the reference. I'm looking at the part now.

dlloyd: Are you sure you need a level translator?

The issue involves SPI going to a micro-SD card. SD cards aren't 5V tolerant, otherwise I would just run everything 5v. I think the IO expander chips are 5V tolerant, but I'm not sure how to verify. It doesn't exactly specify "5V tolerant". And a 5v "capable" IO chip might not support 5V when running at 3.3V due to reverse bias.

Also, even if I DID run the I2C at 5v, there's little guarantee that other MCU's will accept it.

I figure, instead of trying to really get all the details right, I just use a translator to match the voltages up on either end.

OK, so I guess to clarify my question:

How can a use a voltage translator to translate an unknown voltage to 3.3v?

It looks like the SN74GTL might work. The only problem is that it says the GREF pin needs to be pull up to the “high side”. That’s the problem. I don’t know which side would ultimately be the high side. I might have a 1.5v MCU attached. I might have a 5v MCU attached.

Generally, however, it will be either 3.3v or 5v. This means that the voltage coming from the MCU will be greater than or equal to the other side.

Why not use one of the bidirectional levelshifters with a low-gate-voltage MOSFET? Those are simple, cheap, and work great with I2C (if you make your own, use a very low gate voltage, low current MOSFET, like 5LN01C (or 5LN01SP in through-hole, if you can find them - they're discontinued with no comparable replacement part in through-hole package))