• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Does anyone here have any experience with this PCF8574 port expander?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Rosie

New Member
Joined
Feb 28, 2017
Hi all!

I have a bit of problems with this PCF8574 port expander. The data sheet clearly shows that the device will SOURCE or SINK 25ma per output. So I designed a board with this chip on the I2C bus (there is also an RTC and an eeprom on the same bus). The outputs of this chip are connected directly to the inputs of a ULN2003D array. I'm only using them as outputs.

The idea was that I would use the outputs of the port expander to control bigger (off board) relays.

However, what I found was that, while the chip would respond to commands on the bus it would only SINK current and, try as I might, I could not get it to source more than a few hundred micro amps. (i've tried several chips - all the same)

I added some 4k7 pullups to the inputs of the ULN2003 which turn them on at startup. If I write a 0 to an appropriate bit of the control byte the chip will happily sink sufficeient current to turn the relay off and keep it off until I write a 1 to the control byte.

2 problems with that approach (well 3 if you count not understanding why something is happening as a problem) - first, it increases the parts count (minor problem on an SMT board) and much more importantly, all coneceted relays will pulse ON briefly at power on - not a good look! Even if I write the outputs low at the very earliest opportunity in the code - they are on for a couple of ms before being shut off.

I've scoured the data sheet several times and can't see any explanation there - but I did notice in para 7.3 the following quote
"A quasi-bidirectional I/O can be used as an input or output without the use of a control signal for data direction (see Fig.15). At power-on the I/Os are HIGH. In this mode only a current source to VDD is active. An additional strong pull-up to VDD allows fast rising edges into heavily loaded outputs. These devices turn on when an output is written HIGH, and are switched off by the negative edge of SCL. The I/Os should be HIGH before being used as inputs."

Which I don't fully understand

I wonder if anyone here has any experience with this chip and could perhaps shed some light ?

The data sheet is at http://www.alldatasheet.com/datasheet-pdf/pdf/18212/PHILIPS/PCF8574.html

My plan at the moment is to add the pullups but to disable the supply to the relays until a few seconds after the circuit powers up and stabilises - not very elegant, but it sould get me out of trouble.

Very much appreciate any help.
 
I'm not sure if you will find the answer you are looking for here; this isnt the kind of question we usually deal with. But We are computer enthusiasts here, so maybe someone has played with this IC before. I wish you luck in finding the info you need!
 
I have used it and its larger variant the PCF8575 in multiple projects, most notably a hybrid air conditioner.

It does pull down pretty hard, but the strong pull up is only active for a brief moment to overcome capacitance. After that, a weak pull up takes effect.

One trick I have done is to have a 4.7k pull down on the I/O pin used for clocking a text LCD. The strong pull up overcomes that and outputs a high, but the weak pull up doesn't so it goes back to low, clocking the data into the LCD.
 
Back