The RPi Relay Board (Manufacturer Part ID: 11638) by Waveshare is a versatile relay module designed specifically for use with the Raspberry Pi. This board allows the Raspberry Pi to control high voltage devices through its GPIO pins, making it ideal for home automation, industrial control, and other applications where high voltage switching is required.
Specification | Value |
---|---|
Operating Voltage | 5V |
Relay Channels | 1, 2, 4, or 8 (depending on model) |
Control Signal | 3.3V (from Raspberry Pi GPIO) |
Max Switching Voltage | 250V AC / 30V DC |
Max Switching Current | 10A |
Dimensions | Varies by model |
Weight | Varies by model |
Pin Name | Description |
---|---|
VCC | 5V Power Supply |
GND | Ground |
IN | Control Signal from Raspberry Pi GPIO |
Pin Name | Description |
---|---|
VCC | 5V Power Supply |
GND | Ground |
IN1 | Control Signal for Relay 1 |
IN2 | Control Signal for Relay 2 |
Pin Name | Description |
---|---|
VCC | 5V Power Supply |
GND | Ground |
IN1 | Control Signal for Relay 1 |
IN2 | Control Signal for Relay 2 |
IN3 | Control Signal for Relay 3 |
IN4 | Control Signal for Relay 4 |
Pin Name | Description |
---|---|
VCC | 5V Power Supply |
GND | Ground |
IN1 | Control Signal for Relay 1 |
IN2 | Control Signal for Relay 2 |
IN3 | Control Signal for Relay 3 |
IN4 | Control Signal for Relay 4 |
IN5 | Control Signal for Relay 5 |
IN6 | Control Signal for Relay 6 |
IN7 | Control Signal for Relay 7 |
IN8 | Control Signal for Relay 8 |
Power the Relay Board:
Connect Control Signals:
Connect the Load:
Control the Relay:
import RPi.GPIO as GPIO
import time
relay_pin = 17 # GPIO pin connected to the relay
GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme GPIO.setup(relay_pin, GPIO.OUT) # Relay pin set as output
GPIO.output(relay_pin, GPIO.LOW)
print("Starting relay control. Press CTRL+C to exit.") try: while True: print("Relay ON") GPIO.output(relay_pin, GPIO.HIGH) # Turn relay on time.sleep(2) # Wait for 2 seconds print("Relay OFF") GPIO.output(relay_pin, GPIO.LOW) # Turn relay off time.sleep(2) # Wait for 2 seconds except KeyboardInterrupt: print("Exiting program.") finally: GPIO.cleanup() # Clean up GPIO on exit
Relay Not Activating:
Relay Stuck in ON/OFF Position:
Raspberry Pi Reboots When Relay Activates:
Noise and Interference:
Q1: Can I use the RPi Relay Board with other microcontrollers?
Q2: What is the maximum load I can control with the relay?
Q3: How do I know if the relay is working?
Q4: Can I control multiple relays simultaneously?
By following this documentation, users can effectively integrate the RPi Relay Board into their projects, ensuring reliable and safe control of high voltage devices.