Stufin
Home Quick Cart Profile

1 Channel 12V Relay Module with Optocoupler

Buy Now

Optocoupler Isolation

The optocoupler provides electrical isolation between the input and output circuits, ensuring safe and reliable operation.

Low-Voltage ControlThe module can be controlled using a low-voltage digital signal from a microcontroller or other device, typically 3.3V or 5V.
High-Voltage and High-Current CapabilityThe relay can handle high-voltage and high-current devices, making it suitable for a wide range of applications.

Compact Size

The module is compact and lightweight, making it ideal for use in space-constrained applications.

Easy to Use

The module has a simple and intuitive interface, making it easy to integrate into a wide range of projects and applications.

Relay Specifications

+ Contact Rating10A/12V DC
+ Coil Voltage12V DC
+ Coil Current80mA
+ Switching Time10ms (max)

Operating Temperature

-40C to 85C

Applications

The 1 Channel 12V Relay Module with Optocoupler is widely used in various IoT projects and applications, including

Home automation systems

Industrial control systems

Robotics and robotic arms

HVAC systems

Lighting control systems

Motor control systems

Solenoid valve control systems

Pinout and Dimensions

The module's pinout and dimensions are as follows

Pinout

+ VCCPower input (12V)
+ GNDGround
+ INInput signal (low-voltage digital signal)
+ NONormally Open contact
+ NCNormally Closed contact
+ COMCommon contact

Dimensions

45mm x 25mm x 18mm (L x W x H)

Conclusion

The 1 Channel 12V Relay Module with Optocoupler is a versatile and reliable IoT component designed to control high-voltage or high-current devices using a low-voltage digital signal. Its compact size, easy-to-use interface, and robust electrical isolation make it an ideal choice for a wide range of projects and applications.

Pin Configuration

  • 1 Channel 12V Relay Module with Optocoupler Documentation
  • The 1 Channel 12V Relay Module with Optocoupler is a popular IoT component used to control high-power devices using a microcontroller or other low-power signal sources. This module features an optocoupler for electrical isolation and a relay to switch high-power devices.
  • Pin Description:
  • The module has 6 pins, which are explained below:
  • 1. VCC (Power Supply)
  • Function: Positive power supply for the relay module
  • Voltage: 5V or 12V (depending on the relay coil voltage)
  • Connection: Connect to a stable power supply source (e.g., a battery or a wall adapter)
  • 2. GND (Ground)
  • Function: Ground connection for the relay module
  • Connection: Connect to the ground terminal of the power supply source
  • 3. IN (Input Signal)
  • Function: Input signal from a microcontroller or other control device
  • Voltage: Typically 3.3V or 5V (depending on the microcontroller's output)
  • Connection: Connect to a digital output pin of a microcontroller or other control device
  • 4. Relay Output ( Normally Open / NO )
  • Function: Normally open contact of the relay
  • Voltage: Up to 12V (dependent on the device being controlled)
  • Connection: Connect to one terminal of the device being controlled (e.g., a light bulb or a DC motor)
  • 5. Relay Output ( Normally Closed / NC )
  • Function: Normally closed contact of the relay
  • Voltage: Up to 12V (dependent on the device being controlled)
  • Connection: Connect to the other terminal of the device being controlled (e.g., a light bulb or a DC motor)
  • 6. COM (Common)
  • Function: Common terminal of the relay
  • Voltage: Up to 12V (dependent on the device being controlled)
  • Connection: Connect to the power source of the device being controlled (e.g., the positive terminal of a light bulb or a DC motor)
  • Connection Structure:
  • To connect the pins, follow this structure:
  • Connect VCC to a stable 5V or 12V power supply source.
  • Connect GND to the ground terminal of the power supply source.
  • Connect IN to a digital output pin of a microcontroller or other control device.
  • Connect the Relay Output (NO) to one terminal of the device being controlled.
  • Connect the Relay Output (NC) to the other terminal of the device being controlled.
  • Connect COM to the power source of the device being controlled.
  • Important Notes:
  • Ensure the power supply voltage matches the relay coil voltage (5V or 12V).
  • Use a flyback diode (if needed) to protect the relay from back-EMF when switching inductive loads.
  • The optocoupler provides electrical isolation between the input signal and the relay, but it is still important to follow proper safety precautions when working with high-power devices.
  • By following this documentation, you should be able to correctly connect and utilize the 1 Channel 12V Relay Module with Optocoupler in your IoT projects.

Code Examples

1 Channel 12V Relay Module with Optocoupler Documentation
Overview
The 1 Channel 12V Relay Module with Optocoupler is a popular IoT component used to control high-voltage devices (up to 12V) using a microcontroller or other low-voltage devices. The optocoupler provides electrical isolation between the input signal and the relay, ensuring safe and reliable operation.
Pinout
VCC: 5V power supply
 GND: Ground
 IN: Signal input (active low)
 Relay Output: Normally Open (NO), Normally Closed (NC), and Common (COM)
Technical Specifications
Relay type: SPST (Single Pole Single Throw)
 Rated voltage: 12V
 Rated current: 10A
 Operating frequency: 50/60Hz
 Optocoupler isolation voltage: 5KV
Code Examples
### Example 1: Controlling a Light Bulb using Arduino
In this example, we'll use an Arduino Uno board to control a light bulb connected to the relay module.
```cpp
const int relayPin = 2;  // Choose a digital pin on your Arduino board
void setup() {
  pinMode(relayPin, OUTPUT);
}
void loop() {
  digitalWrite(relayPin, LOW);  // Turn the relay ON (light bulb turns ON)
  delay(1000);
  digitalWrite(relayPin, HIGH);  // Turn the relay OFF (light bulb turns OFF)
  delay(1000);
}
```
### Example 2: Controlling a DC Motor using Raspberry Pi (Python)
In this example, we'll use a Raspberry Pi to control a DC motor connected to the relay module.
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Set the relay pin as output
relay_pin = 17
GPIO.setup(relay_pin, GPIO.OUT)
try:
    while True:
        GPIO.output(relay_pin, GPIO.LOW)  # Turn the relay ON (motor turns ON)
        time.sleep(1)
        GPIO.output(relay_pin, GPIO.HIGH)  # Turn the relay OFF (motor turns OFF)
        time.sleep(1)
except KeyboardInterrupt:
    GPIO.cleanup()
```
Important Notes
Make sure to connect the relay module to a suitable power supply and ensure the voltage rating is not exceeded.
 Use proper electrical isolation and safety precautions when working with high-voltage devices.
 The relay module can be used with other microcontrollers or development boards, such as ESP32, ESP8266, or STM32, with minor modifications to the code.