Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use WeMos D1 Mini Relay Shield V2: Examples, Pinouts, and Specs

Image of WeMos D1 Mini Relay Shield V2
Cirkit Designer LogoDesign with WeMos D1 Mini Relay Shield V2 in Cirkit Designer

Introduction

The WeMos D1 Mini Relay Shield V2 is a compact and versatile relay module designed specifically for the WeMos D1 Mini microcontroller. This shield allows users to control high-voltage devices (such as lights, fans, or appliances) using low-voltage signals from the D1 Mini. It is ideal for IoT applications, home automation projects, and other scenarios where electrical load switching is required.

Explore Projects Built with WeMos D1 Mini Relay Shield V2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Wemos D1 Mini Controlled Relay with IR Sensor and LED Indicator
Image of GarageDoor: A project utilizing WeMos D1 Mini Relay Shield V2 in a practical application
This circuit is designed to interface a Wemos D1 Mini microcontroller with a two-channel relay, an IR sensor, pushbuttons, and an LED with a current-limiting resistor. The Wemos D1 Mini controls the relay channels via its D1 and D2 pins, receives input from the IR sensor on pin D7, and uses pins D5 and D6 to interact with the pushbuttons through diodes for input debouncing or protection. The LED indicates status or provides feedback, and the 5V power from the Wemos D1 Mini is distributed to the relay, IR sensor, and LED through diodes for polarity protection.
Cirkit Designer LogoOpen Project in Cirkit Designer
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
Image of godmode: A project utilizing WeMos D1 Mini Relay Shield V2 in a practical application
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
WeMos D1 R2 Controlled Relay Switching Circuit for AC Bulb and USB Charger
Image of Hand Gesture Light: A project utilizing WeMos D1 Mini Relay Shield V2 in a practical application
This circuit uses a WeMos D1 R2 microcontroller to control a 5V 2-relay module, which in turn controls the power to an AC bulb and a cellphone charger. The microcontroller also interfaces with a line tracking sensor, which likely provides input to control the relay states. The AC bulb and cellphone charger are powered by an AC wire connection, with the relay acting as a switch for the bulb.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Bluetooth-Controlled Relay System
Image of ARM: A project utilizing WeMos D1 Mini Relay Shield V2 in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an HC-05 Bluetooth Module and an 8-Channel 5V Relay Shield. The Arduino is configured to communicate with the Bluetooth module via its serial pins (D0 and D1) and control the relay channels through digital pins D2 to D9. The purpose of this circuit is likely to enable wireless control of various devices connected to the relay shield, with commands received via Bluetooth.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with WeMos D1 Mini Relay Shield V2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of GarageDoor: A project utilizing WeMos D1 Mini Relay Shield V2 in a practical application
Wemos D1 Mini Controlled Relay with IR Sensor and LED Indicator
This circuit is designed to interface a Wemos D1 Mini microcontroller with a two-channel relay, an IR sensor, pushbuttons, and an LED with a current-limiting resistor. The Wemos D1 Mini controls the relay channels via its D1 and D2 pins, receives input from the IR sensor on pin D7, and uses pins D5 and D6 to interact with the pushbuttons through diodes for input debouncing or protection. The LED indicates status or provides feedback, and the 5V power from the Wemos D1 Mini is distributed to the relay, IR sensor, and LED through diodes for polarity protection.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of godmode: A project utilizing WeMos D1 Mini Relay Shield V2 in a practical application
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Hand Gesture Light: A project utilizing WeMos D1 Mini Relay Shield V2 in a practical application
WeMos D1 R2 Controlled Relay Switching Circuit for AC Bulb and USB Charger
This circuit uses a WeMos D1 R2 microcontroller to control a 5V 2-relay module, which in turn controls the power to an AC bulb and a cellphone charger. The microcontroller also interfaces with a line tracking sensor, which likely provides input to control the relay states. The AC bulb and cellphone charger are powered by an AC wire connection, with the relay acting as a switch for the bulb.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ARM: A project utilizing WeMos D1 Mini Relay Shield V2 in a practical application
Arduino UNO Bluetooth-Controlled Relay System
This circuit features an Arduino UNO microcontroller interfaced with an HC-05 Bluetooth Module and an 8-Channel 5V Relay Shield. The Arduino is configured to communicate with the Bluetooth module via its serial pins (D0 and D1) and control the relay channels through digital pins D2 to D9. The purpose of this circuit is likely to enable wireless control of various devices connected to the relay shield, with commands received via Bluetooth.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Home automation (e.g., controlling lights, fans, or appliances)
  • IoT projects requiring high-voltage device control
  • Industrial automation and control systems
  • Smart energy management systems
  • Prototyping and educational projects

