When the PCF8574 outputs 1s, the voltage at its output reads 4V which then leads to about 0.9-1V at the output of the inverter (74HC04). This doesn't affect the operation of the darligton driver and the relays which operate as expected.
I only noticed this when connected some LEDs on OUT0-OUT5. The leds dimly lit even when the relays are off (logic 0 at the output of the hex inverter).
I know this is pretty basic but I am puzzled why this is happening!
P6 and P7 on the PCF8574T are net named as +LED1 and +LED2. The circuit for these LEDs isn't shown, but it implies that you're trying to source LED current when you should be sinking LED current instead. Also, the LED current limiting resistors (not shown) would need to limit the current to within 10mA.
The required pullup resistors for SDA, SCL and INT are not shown. What is their value?
The PCF8574T has quasi-bidirectional I/Os. Being non totem pole type, the outputs don't yield solid voltage levels.
When the PCF8574 outputs 1s, the voltage at its output reads 4V
Perhaps your 10K pullups could be a bit stronger (i.e. 3.3K - 4.7K).
yep..... dlloyd is right. P6 and P7 pins, when configured for 'output' (and for the purpose of driving LEDs), will require resistors in series with the LEDs, and the LEDs will light up when P6 and P7 are commanded to go 'low' (which means sinking current). The pcf8574 will struggle to source current to the LEDs.
So, in this particular situation, the way to 'drive' the LEDs is to sink current when you want the LED to light up. This means, the positive terminal of the LED will be connected to Vcc, and the remaining LED terminal connected to a resistor, and the other end of the resistor will be connected to the output pin of the pcf8574.
P6 and P7 on the PCF8574T are net named as +LED1 and +LED2. The circuit for these LEDs isn't shown, but it implies that you're trying to source LED current when you should be sinking LED current instead. Also, the LED current limiting resistors (not shown) would need to limit the current to within 10mA.
There are current limiting resistors for these leds eventhough they are not show here.
The required pullup resistors for SDA, SCL and INT are not shown. What is their value?
4.7k
Typically your indicator leds would be on the ULN2803As outputs...
Not necessarily. Since according to datasheet the PCF can drive leds directly.
Perhaps your 10K pullups could be a bit stronger (i.e. 3.3K - 4.7K).
Now this does make sense! I had the same thought as well. In other words, since the PCF only has a very low current source capability (100uA), it is up to the external resistor to source the necessary current to 'establish' a proper logic 0 and 10K might be too high. I intend to try 4.7K but since these are SMD 1206 array resistors , I have ordered another set at 4.7k to try out.
And I'd recommend using 74HC14's because schmitt-triggers are so useful to have in stock, why get inverters
that aren't schmitt-triggers? (Well perhaps because they might be a little faster I suppose).
ricky101:
What is the purpose of the 74HC04 inverter ?
Typically your indicator leds would be on the ULN2803As outputs...
The PCF8574 cannot source anything like enough current to drive the 2803, the inverter can.
And I'd recommend using 74HC14's because schmitt-triggers are so useful to have in stock, why get inverters
that aren't schmitt-triggers? (Well perhaps because they might be a little faster I suppose).
I agree Mark. Speed is not an issue here but there should be a need for a schmit trigger since the output should have been within the logic specs.
Hmm ... I was thinking the inverter was there to prevent all relays being energized during startup since by default the expander will initialize all I/Os to inputs with a weak pullup current to Vcc.