Page 1 of 1

IO Expander PCF8574 alternavitve/solution?

Posted: 29 Apr 2017, 05:47
by kromar
i have been working on a pcb to controll a couple of relays and have the functionality to override with a power switch and a push button for manual triggering and also some led's that indicate the power states.
so i got my 2nd pcb after a total failure of the first one (im new to electronics) which was expected and i could learn quite a lot from it. now i built the 2nd version and almost everythihng works the way i planed, the only problem i have is that the IO Expander chip pulls all IO's high on power on.

now this is a problem since its controled with a raspberry which is powered on at the same time, and therefore all relays would be enabled until the software could take over. however this is not a desired behaviour!

so im currently evaluating the options available to this issue.
1. the easiest solution would be if there is a chip that does the same thing but pulls low on power on, but i have no idea if something like this is around and i have not found any so far. if you know of one or one that can do that it would be awesome if you could share that knowledge.

2. inverting the circuit logic. certainly doable but involves a new design/revision of the pcb

3. is it possible to modify the circuit on the current pcb to get the desired behavior?

4. is it possible to use use pull down resistors on the IO's to overcome the pull up resistance of the chip at power on? or is this a BAD idea?


it would be great to hear from some more experienced perspectives what would be the best solution for this.

heres a pic of the circuit that comes after the Expander chip
Screen Shot 04-29-17 at 11.42 AM.PNG
and a pic of the setup to hepl understand the use

Re: IO Expander PCF8574 alternavitve/solution?

Posted: 02 May 2017, 22:33
by KevinA
If your relay boards have N/C and N/O wire them to the state you need on power up. The PCF8574 resets the outputs on power up to a known state of high.

My design process is:
1. Idea
2. Gather parts and data sheets based on cost and Idea goals
3. Fire up DT and draw electrical schematic
4. Check logic levels, current levels
5. Build and test

For the parts your using a PNP driver should have been used. NPN Conducts on positive PNP conducts on negative

FYI: Breadboards are cheap and your circuit can be breadboard'ed in minutes.

Re: IO Expander PCF8574 alternavitve/solution?

Posted: 03 May 2017, 01:15
by kromar
Thanks for the answer, my relays have that option but since I have Lee's that should indicate the power state its no just on the relay side.

As for the transistors, i dont really understand why i should have used a pnp, can you give a short explanation?

I did breadboard it but without the IC, i will definitely do it in the future, and since i used a IC for the first time i did not think the power state would be an issue, was probably to excited about the whole thing:D

I was looking into logic gates, what do you think about using a inverter chip (not gate) to invert the ic output?

Re: IO Expander PCF8574 alternavitve/solution?

Posted: 03 May 2017, 19:19
by KevinA
With relation to Base to Emitter, PNP base should be negative (low) to turn on and NPN should be positive to turn on.
The PCF8574 can drive 50ma or a 20ma LED and a 30ma opto. if you want to control the relay with switches add them to input ports and let software handle it losing the diodes, put the power switch on the supply side not ground. What kind of LED are you using that has 10K for current limiting? My calculator shows a 0.28ma current at 10K!

-- 04 May 2017, 06:02 --
While playing with a Raspberry PI Zero W it dawned on me: or
combined with a surface mount Raspberry PI Zero HAT would reduce cost and simplify design.
With this relay indicators are on the screen and the touch screen replaces switches.
But you still need to purchase some heat shrink tubing for wire to device connections, shorts are a bitch.
With OSHPark and OSHStencils small is good.

Re: IO Expander PCF8574 alternavitve/solution?

Posted: 11 Feb 2019, 02:27
by Retika
Much obliged for the appropriate response, my transfers have that choice yet since I have Lee's that ought to show the power express its no equitable on the hand-off side.