The Relay Add-on Module is a compact and efficient solution for controlling high-voltage devices using low-voltage signals. Designed specifically for Seeed Studio's XIAO and Adafruit's QT Py microcontrollers, this module simplifies the process of integrating relays into your projects. It allows microcontrollers to safely switch high-power devices such as lights, fans, or motors, making it ideal for home automation, IoT applications, and prototyping.
The Relay Add-on Module has a simple pinout for easy integration:
Pin Name | Description |
---|---|
VCC | Power input (3.3V or 5V, depending on the microcontroller used). |
GND | Ground connection. |
IN | Signal input pin to trigger the relay (active HIGH). |
COM | Common terminal of the relay switch. |
NO | Normally Open terminal (connected to COM when the relay is activated). |
NC | Normally Closed terminal (connected to COM when the relay is not activated). |
Connect the Module to the Microcontroller:
Connect the High-Voltage Device:
Write the Control Code:
Power the Circuit:
Below is an example code snippet to control the relay module using an Arduino-compatible board like the Seeed Studio XIAO:
// Define the GPIO pin connected to the relay module's IN pin
const int relayPin = 7;
void setup() {
// Set the relay pin as an output
pinMode(relayPin, OUTPUT);
// Ensure the relay is off at startup
digitalWrite(relayPin, LOW);
}
void loop() {
// Turn the relay ON
digitalWrite(relayPin, HIGH);
delay(5000); // Keep the relay on for 5 seconds
// Turn the relay OFF
digitalWrite(relayPin, LOW);
delay(5000); // Keep the relay off for 5 seconds
}
7
with the GPIO pin number you are using to connect to the relay's IN pin.delay()
values to change the ON/OFF timing.Relay Not Activating:
High-Voltage Device Not Switching:
Module Overheating:
Microcontroller Resets When Relay Activates:
Can I use this module with a 3.3V microcontroller? Yes, the module is compatible with both 3.3V and 5V logic levels.
Is the relay module safe for high-voltage applications? Yes, but ensure proper isolation and follow safety guidelines when working with high voltages.
Can I control multiple relays with one microcontroller? Yes, as long as you have enough GPIO pins and the microcontroller can handle the combined current draw.
Does the module include a flyback diode? Yes, the module has a built-in flyback diode to protect the microcontroller from voltage spikes.
By following this documentation, you can effectively integrate the Relay Add-on Module into your projects and safely control high-voltage devices with ease.