2

I have a Raspberry Pi 4B and I'm trying to hook it up with a 4x20 character LCD using a PCF8574T-based I2C interface. The interface operates at 5V so I'm also using a logic level converter. It would be difficult to make decipherable photos of the circuit, so I made a figure: enter image description here

In case the labels get lost, for the I2C the pins go like this:

GND, VCC, SDA, SCL

For the LLC, the high voltage side is on the left, low voltage on the right.

I installed python-smbus and i2c-tools, I have I2C interfacing enabled, I added i2c-bcm2708 and i2c-dev to /etc/modules, I don't have anything blacklisted.

Running lsmod | grep i2c yields the following:

i2c_bcm2835       16384   0
i2c_dev           20480   0
i2c_bcm2708       16384   0

To /boot/config.txt I added these lines:

dtparam=i2c1=on
dtparam=i2c_arm=on

Still, when I run i2cdetect -y 1 I get an empty table with no devices detected.

I tried rebuilding the circuit multiple times, I tried a different breadboard, I tried skipping the breadboard altogether, but I still can't get the I2C to work.

Here's an Imgur album of the circuit, sorry about the quality: link

Is there anything I'm missing?

Thanks in advance!

6
  • The likely problem is poor or wrong connections. We need a clear set of photos so we can trace pin to pin.
    – joan
    Commented May 5, 2020 at 19:49
  • I was afraid you would say that... Well, I don't know about clear, but I edited the original question to add a link to an Imgur album, I hope it helps! Commented May 5, 2020 at 20:48
  • The diagram does not show your Connection and the pics get me baffled :(. I would first try something simple through the level converter - try cabling that up first to see if you can get a high / low signal working on the converters pins and check the level with a multimeter. You can still use the Pi to provide the voltage for both sides.
    – user115418
    Commented May 5, 2020 at 23:25
  • There is no need to fiddle with modules Device Tree should set everything up. Unless the module has pull-ups you do not need a level converter and if you use a level converter you NEED pull-ups. You don't need multiple Gnd connections
    – Milliways
    Commented May 6, 2020 at 2:21
  • I tried to measure some voltages on the level converter and there's definitely something fishy going on there... I soldered it myself, so it's entirely possible that the connection is faulty. I'll try to fix it and report back. Thank you, everyone, for responding! Commented May 6, 2020 at 15:41

2 Answers 2

0

It turns out my logic level converter is probably faulty, but not necessary anyway. Connecting the I2C directly to 3.3V, GND, SDA, and SCL on the Pi solved the issue, I can now detect the module at the expected address.

2
  • You should not need the logic level converter for these displays. The I2c interfaces I know of (which looks very much like the one in the picture) do not have any pull-ups on the SDA/SCL, so that the Pi shouldn't be damaged, even if you connect VCC to 5V. I did have to do that, because with 3.3V, the display wouldn't be readable.
    – PMF
    Commented Jan 31, 2021 at 20:55
  • Removing the backlight jumper and using ~900Ω resistor will get rid of flicker on your display (if you have any) and make the display more readable (a 10kΩ and 1kΩ resistor in parallel will give you 900Ω) Commented Sep 24, 2022 at 6:32
0

I run the display on 5V and use pull up to 3V3. It works just fine and no display contrast problems. If you look at the I2C specification it is open drain outputs, no sourcing as it depends on the external pull up resistors. You might check to be sure your module does not have pull up resistors, I would be surprised if it does but remove them.

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.