Go Down

Topic: I2C pins working correctly with 5v? (Read 503 times) previous topic - next topic


I'm making a project which consists mainly of a Pro Mini (5v) and a DUE communicating over I2C.
I've plugged both the clock and data pins directly and everything is working fine, however I was afraid I could damage my DUE board by feeding 5v into it's IO pins, so I tried putting a logic level converter between the two (some CD4050BE I had) but there was no way to make it work this way. Multimeter would state around 4.5v on the Pro Mini side and around 3.2v on DUEs, so it seemed like everything was wired correctly and the chip was working, but still.

My theory is that the DUE has some resistors or circuitry to make the SCA and SCL 5v tolerant, making them read around 3v as low in the process... or something.

I went back to direct connection and it's all working correctly but it left me wondering if my DUE is in danger.


I2C works at whatever level the signals are pulled up to. Each device on the bus can only pull the lines low, pullup resistors create the high level.
You should have 2.7K to 3.3K pullups to 3.3V.
You can turn off the Wire.h internal pullups to 5V (~30K) on the Promini side, I think you just need to add
digitalWrite (A4, LOW);
digitalWrite (A5, LOW);
after Wire.begin() in setup().
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


The CD4050 isn't bidiectional or open collector, so you may cause damage when the 4050 is outputting high and the Due tries to pull it low...

Pullups to 3v3 might work, the datasheet for the 328 in the Pro Mini says 0.6Vcc for Hi inputs, which is 3v, but, in the I2C section it states 0.7Vcc, which is 3.5v, which isn't guaranteed to work (I couldn't see anything that states it is 0.7Vcc at lower voltages only in the I2C section).

Go Up