Dies ist ein einstellbares DC-12V-Zeitrelais-Modul für Ausschaltverzögerung oder Intervallsteuerung in Smart Home oder Automatisierung. Die Verzögerung ist von etwa 0 bis 25 Sekunden einstellbar, meist über ein integriertes Potentiometer, und schaltet einen Relaisausgang, der sich mit einem externen Steuersignal von einem Mikrocontroller ansteuern lässt.
| Pin | Signal | Beschreibung |
|---|---|---|
DC+ |
power | 12 V DC positive supply input for powering the timer relay module. |
DC- |
ground | Negative supply return for the 12 V DC input. |
IN |
digital | External trigger/control signal input used to start the delay timing action. |
GND |
ground | Ground reference for the external trigger/control signal. |
NC |
digital | Relay normally-closed contact; connected to COM when the relay is inactive. |
COM |
digital | Relay common contact; wire this in series with the switched load circuit. |
NO |
digital | Relay normally-open contact; connected to COM when the relay is energized. |
| Von | Nach | Kabel |
|---|---|---|
board:5V |
x1:DC+ |
red |
board:GND |
x1:DC- |
black |
board:D4 |
x1:IN |
green |
board:GND.1 |
x1:GND |
black |
Dieses Beispiel wurde für das arduino-uno geschrieben und kompiliergeprüft. Codey Online passt es für jedes andere unterstützte Board an.
// Canonical beginner example for a 12V adjustable timer delay relay module
// Arduino Uno drives the module's IN pin to start the delay timing action.
const int relayTriggerPin = 4; // Connected to module IN
void setup() {
pinMode(relayTriggerPin, OUTPUT);
Serial.begin(9600);
// Keep the trigger in its inactive state at startup.
digitalWrite(relayTriggerPin, LOW);
Serial.println("Timer delay relay demo started.");
Serial.println("Module is powered from 5V here for documentation example.");
Serial.println("Pulsing IN to start the delay timing action...");
}
void loop() {
// Send a short trigger pulse to the module.
digitalWrite(relayTriggerPin, HIGH);
Serial.println("IN = HIGH (trigger pulse)");
delay(200);
digitalWrite(relayTriggerPin, LOW);
Serial.println("IN = LOW (waiting for the delay to run)");
// Wait long enough to observe the module timing behavior.
delay(5000);
}
Beschreib einfach, was du bauen willst. Codey Online schreibt den Code, zeichnet den Schaltplan, kompiliert alles und flasht dein Board direkt aus dem Browser.
Kostenlos starten