In the past, I've been able to drive a relay using a 2n2222a via a GPIO pin given the same schematic with PCF removed. However, once I introduce the PCF8574, it doesn't work.
I have read that I should probably change the schematic to use sink instead of source, or a different transistor, or a different I/O expander - but I'm a noob and don't really know how to construct or modify my circuit accordingly i.e. what that specifically changes my circuit.
Do I add a PNP somewhere, or switch to a TIP120 - what's the easiest thing for me to do with the least modifications to this circuit?
I kind of get what is going on, but because I'm not an EE I don't totally understand the theory behind it. I have read every post on SO, and I think the transistor of choice doesn't get fully saturated by the PCF because it cannot source more than say 30 mA so it's not opening fully. I've read about pull-up 1k to 5 V on the outputs of the PCF, but that didn't seem to do anything. I do know the second I ground the collector it activates the relay, so I'm pretty sure the PNP is not fully opening. When I connect an LED, I did notice it was dim and less dim depending on the signal coming from the PCF.
Here is the Songle relay's datasheet.
Here is my current schematic (apologies for the poor layout, first time using Schematic Editor):
EDIT: Forgot VCC/GND connections on PCF.
EDIT 2: Added all other connection and components.
EDIT 3: :facepalm: 1k resistor label..