Stufin
Home Quick Cart Profile

24V Relay Cube

Buy Now on Stufin

Input Voltage

3.3V or 5V

Relay Output Voltage

24V

Relay Output Current

Up to 10A

Operating Temperature

-40C to 85C

Dimensions

25mm x 25mm x 15mm (L x W x H)

Weight

20g

Applications

The 24V Relay Cube is suitable for a wide range of applications, including

Home automation systems

Industrial control systems

IoT projects

Robotics and automation

Security systems

Smart energy management systems

Pinout

The relay cube features a simple 4-pin interface

VCC

Input voltage (3.3V or 5V)

IN

Logic input signal

COM

Relay common terminal

NC

Relay normally closed terminal

NO

Relay normally open terminal

Pin Configuration

  • 24V Relay Cube Documentation
  • Pin Description
  • The 24V Relay Cube is a compact, low-power relay module designed for industrial and IoT applications. It has a total of 6 pins, which are explained below:
  • Pin 1: VCC
  • Description: Power supply pin for the relay module
  • Voltage: 24V DC (max)
  • Current: 15mA (max)
  • Note: Connect to a suitable 24V DC power source. Ensure the voltage does not exceed 24V to prevent damage to the module.
  • Pin 2: GND
  • Description: Ground pin for the relay module
  • Note: Connect to a common ground point in your circuit.
  • Pin 3: IN1
  • Description: Input pin for controlling the relay (Normally Open)
  • Signal: Active Low (0V = Relay ON, 24V = Relay OFF)
  • Note: Connect to a digital output pin of a microcontroller or a logic circuit to control the relay.
  • Pin 4: COM
  • Description: Common pin for the relay
  • Note: Connect to one end of the load you want to control (e.g., a LED, a motor, or a solenoid).
  • Pin 5: NO
  • Description: Normally Open pin for the relay
  • Note: Connect to the other end of the load you want to control (e.g., a LED, a motor, or a solenoid).
  • Pin 6: NC
  • Description: Normally Closed pin for the relay
  • Note: Not used in this configuration. Leave it unconnected.
  • Connection Structure
  • To connect the 24V Relay Cube to a load and a microcontroller, follow this structure:
  • 1. VCC (Pin 1) 24V DC Power Source
  • 2. GND (Pin 2) Common Ground Point
  • 3. IN1 (Pin 3) Digital Output Pin of Microcontroller (e.g., Arduino, Raspberry Pi, or ESP32)
  • 4. COM (Pin 4) Load (e.g., LED+, Motor+, or Solenoid+)
  • 5. NO (Pin 5) Load (e.g., LED-, Motor-, or Solenoid-)
  • Example Connection
  • Suppose you want to control a 24V DC motor using an Arduino Uno board and the 24V Relay Cube. Here's an example connection:
  • 1. VCC (Pin 1) 24V DC Power Source
  • 2. GND (Pin 2) GND Pin on Arduino Uno
  • 3. IN1 (Pin 3) Digital Pin 2 on Arduino Uno
  • 4. COM (Pin 4) Motor+ Terminal
  • 5. NO (Pin 5) Motor- Terminal
  • In your Arduino code, set Digital Pin 2 as an output and write a logic LOW (0V) to turn the motor ON, and write a logic HIGH (24V) to turn the motor OFF.
  • Please ensure proper safety precautions when working with high voltage and high current circuits.

Code Examples

24V Relay Cube Documentation
Overview
The 24V Relay Cube is a powerful and compact relay module designed for IoT applications. It features a single relay output, capable of switching loads up to 24V at 10A. The module is equipped with a phototriac coupler for isolation and protection. The relay is controlled by a digital signal from a microcontroller or other logic device.
Pinout
The 24V Relay Cube has the following pinout:
VCC: 5V DC power supply
 GND: Ground
 IN: Digital input for relay control (active high)
 COM: Common terminal for relay output
 NC: Normally closed terminal for relay output
 NO: Normally open terminal for relay output
Code Examples
### Example 1: Using the 24V Relay Cube with Arduino
In this example, we'll use an Arduino Uno to control the 24V Relay Cube. We'll connect the relay module to the digital output pin 2 of the Arduino.
```c
#define RELAY_PIN 2 // Define the digital output pin for the relay
void setup() {
  pinMode(RELAY_PIN, OUTPUT); // Set the relay pin as an output
}
void loop() {
  digitalWrite(RELAY_PIN, HIGH); // Turn the relay ON
  delay(1000); // Wait for 1 second
  digitalWrite(RELAY_PIN, LOW); // Turn the relay OFF
  delay(1000); // Wait for 1 second
}
```
### Example 2: Using the 24V Relay Cube with Raspberry Pi (Python)
In this example, we'll use a Raspberry Pi to control the 24V Relay Cube using Python. We'll connect the relay module to GPIO pin 17 of the Raspberry Pi.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM) # Set the GPIO mode to BCM
relay_pin = 17 # Define the GPIO pin for the relay
GPIO.setup(relay_pin, GPIO.OUT) # Set the relay pin as an output
while True:
    GPIO.output(relay_pin, GPIO.HIGH) # Turn the relay ON
    time.sleep(1) # Wait for 1 second
    GPIO.output(relay_pin, GPIO.LOW) # Turn the relay OFF
    time.sleep(1) # Wait for 1 second
```
### Example 3: Using the 24V Relay Cube with ESP32 (MicroPython)
In this example, we'll use an ESP32 board to control the 24V Relay Cube using MicroPython. We'll connect the relay module to GPIO pin 18 of the ESP32.
```python
import machine
import time
relay_pin = machine.Pin(18, machine.Pin.OUT) # Define the GPIO pin for the relay
while True:
    relay_pin.value(1) # Turn the relay ON
    time.sleep(1) # Wait for 1 second
    relay_pin.value(0) # Turn the relay OFF
    time.sleep(1) # Wait for 1 second
```
Note: In all examples, ensure that the 24V Relay Cube is powered from a suitable 5V DC power source, and the load connected to the relay output is rated for 24V at 10A or less.