1

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!

  • The likely problem is poor or wrong connections. We need a clear set of photos so we can trace pin to pin. – joan May 5 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! – Gábor Fehér May 5 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. – Andyroo May 5 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 May 6 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! – Gábor Fehér May 6 at 15:41
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.