I know this was marked as solved, but I guess I'm a bit confused as to what the issue with the original schematic was from a visual perspective.
If you look at the image in its full size, the schematic seemed pretty clear on how to wire things up.
In the larger picture, how the PCF8574 is wired up to the LCD and the backlight circuit design affects the library software in a very big way.
The original circuit, the circuit that 6v6gt posted, the circuit that TerryKing provided are all different.
Some libraries hard code the pin mappings and backlight control (LiquidCrystal_I2C in the library manager),
some allow full manual configuration (fm's newLiquidCrystal and hd44780)
and hd44780 can auto detect the pin mappings and back light control active level.
There are some things to consider:
While any circuit design can be made to work with fm's newLiquidCrystal and hd44780,
Depending on the circuit, it may not work with the LiquidCrystal_I2C library.
Depending on the circuit, hd44780 may not be able to auto detect the backlight control active level.
There are 3 different circuits shown in this thread:
#1 is what is the orignal post
#2 is what is in the 6g6vt schematic
#3 is what is in the TerryKing schematic
Here is the wiring for each:
LCD 1 2 3
RS P6 P0 P4
EN P5 P1 P5
RW P4 P2 P6
D4 P0 P4 P0
D5 P1 P5 P1
D6 P2 P6 P2
D7 P3 P7 P3
BL P7 P3 P7
BLlevel HI HI LO
My recommendation would be use a circuit that matches what the LiquidCrystal_I2C library expects as it offers the most flexibility in terms of s/w libraries.
- LiquidCrystal_I2C library from the IDE manager will work
- hd44780 hd44780_I2Cexp i/o class can auto self configure everything
- fms' newLiquidCrystal library LiquidCrystal_I2C i/o class can be manually configured to work
- hd44780 library hd44780_I2Cexp i/o class can be manually configure to work.
Of those 3 circuits posted in this thread, only the 6g6vt board is wired that way, but the backlight circuit will confuse hd44780 auto detection.
The original circuit was wired in a way that I've never seen any other backpack use
(And I've seen pretty much every backpack design).
While the wiring in the TerryKing schematic should allow hd44780 to auto self configure,
I would recommend wiring up the LCD to use what LiquidCrystal_I2C library expects as it is a very common pin wiring used on backpacks and will allow the LiquidCrystal_I2C library to work.
That library expects:
But don't use the backlight circuit from the 6g6vt schematic as that won't allow hd44780 to auto detect the backlight level.
Don't put a pullup on the base of the NPN transistor.
Also when using a NPN transistor there is no need to use a series resistor to the base to limit the current flowing through the transistor to the emitter.
This is because the PCF8574 doesn't really drive the output pin for HI signals. It enables a pullup on the pin. The PCF8574 has no true drive capability. Sink yes, but drive no.
(This is part of their "quasi-static" i/o pin logic)
Because of this, the output current for high signals is already limited to a very small amount.
But when you can get a pre-made LCD backpack delivered to your door for less than $1 USD,
why not just buy a pre-made backpack off Ebay?