From SB-Components Wiki

PiRelay 6

PiRelay 6 channel is a relay shield that can control up to 6 appliances/devices with photo-coupling isolation on a load of 250V AC/7 A, 30V DC/10 A, and a trigger voltage of 3.3 V. It helps the user to enhance the intelligence of the devices. It comprises an “Optocoupler” that allows the circuit to transmit an electrical signal between two isolated circuits through light energy. Optocoupler helps the user to prevent the high voltages in one part of the circuit from affecting the other part of the circuit which provides safety to the system.

It provides a better connection of Pi Relay 6 with the Raspberry Pi that gets enabled from the standardized shield form factor. One can enable the IoT technology of their home appliances using Pi Relay 6 channel that will make their life efficient.


  • 6 High-quality Relay and loads up to 250VAC/7A, 30VDC/10A.
  • Optocoupler
  • Standardized shield shape and design.
  • LED working status indicators for each Relay.
  • Pin Stacking Header for accessing GPIO of RPi.
  • Compatible with Raspberry Pi 4, 3B+, 3,2, Zero


  • Channel - 6 CH
  • Operating Voltage - 5V
  • AC Control Voltage - 7A / 250V
  • DC Control Voltage - 10A / 30V
  • Dimensions - 56.01 mm x 85.01 mm
Pirelay 6
Buy it From : Click Here


Relay 1 29 GPIO 5
Relay 2 31 GPIO 6
Relay 3 33 GPIO 13
Relay 4 35 GPIO 19
Relay 5 37 GPIO 26
Relay 6 40 GPIO 21



  • Stack PiRelay-6 HAT on Raspberry Pi 40 Pin GPIO header.
  • Make sure all six delection jumpers are connected.
  • Open Terminal and clone/download the repository by typing below command in terminal:
git clone https://github.com/sbcshop/Pirelay-6-Channel.git
  • Your code will be downloaded to '/home/pi' directory. Use 'ls' command to check the list of directories and 'cd' command to enter directory.
cd Pirelay-6-Channel
  • 'test.py' is example code for PiRelay-6. Run test file and play with PiRelay-6 by running below python command.
python3 test.py
  • You can also use any other GPIO of Raspberry Pi by removing the jumpers and connecting the relay pin directly to the Raspberry Pi GPIO header using jumper cables or wire.

GPIO 4 Relay Not working Fix

  • Click on Start button >> Preferences >> Raspberry Pi Configuration, Then click on Interfaces Tab and make sure 1-Wire is disabled.
  • Click on the OK button then reboot Raspberry pi.