Ordered on weekdays before 14:00 = shipped the same day and delivered the next day in 98% of cases. Free returns 30-day reflection period 1-year warranty

Wiring diagram and code example

How to connect the Relay Module 12v to an Arduino UNO or ESP32, with an example sketch you can upload straight away.

12V Relay Module Control

This project demonstrates how to control a 12V relay module with an Arduino Uno. The sketch periodically turns the relay ON and OFF every 2 seconds, displaying the current state in the Serial Monitor. An onboard LED indicator on the module will light up when the relay is energized.

Wiring diagram: Relay Module 12v on an Arduino UNO
Wiring diagram · Click to enlarge
Connection table: Relay Module 12v on an Arduino UNO
Connection table · Click to enlarge
12V_Relay_Module_Control.ino · compiled and verified
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : 12V Relay Module Control
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : Relais Module 12v AC250V 10A Relais 12v 1 relais LED indicator
 *  Libraries : none (built-in)
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

// Pin configuration
const int RELAY_PIN = 7;

void setup() {
  // Initialize serial communication
  Serial.begin(115200);
  while (!Serial) {
    ; // Wait for serial port to connect
  }
  
  // Configure relay control pin
  pinMode(RELAY_PIN, OUTPUT);
  digitalWrite(RELAY_PIN, HIGH); // Default off (active-low module)

  Serial.println(F("12V Relay Module Demo Initialized"));
}

void loop() {
  // Activate relay (Low-level trigger)
  Serial.println(F("Relay: ON"));
  digitalWrite(RELAY_PIN, LOW);
  delay(2000);

  // Deactivate relay
  Serial.println(F("Relay: OFF"));
  digitalWrite(RELAY_PIN, HIGH);
  delay(2000);
}

Wiring diagram and example code generated by Codey.online — https://www.codey.online

12V Relay Control with ESP32

This project demonstrates how to control a 12V single-channel relay module using an ESP32. The relay coil is powered by an external 12V DC power supply with a shared ground to the ESP32, and GPIO 4 toggles the relay on and off every two seconds.

Wiring diagram: Relay Module 12v on an ESP32 DevKit V1
Wiring diagram · Click to enlarge
Connection table: Relay Module 12v on an ESP32 DevKit V1
Connection table · Click to enlarge
12V_Relay_Control_with_ESP32.ino · compiled and verified
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : 12V Relay Control with ESP32
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : Relais Module 12v AC250V 10A Relais 12v 1 relais LED indicator
 *  Libraries : none (built-in)
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

// Pin connected to relay control input
const int RELAY_PIN = 4;

void setup() {
  Serial.begin(115200);
  
  // Configure relay pin as output
  pinMode(RELAY_PIN, OUTPUT);
  digitalWrite(RELAY_PIN, LOW);
  
  Serial.println("ESP32 12V Relay Demo Started");
}

void loop() {
  // Turn relay ON
  Serial.println("Relay ON");
  digitalWrite(RELAY_PIN, HIGH);
  delay(2000);

  // Turn relay OFF
  Serial.println("Relay OFF");
  digitalWrite(RELAY_PIN, LOW);
  delay(2000);
}

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Relay Module 12v

  • High load possible: AC250V 10A
  • Relay control 12V
  • 1 relay on PCB
  • with LED indicator

Keywords: 12V relay, relay 12V, relay 12V, 12V relay

Dimensions
Length: 5.1cm
Width: 2.54cm
Height: 1.9cm

  • 12V control
  • 1 relay
  • LED indicator
  • 5,1 x 2,54 x 1,9 cm

Why choose this product?

  • High load – Suitable for AC250V 10A.
  • 12V control – Relay control at 12V.
  • LED indicator – For visual status monitoring.
  • Compact size – Takes up little space.
Specifications
Width2,54 cm
Length5,1 cm
Height1,9 cm
High load possibleAC250V 10A

In the package

  • 12V relay module

Frequently bought together

Total: € 14,77

Reviews

★★★★★ 4,7/5 3 reviews
  • ★★★★★Johan van der EndeVerified purchase

    Good product at a fair price

  • ★★★★★Jacobs FransVerified purchase

    Does what it should

  • ★★★★★Peter van Doornum

    Good product, but you have to figure out the connections yourself by measuring and so on. That should be better

Write a review
Your rating

Shipping & returns

Shipping

  • Parcel with track & trace€ 7,70Within 24 hours
  • Pick up at PostNL location€ 7,40Within 24 hours
  • Letterbox parcel€ 3,70Within 2 business days
  • Letterbox parcel 24 hours€ 4,55Within 24 hours
  • Pick up in storeFree
All about shipping

Returns

Not satisfied? You have 30 days after delivery to return the product.

All about returns