User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy

Re: I2C and 5V - Definitive answer?

Sat Sep 10, 2016 8:52 am

joan wrote:
dentex wrote: ...
It's zero. :shock:
When measured between Pi ground and backpack SDA/SCL when powered from Pi ground and Pi 5V?

That's fortunate. Apparently it's not like many of the backpacks which have their own pull-ups to VCC.

That should be fine to use on the Pi.
Indeed... (the noob of me, sorry):
it's 4V on both SDA and SCL, while attached to the RPi, and 4.96V with jumper removed, having attached to the RPi only the 5V and GND (this is the 16x2 already attached since ages on a Raspberry Pi model B+).
:cry:
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

amikot
Posts: 8
Joined: Sun Feb 23, 2020 2:45 am

Re: I2C and 5V - Definitive answer?

Fri Feb 28, 2020 11:35 pm

I have 20x4 LCD exactly the same as this:
https://www.amazon.co.uk/gp/product/B07PWWTB94

First I connected it to 5V line in GPIO connector of my Raspberry 4 and it did work perfectly, but than I reed that I shouldn't because this current is returning with SDA and SCL and can damage GPIO.
I spent some time looking for 3.3v -5v converter that would fit to raspberry and I am confused, because of massive number of completely different devices.
But making long story short - now I connected display using 3.3V line and it works (however I had to set contrast screw to maximum to see text).
My question is: Is that safe? Can I use display connected like that? Or maybe I should order anyway the converter?
Will that one be good?:
https://www.amazon.co.uk/gp/product/B07RDHR315

Thanks :)

User avatar
Burngate
Posts: 6553
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore

Re: I2C and 5V - Definitive answer?

Sat Feb 29, 2020 12:02 pm

amikot wrote:
Fri Feb 28, 2020 11:35 pm
But making long story short - now I connected display using 3.3V line and it works (however I had to set contrast screw to maximum to see text).
My question is: Is that safe? Can I use display connected like that? Or maybe I should order anyway the converter?
Will that one be good?:
https://www.amazon.co.uk/gp/product/B07RDHR315
Powering the display from 3.3V is safe, but whether it's good enough is your decision.

That level shifter appears to be fine, so if you're not happy with the display using 3v3 and the contrast screw at max, then by all means use that level shifter.

amikot
Posts: 8
Joined: Sun Feb 23, 2020 2:45 am

Re: I2C and 5V - Definitive answer?

Sun Mar 01, 2020 3:35 am

Thanks for answer. I feel safer now :D

Now only problems are display quality and performance. Screen seems to be dramatically slow in transforming between past and future frames.
It seems to be problem of LCD itself. Every All cells are transforming in one moment, but transformation is slow - it takes probably around one second. It looks like morphing. Can it be effect of low VCC voltage?

Lomax
Posts: 269
Joined: Wed May 20, 2015 9:43 pm

Re: I2C and 5V - Definitive answer?

Fri Jul 17, 2020 11:58 am

Here is my (perhaps obvious) solution for I2C communication between the Pi and 5 V powered chips: Since the Pi has its own internal pull-ups on the I2C data lines you can simply remove the pull-ups on your breakout board.
removed_pullups.jpg
removed_pullups.jpg (187.96 KiB) Viewed 867 times
Here I have removed the two 10k pull-up resistors on an Adafruit HT16K33 breakout, which is pretty easy to do. I find it rather annoying to need so many level shifters every time I build something with a Pi; this is a convenient way to eliminate one of them. Nota bene: this may not work well on long I2C lines - though the Pi's pull-ups are fairly hard at just 1.8k, which should be enough to carry over any reasonable distance. It's also worth noting that 3.3 V I2C comms works reliably despite the HT16K33 datasheet specifying a minimum "high" voltage on the SDA/SCL lines of 0.7 x VDD, or 3.5 V:
Screenshot_2020-07-17_12-50-50.png
Screenshot_2020-07-17_12-50-50.png (80.57 KiB) Viewed 867 times
Obviously there's some margin there. Other chips may require higher voltages, in which case a 5 V I2C bus may be required. Yet other chips may have internal pull-ups which cannot be removed. Personally I don't recall encountering either. YMMV.

Return to “Interfacing (DSI, CSI, I2C, etc.)”