PicoRelay8 for Raspberry Pi Pico [W]
The PicoRelay8 allows eight 28V DC / 10 Amp Normally Open relays to be controlled using a Raspberry Pi Pico [W].
Each relay is controlled by a Pico GPIO pin - setting the pin high will close the relays contacts allowing you to turn on the device and setting the GPIO pin low will open the contacts turning it off.
Pico GPIO | Relay Control |
---|---|
GP13 | A |
GP10 | B |
GP5 | C |
GP2 | D |
GP3 | E |
GP4 | F |
GP11 | G |
GP12 | H |
The HF3FF/005-1HST relays are rated for 10 Amps at 28 Volts DC and have Silver Tin Oxide (AgSnO2) contacts for better switching of high inrush currents.
The PicoRelay8 MUST NOT BE USED TO SWITCH MAINS VOLTAGES.
When all 8 relays are energised the PicoRelay8 will use just under 500mA so please ensure the power supply/computer is capable of supplying 500mA or ensure all relays are not energised together.
Code Examples
CircuitPython
The example below toggles the Relays on one at a time from A to H and then turns them off one at a time from A to H.
import board import digitalio import random import time # Number of seconds to wait between toggling delay = 0.3 # Setup GPIO used for Relay control relay = {} relay[0] = digitalio.DigitalInOut(board.GP13) # Relay A relay[1] = digitalio.DigitalInOut(board.GP10) # Relay B relay[2] = digitalio.DigitalInOut(board.GP5) # Relay C relay[3] = digitalio.DigitalInOut(board.GP2) # Relay D relay[4] = digitalio.DigitalInOut(board.GP3) # Relay E relay[5] = digitalio.DigitalInOut(board.GP4) # Relay F relay[6] = digitalio.DigitalInOut(board.GP11) # Relay G relay[7] = digitalio.DigitalInOut(board.GP12) # Relay H # Set GPIO as outputs for i in range(0,8): relay[i].direction = digitalio.Direction.OUTPUT # Loop counter cnt = 0 while 1: # Turn all Relays on for i in range(0,8): relay[i].value = True print( "On: "+str(i)+" loop: "+str(cnt) ) time.sleep(delay) # Then turn all relays off for i in range(0,8): relay[i].value = False print( "Off: "+str(i)+" loop: "+str(cnt) ) time.sleep(delay) cnt = cnt + 1