Stufin
Home Quick Cart Profile

12V 4CH Relay Board

Buy Now on Stufin

Operating Voltage

12V DC

Relay Type

Omron-made relay module

Contact Rating

10A/250V AC, 10A/30V DC

Trigger Voltage

3.3V or 5V

Isolation

Electrical isolation between control signal and load

LED Indicators

4 x ON/OFF indicators

Terminal Block Connectors

Screw-terminal block connectors for load connections

Dimensions

85 x 55 x 20 mm (L x W x H)

Weight

Approximately 60g

Pinout and Connection Diagram

The following pinout and connection diagram illustrates the connections and pin assignments for the 12V 4CH Relay Board

| Pin | Function | Description |

| --- | --- | --- |

| VCC | Power Supply | 12V DC power supply |

| GND | Ground | Ground connection |

| IN1-IN4 | Input Signals | Control signals from microcontroller or other control device |

| NO1-NO4 | Normally Open | Relay output connections (load connections) |

| NC1-NC4 | Normally Closed | Relay output connections (load connections) |

| COM1-COM4 | Common | Relay output connections (load connections) |

Note

The pinout and connection diagram is a simplified representation and may vary depending on the specific relay board model and manufacturer. Always refer to the datasheet or manufacturer's documentation for specific details.

Pin Configuration

  • 12V 4CH Relay Board Pinout Guide
  • The 12V 4CH Relay Board is a popular IoT component used to control high-voltage devices using low-voltage signals from microcontrollers or other electronic devices. This guide explains the functionality of each pin on the board, providing a comprehensive understanding of how to connect and use the relay board effectively.
  • Pin Description:
  • Power Supply Pins:
  • 1. VCC: This pin provides the power supply to the relay board. Connect a 12V DC power source to this pin. Make sure to use a suitable power supply that can handle the current requirements of the relay board and the connected devices.
  • 2. GND: This pin is the ground connection for the power supply. Connect it to the negative terminal of the 12V DC power source.
  • Signal Pins:
  • 3. IN1, IN2, IN3, IN4: These pins are the input signals for controlling the four relays individually. Connect these pins to the output pins of your microcontroller or other electronic devices that provide the control signals. The input signals should be TTL-level logic signals (0V or 5V).
  • Relay Pins:
  • 5. COM1, COM2, COM3, COM4: These pins are the common pins for the four relays. Connect these pins to the devices you want to control (e.g., lights, motors, or other appliances).
  • 6. NO1, NO2, NO3, NO4: These pins are the normally open (NO) contacts for the four relays. When the corresponding input signal is high (5V), the NO contact will connect to the COM pin, allowing the device to turn on.
  • 7. NC1, NC2, NC3, NC4: These pins are the normally closed (NC) contacts for the four relays. When the corresponding input signal is low (0V), the NC contact will connect to the COM pin, allowing the device to turn on.
  • Connection Structure:
  • To connect the relay board to your devices and microcontroller, follow this structure:
  • Connect the 12V DC power supply to the VCC and GND pins.
  • Connect the input signals from your microcontroller to the IN1, IN2, IN3, and IN4 pins.
  • Connect the devices you want to control to the COM and NO (or NC) pins accordingly.
  • For example, to control a light bulb using Relay 1:
  • Connect the light bulb to COM1 and NO1.
  • Connect the output pin from your microcontroller to IN1.
  • When the microcontroller outputs a high signal (5V) on IN1, the relay will turn on, connecting the light bulb to the power supply (VCC).
  • Important Notes:
  • Make sure to handle the relay board with care, as it can handle high-voltage and high-current devices.
  • Use suitable wire gauges and connect the devices according to their specified voltage and current ratings.
  • Ensure that the power supply can handle the total current requirement of the relay board and the connected devices.
  • By following this guide, you can effectively connect and use the 12V 4CH Relay Board in your IoT projects, enabling you to control high-voltage devices with ease.

Code Examples

12V 4CH Relay Board Documentation
Overview
The 12V 4CH Relay Board is a compact and versatile component designed for IoT projects, robotics, and automation systems. It features four relay channels, each capable of switching high-power devices such as lights, motors, and solenoids. The board operates on a 12V DC power supply and is controlled through digital signals from a microcontroller or other controlling device.
Key Features
4 relay channels with NO (Normally Open) and NC (Normally Closed) contacts
 Operating voltage: 12V DC
 Relay contact rating: 10A/250V AC, 10A/30V DC
 Control input: 5V TTL logic compatible
 LED indicators for each relay channel
 Screw terminals for easy connection
Pinout
The relay board has a simple pinout:
| Pin | Function |
| --- | --- |
| VCC | 12V DC power supply |
| GND | Ground |
| IN1 | Digital input for relay channel 1 |
| IN2 | Digital input for relay channel 2 |
| IN3 | Digital input for relay channel 3 |
| IN4 | Digital input for relay channel 4 |
Code Examples
### Example 1: Controlling a Relay with Arduino
This example demonstrates how to control a single relay channel using an Arduino Board.
```arduino
const int relayPin = 2;  // Pin connected to IN1 on the relay board
void setup() {
  pinMode(relayPin, OUTPUT);
}
void loop() {
  // Turn on relay channel 1
  digitalWrite(relayPin, HIGH);
  delay(1000);
  
  // Turn off relay channel 1
  digitalWrite(relayPin, LOW);
  delay(1000);
}
```
### Example 2: Controlling Multiple Relays with Raspberry Pi (Python)
This example shows how to control multiple relay channels using a Raspberry Pi and Python.
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Define relay pins
relay_pins = [17, 23, 24, 25]  # GPIO pins connected to IN1, IN2, IN3, IN4
# Set up relay pins as outputs
for pin in relay_pins:
  GPIO.setup(pin, GPIO.OUT)
try:
  while True:
    # Turn on relay channel 1
    GPIO.output(relay_pins[0], GPIO.HIGH)
    time.sleep(1)
    
    # Turn on relay channel 2
    GPIO.output(relay_pins[1], GPIO.HIGH)
    time.sleep(1)
    
    # Turn off relay channel 1
    GPIO.output(relay_pins[0], GPIO.LOW)
    time.sleep(1)
    
    # Turn off relay channel 2
    GPIO.output(relay_pins[1], GPIO.LOW)
    time.sleep(1)
except KeyboardInterrupt:
  GPIO.cleanup()
```
### Example 3: Controlling Relays with ESP32 (MicroPython)
This example demonstrates how to control relay channels using an ESP32 board and MicroPython.
```python
import machine
import time
# Define relay pins
relay_pins = [32, 33, 25, 26]  # GPIO pins connected to IN1, IN2, IN3, IN4
# Set up relay pins as outputs
for pin in relay_pins:
  machine.Pin(pin, machine.Pin.OUT)
while True:
  # Turn on relay channel 1
  machine.Pin(relay_pins[0], machine.Pin.HIGH)
  time.sleep(1)
  
  # Turn on relay channel 2
  machine.Pin(relay_pins[1], machine.Pin.HIGH)
  time.sleep(1)
  
  # Turn off relay channel 1
  machine.Pin(relay_pins[0], machine.Pin.LOW)
  time.sleep(1)
  
  # Turn off relay channel 2
  machine.Pin(relay_pins[1], machine.Pin.LOW)
  time.sleep(1)
```
Note: In all examples, ensure that the relay board is properly connected to the controlling device, and the power supply is connected to the relay board's VCC and GND pins.