The XH-M291 is a versatile relay module designed to control high voltage devices using a low voltage signal. Manufactured by Generic, this module is identified by the part ID DC8-38V. It features an optocoupler for isolation, ensuring safe and reliable operation in various automation projects. Common applications include home automation, industrial control systems, and remote switching.
Parameter | Value |
---|---|
Operating Voltage | 8V - 38V DC |
Trigger Voltage | 5V DC |
Relay Type | SPDT (Single Pole Double Throw) |
Max Load Current | 10A @ 250V AC / 10A @ 30V DC |
Isolation | Optocoupler |
Dimensions | 50mm x 26mm x 18mm |
Pin Name | Description |
---|---|
VCC | Power supply input (8V - 38V DC) |
GND | Ground |
IN | Signal input (5V DC) |
NO | Normally Open contact of the relay |
COM | Common contact of the relay |
NC | Normally Closed contact of the relay |
/*
Example code to control the XH-M291 relay module with an Arduino UNO.
This code will turn the relay on for 1 second and off for 1 second repeatedly.
*/
const int relayPin = 7; // Pin connected to IN pin of XH-M291
void setup() {
pinMode(relayPin, OUTPUT); // Set relay pin as an output
}
void loop() {
digitalWrite(relayPin, HIGH); // Turn relay on
delay(1000); // Wait for 1 second
digitalWrite(relayPin, LOW); // Turn relay off
delay(1000); // Wait for 1 second
}
Relay Not Triggering:
Relay Stuck in One State:
Interference with Control Circuit:
Q1: Can I use the XH-M291 with a 3.3V microcontroller?
Q2: Can the XH-M291 control an AC load?
Q3: What is the purpose of the optocoupler in the XH-M291?
By following this documentation, users can effectively integrate the XH-M291 relay module into their projects, ensuring safe and reliable operation.