mixing 3.3v, 5v and i2c

Hi,

I’m designing a board (A) that will communicate with another unknown micro (B). A runs on 3.3v, and I have managed to get hold of components that work with 3.3v. However B needs a wiper input between 0 and 5v, so I thought I’d use a digital pot. I’ve found one (DS1803-10) that may work. However it states that the highest level it can provide to the wiper output is VCC, which in my case is 3.3v. I could feed 5v to the digipot, and A would be understood by the digipot, but how do I avoid signals from the digipot frying A? (being 5v). signal diodes both ways and voltage dividers from 5 to 3.3v?

Joachim

You can make a bi directional level shifter for the I2C signals and feed your digital pot with 5V.

For the I2C line data line:-
Take two NPN transistors and connect the bases together. Connect the emitter of one to the collector of the other, and the collector of one to the emitter of the other. Connect the bases through a 1K resistor to 3V3.
Then one collector / emitter goes to the 3V3 signal and the other to the 5V signal.

You can repeat this for the clock line or have a two stage transistor common emitter amplifier. You need two of these so that the clock signal is the correct way up.

Thanks a lot! Grumpy or not, you are my hero!

Joachim

something like this you mean?

Joachim

Yes with points A_4 and A_5 going to the 3V3 processor signals