I am trying to create my own I2C LCD circuit for a PCB and wanted to test the wiring in Tinkercad.
I have used the attached schema and wired like in the image. (One 220 Ohm resistor is attached to the VCC-side of the LCD back light. Not in the schematic).
I have done a serial readout and the I2C-address should be correct in the code. However I do not get the display to print out "Hello World". Am I missing something obvious?
Welcome to the forum.
Can you give a public link to the Tinkercad project ?
Be careful, there are two links: one public link so others can make a copy to tinker with and one to share your project with others and then everyone can change your project.
Did you know that the potentiometer of 10k for the contrast can be a potentiometer of 1k between V0 and GND (5V is not connected) or a single resistor to GND of 470Ω or 1kΩ ?
You could also run the I2C scan code that is provided with the IDE, or Nick Gammon's (improved) one; either should find your display. The PCF8574 will be found at addresses 0x20-0x27, while the PCF8574A will be found at Ox38-0x3F.
I checked the circuit in Tinkercad.
The address is 0x25, and I think that RS,RW,E,backlight,D4,D5,D6,D7 are according to the "LiquidCrystal I2C" library.
What we need is a working project in Tinkercad with a PCF8574 and a LCD display. But I could not find it. Maybe it does not work in Tinkercad.
The best thing you can do is run the I2C scanner, it is just like a normal sketch but it will give you all the I2C address that are active from 0 to 0x7F. With that you will need to put that into the code. Use that number in in place of 0x25. After that I expect you will get Hello World.
If you can find even just one example that the PCF8574 works with a display in Tinkercad, then it should work.
If you can find even just one mention that there is a issue with it, then it does not work.
I can find neither of them.
Since I can not find a flaw in your design, let's blame Tinkercad. It was a waste of time. Build a prototype in the real world.
That address would indicate a bad connection on A1. If this just a tinker cad simulation then I really do not have a clue, my experience has all been on hardware.
Indeed. I was puzzled about that too. I see, looking carefully, that in Tinkercad has allowed the OP to connect the middle 1k resistor to a non-existent hole on the breadboard.
Great! This indeed caused the 0x25 address. I have updated and it now reads 0x27, but I still do not get a readout on the display. (And yes, I did update the code)
Maybe look for other Tinkercad "loose connections". Some of it clearly works because you can run the I2C scanner, however the wiring between the PCF8574 / contrast potentiometer to the display may be faulty. Also ensure you are using a code sample which matches the library you have installed. Maybe you need to explicitly initialise I2C with the Wire library:
Tinkercad might be cutting corners and solve simulation problems in software.
The Wokwi simulator simulates the hardware. Any software can run on top of that. That makes it possible to upload your own library or use MicroPython on the same (simulated) hardware. The Arduino Uno is even clock-accurate simulated and the ESP32 can connect to a real online server from within the simulation.
Enough talk about Wokwi here is your LCD backpack in a working simulation:
No, I already tested a I2C scanner and checked the wires and tried other things in a copy of your Tinkercad project. Therefor I concluded that Tinkercad is a waste of time (for the PCF8574 with a LCD display).
Instead of making your project from the start, I decided to make it in Wokwi. I was sure it would work in Wokwi, and it did