Author Message
 Post subject: IO Expander PCF8574 alternavitve/solution?
PostPosted: 29 Apr 2017, 05:47 
Offline

Joined: 10 Jan 2017, 15:08
Posts: 2
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
Attachment:
Screen Shot 04-29-17 at 11.42 AM.PNG

and a pic of the setup to hepl understand the use
Attachment:
IMG_20170422_164245.jpg


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: IO Expander PCF8574 alternavitve/solution?
PostPosted: 02 May 2017, 22:33 
Offline

Joined: 18 Dec 2015, 15:35
Posts: 160
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.


Top
 Profile  
 
 Post subject: Re: IO Expander PCF8574 alternavitve/solution?
PostPosted: 03 May 2017, 01:15 
Offline

Joined: 10 Jan 2017, 15:08
Posts: 2
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?


Top
 Profile  
 
 Post subject: Re: IO Expander PCF8574 alternavitve/solution?
PostPosted: 03 May 2017, 19:19 
Offline

Joined: 18 Dec 2015, 15:35
Posts: 160
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 --

Attachment:
piZero-size.jpg
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.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group