Woodster
Posts: 3
Joined: Thu Jan 07, 2016 2:55 pm

Piface Relay+ not working

Thu Jan 07, 2016 3:24 pm

Hi all,

I'm very new to this, so my apologies if I'm posing in the wrong place. I have recently purchased a piface relay+ but I cannot for the life of me get it working! I have followed the very basic instructions, which are to run:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python{,3}-pyfacerelayplus

This didn't get the thing working, so I started hunting for information (which seems to be pretty thin on the ground for this particular board).

I have enabled SPI in raspi-config, and allowed the SPI kernel to be loaded at boot. Following some older instructions for the pifacedigital, I have also added the line "#blacklist spi-bcm2708" to /etc/modprobe.d/raspi-blacklist (which was previously empty). Finally, I tried "sudo modprobe spi_bcm2708", which returned an error saying that there was no such device, and "sudo modprobe spi_bcm2835", just for giggles. None of these modifications have had ANY effect. When I try to run the 'blink.py' example program, I received the following:

Traceback (most recent call last):
File "/usr/share/doc/python-pifacerelayplus/examples/blink.py", line 9, in <module>
pfr = pifacerelayplus.PiFaceRelayPlus(pifacerelayplus.RELAY)
File "/usr/lib/python3/dist-packages/pifacerelayplus/core.py", line 224, in __init__
self.init_board(gpioa_conf, gpiob_conf)
File "/usr/lib/python3/dist-packages/pifacerelayplus/core.py", line 257, in init_board
c=self.chip_select))
pifacerelayplus.core.NoPiFaceRelayPlusDetectedError: No PiFace Relay Plus board detected (hardware_addr=0, bus=0, chip_select=0).

I am running Raspian (Wheezy). I have also tried Jessie, plus I've tried two different piface relay+ boards, both on two different pi's - one a V1 B+ and one a V2 B. As far as I can tell, the relay board is just pushed onto the pi and I don't have to change any jumpers (which are set to address 000, and to link the 5V supply of the Pi to the piface relay+). I haven't connected / attached anything else, though I have tried separate power supplies (after removing jumper 4) in case there was a power issue.

Please can you help? It is driving me insane and I am unfortunately working to a very tight deadline!

gordon77
Posts: 3900
Joined: Sun Aug 05, 2012 3:12 pm

Re: Piface Relay+ not working

Thu Jan 07, 2016 4:03 pm

it's
sudo apt-get install python3-pyfacerelayplus
and
/etc/modprobe.d/raspi-blacklist.conf

add dtoverlay=spi-bcm2835 to /boot/config.txt

Woodster
Posts: 3
Joined: Thu Jan 07, 2016 2:55 pm

Re: Piface Relay+ not working

Thu Jan 07, 2016 4:47 pm

Post by gordon77 » Thu Jan 07, 2016 4:03 pm
it's
sudo apt-get install python3-pifacerelayplus
and
/etc/modprobe.d/raspi-blacklist.conf

add dtoverlay=spi-bcm2835 to /boot/config.txt
I'm not sure what the difference is - I thought the "sudo apt-get install python{,3}-pifacerelayplus" just installed versions for both python 2 and 3 at the same time. However, just in case I have now run "sudo apt-get install python3-pifacerelayplus", but it says all modules are up to date. The raspi-blacklist.conf is the file I have already edited, which was formerly empty.

I have added the line to config.txt and rebooted, but to no avail I'm afraid...

Woodster
Posts: 3
Joined: Thu Jan 07, 2016 2:55 pm

Re: Piface Relay+ not working

Thu Jan 07, 2016 9:21 pm

:oops: Never mind....I'm a complete tool... :oops: :oops: Although I checked and double checked, I had the jumpers in the wrong position! For whatever reason, the relay+ is shipped with the jumpers set for binary address 111, whereas 000 is the default for blink.py. I'm such an idiot - although I looked through the 'getting started' documentation, I had the relay+ positioned upside down with respect to the drawing on the document and managed, in my deranged mind, not to notice.

I told you I was new to this. :D

gordon77
Posts: 3900
Joined: Sun Aug 05, 2012 3:12 pm

Re: Piface Relay+ not working

Thu Jan 07, 2016 9:24 pm

I found the same thing, the default switches were not what they said.

Abdessamade MOUNIRd
Posts: 1
Joined: Fri May 10, 2019 12:46 pm

Re: Piface Relay+ not working

Fri May 10, 2019 12:56 pm

Hi everyone,

First of all sorry for my english I'm french.
So I'm an engineer students and i begin to work with a raspberry pi model 3 b+ with raspbian and i have a piface relay+ from element14.
My problem is i follow the different instruction which are:

update and upgrade
sudo apt-get install python3-pifacerelayplus

and after that i try to test the blink.py program but it does'nt work.

can you help me please

Return to “HATs and other add-ons”