Page 1 of 1

PiFace Output

Posted: Sat Jan 04, 2014 8:57 pm
by knebb

I want to trigger some external relay (to switch on/off 230V devices) with my Raspi and PiFace. So I was thinking of connecting relays to the output pins.

Now there are different types of relays. Most of the I found up to know have 12V primary with 230V on the switching side. Do I need to get another relay now with 5V primary matching the 5V of the PiFace to switch the 12V relay?

Additionally is it ok to keep the relay switched on all the time? I found some relays with 1VA (1W) consuming to keep the 230V powered on. So eigth would consume approx 1VA. Could this be provided by the PiFace?

Sorry for the dumb questions- I'm really a newbie to electronics.



Re: PiFace Output

Posted: Thu Jan 09, 2014 5:01 am
by Paul Moir
If you want to use relays with 12v coils, you'll have to remove JP4 and install snubber diodes on your relays. The two relays on the piface already have some so you don't need to fix them. JP4 connects in some built in snubber diodes, but they're referenced to +5v so you have to disable them.

No problem running a bunch of relays: the output device is a ULN2801A which was kind of designed for that purpose. Have a look at Fig 14 at: ... 000179.pdf
to get an idea at what you can really run continuously. A 1VA 12v relay is going to be something under 100ma continuous so you should be able to turn all 8 on forever without worry.

PS - you might say you're new to electronics, but what you're worried about are exactly the sort of tricky things that even experienced people overlook. I think you have a natural knack for it.

PPS - JP4 connects pin 10 of the ULN2801A to +5v. If you think about it, with it in place and one of the drivers off, +12v is conducted through a 12v relay coil into the +5v supply. The +5v supply might be able to cope, or it might not. Proper design says you assume it does not, so you remove JP4 and worry about the snubbers yourself.

Re: PiFace Output

Posted: Thu Jan 09, 2014 5:16 am
by Paul Moir
A quick question: what kind of loads are you turning on and off? They don't happen to be largish (say > .25kW) motors or big transformers or anything with a large electromagnet by chance? If so there are some considerations with relays. Light bulbs, heaters, etc are no problem.