Technical Specifications

The WeMos D1 Mini Relay Shield V2 is designed to work seamlessly with the D1 Mini and features the following specifications:

Key Technical Details

Parameter Specification
Operating Voltage 5V DC (powered via D1 Mini)
Trigger Voltage 3.3V (compatible with D1 Mini GPIO)
Relay Type SPDT (Single Pole Double Throw)
Maximum Load Voltage 250V AC / 30V DC
Maximum Load Current 10A
Dimensions 34.2mm x 25.6mm x 19.3mm
Weight ~10g

Pin Configuration and Descriptions

The relay shield connects directly to the WeMos D1 Mini via its pin headers. Below is the pin configuration:

Pin Name Description
VCC 5V power supply input (provided by the D1 Mini)
GND Ground connection
IN Control signal input (connect to a GPIO pin on the D1 Mini)
NO Normally Open terminal (connect to the load for default OFF state)
NC Normally Closed terminal (connect to the load for default ON state)
COM Common terminal (connect to the power source or load as required)

Usage Instructions

How to Use the Component in a Circuit

  1. Hardware Setup:

    • Attach the WeMos D1 Mini Relay Shield V2 directly to the D1 Mini using the pin headers.
    • Connect the high-voltage device (e.g., a light bulb) to the relay terminals:
      • Connect one wire of the device to the COM terminal.
      • Connect the other wire to either the NO (Normally Open) or NC (Normally Closed) terminal, depending on the desired default state.
    • Ensure the D1 Mini is powered via USB or an external power source.
  2. Software Setup:

    • Use the GPIO pin connected to the relay's IN pin to control the relay.
    • A HIGH signal (3.3V) will activate the relay, while a LOW signal (0V) will deactivate it.
  3. Example Circuit:

    • Connect a 220V AC light bulb to the COM and NO terminals.
    • Use GPIO D1 (pin 5) on the D1 Mini to control the relay.

Important Considerations and Best Practices

  • Safety First: Always ensure the high-voltage side of the relay is properly insulated to avoid electric shock or short circuits.
  • Load Ratings: Do not exceed the maximum voltage (250V AC / 30V DC) or current (10A) ratings of the relay.
  • Power Supply: Ensure the D1 Mini is powered with a stable 5V source to avoid relay malfunction.
  • Inductive Loads: When switching inductive loads (e.g., motors), use a flyback diode across the load to protect the relay from voltage spikes.

Example Code for Arduino UNO

Below is an example code snippet to control the relay shield using the D1 Mini:

// Define the GPIO pin connected to the relay's IN pin
#define RELAY_PIN D1  // D1 corresponds to GPIO5 on the D1 Mini

void setup() {
  pinMode(RELAY_PIN, OUTPUT); // Set the relay pin as an output
  digitalWrite(RELAY_PIN, LOW); // Ensure the relay is off at startup
}

void loop() {
  // Turn the relay ON
  digitalWrite(RELAY_PIN, HIGH); 
  delay(5000); // Keep the relay on for 5 seconds

  // Turn the relay OFF
  digitalWrite(RELAY_PIN, LOW); 
  delay(5000); // Keep the relay off for 5 seconds
}

Troubleshooting and FAQs

Common Issues Users Might Face

  1. Relay Not Activating:

    • Cause: Insufficient power supply to the D1 Mini or incorrect GPIO pin configuration.
    • Solution: Ensure the D1 Mini is powered with a stable 5V source and verify the GPIO pin used in the code matches the hardware connection.
  2. Relay Stuck in ON or OFF State:

    • Cause: Faulty relay or incorrect wiring.
    • Solution: Check the wiring and ensure the relay is not damaged. Replace the shield if necessary.
  3. High-Voltage Device Not Working:

    • Cause: Incorrect connection to the relay terminals.
    • Solution: Verify the device is connected to the correct terminals (COM, NO, or NC) based on the desired behavior.
  4. Noise or Chattering from the Relay:

    • Cause: Unstable power supply or interference.
    • Solution: Use a decoupling capacitor (e.g., 100µF) across the power supply pins of the D1 Mini.

Solutions and Tips for Troubleshooting

  • Double-check all connections and ensure they are secure.
  • Use a multimeter to verify continuity and voltage levels.
  • Test the relay shield with a simple LED circuit before connecting high-voltage devices.
  • Refer to the D1 Mini and relay shield datasheets for additional technical details.

By following this documentation, users can safely and effectively integrate the WeMos D1 Mini Relay Shield V2 into their projects.