IO Expander PCF8574 alternavitve/solution?

DIY Projects and Methodologies, Hobby Circuits, Circuit Samples
Post Reply
Message
Author
kromar
Posts: 2
Joined: 10 Jan 2017, 08:08

IO Expander PCF8574 alternavitve/solution?

#1 Post by kromar » 28 Apr 2017, 22:47

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?

others?

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
Screen Shot 04-29-17 at 11.42 AM.PNG (34.74 KiB) Viewed 1961 times
and a pic of the setup to hepl understand the use
IMG_20170422_164245.jpg
IMG_20170422_164245.jpg (2.14 MiB) Viewed 1961 times

User avatar
KevinA
Posts: 639
Joined: 18 Dec 2015, 08:35

Re: IO Expander PCF8574 alternavitve/solution?

#2 Post by KevinA » 02 May 2017, 15:33

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.

kromar
Posts: 2
Joined: 10 Jan 2017, 08:08

Re: IO Expander PCF8574 alternavitve/solution?

#3 Post by kromar » 02 May 2017, 18:15

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?

User avatar
KevinA
Posts: 639
Joined: 18 Dec 2015, 08:35

Re: IO Expander PCF8574 alternavitve/solution?

#4 Post by KevinA » 03 May 2017, 12:19

https://www.youtube.com/watch?v=kNVaIqmKUoI
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 --
piZero-size.jpg
piZero-size.jpg (48.05 KiB) Viewed 1941 times
While playing with a Raspberry PI Zero W it dawned on me:
https://goo.gl/VH7ohn or https://goo.gl/DsULIA
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.
Attachments
PI-Zero-HAT.dip
(7.58 KiB) Downloaded 139 times

Retika
Posts: 3
Joined: 03 Feb 2019, 22:35
Contact:

Re: IO Expander PCF8574 alternavitve/solution?

#5 Post by Retika » 10 Feb 2019, 19:27

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.

Post Reply