Stufin
Home Quick Cart Profile

8-CH 12V ULN2003 Based Relay Board

Buy Now

Component Name

8-CH 12V ULN2003 Based Relay Board

Description

The 8-CH 12V ULN2003 Based Relay Board is a versatile and reliable printed circuit board (PCB) designed for switching high-power devices and appliances using low-voltage control signals. This relay board is equipped with eight individual relays, each capable of handling a maximum voltage of 12V and a maximum current of 2A. The board is built around the ULN2003 Darlington transistor array, which provides a high current gain and enables the relays to switch high-power loads with ease.

Functionality

The primary function of the 8-CH 12V ULN2003 Based Relay Board is to provide a convenient and isolated way to control high-power devices, such as lights, motors, and solenoids, using low-voltage signals from microcontrollers, single-board computers, or other digital devices. The relays on the board can be triggered using digital input signals, allowing for precise control over the connected devices.

Key Features

  • 8-Channel Relay Board: The board features eight individual relays, each with a normally open (NO) and normally closed (NC) contact.
  • ULN2003 Darlington Transistor Array: The board is built around the ULN2003 Darlington transistor array, which provides a high current gain and enables the relays to switch high-power loads.
  • 12V Relay Voltage: Each relay is rated for a maximum voltage of 12V, making it suitable for a wide range of applications.
  • 2A Relay Current: Each relay can handle a maximum current of 2A, allowing for the control of small to medium-sized devices.
  • Digital Input Signals: The relays can be triggered using digital input signals from microcontrollers, single-board computers, or other digital devices.
  • Isolated Relay Channels: Each relay channel is electrically isolated from the others, ensuring that there is no interference between channels.
  • LED Indicators: Each relay channel features an LED indicator that illuminates when the relay is activated.
  • Power and Signal Connectors: The board features screw terminals for easy connection of power and signal wires.
  • Compact Design: The board has a compact design, making it suitable for use in space-constrained applications.

Applications

  • Home automation systems
  • Industrial control systems
  • IoT projects
  • Robotics and mechatronics
  • LED strip lighting control
  • Motor control applications
  • Solenoid valve control
The 8-CH 12V ULN2003 Based Relay Board is suitable for a wide range of applications, including

Relay Type

Electromagnetic relay

Relay Voltage

12V

Relay Current

2A

Control Signal

Digital input signal (TTL compatible)

Operating Temperature

-20C to 80C

Storage Temperature

-40C to 125C

Dimensions

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

Notes and Precautions

The relay board should be used in a well-ventilated area, away from moisture and humidity.

The board should be powered from a stable 12V power supply.

The relays should be used within their rated current and voltage specifications to ensure reliable operation.

The board should be handled with care to avoid damaging the components or the PCB.

Pin Configuration

  • 8-CH 12V ULN2003 Based Relay Board Pinout Guide
  • The 8-CH 12V ULN2003 Based Relay Board is a popular IoT component used for controlling high-power AC/DC loads using digital signals from microcontrollers or other devices. This guide provides a detailed explanation of each pin on the board, along with connection guidelines.
  • Pinout Structure:
  • The relay board has a total of 26 pins, divided into three main sections:
  • 1. Power Supply Section (3 pins)
  • 2. Signal Input Section (8 pins)
  • 3. Relay Output Section (15 pins)
  • Power Supply Section:
  • VCC (Pin 1): 12V DC power supply input for the relay board. Connect a 12V DC power source to this pin.
  • GND (Pin 2): Ground pin for the power supply. Connect to the negative terminal of the 12V DC power source.
  • JD-VCC (Pin 3): Jumpers for connecting the relay board's power supply to the input signal's power supply (optional).
  • Signal Input Section:
  • IN1 (Pin 4): Digital signal input for Relay 1. Connect to the digital output of a microcontroller or other device.
  • IN2 (Pin 5): Digital signal input for Relay 2. Connect to the digital output of a microcontroller or other device.
  • IN3 (Pin 6): Digital signal input for Relay 3. Connect to the digital output of a microcontroller or other device.
  • IN4 (Pin 7): Digital signal input for Relay 4. Connect to the digital output of a microcontroller or other device.
  • IN5 (Pin 8): Digital signal input for Relay 5. Connect to the digital output of a microcontroller or other device.
  • IN6 (Pin 9): Digital signal input for Relay 6. Connect to the digital output of a microcontroller or other device.
  • IN7 (Pin 10): Digital signal input for Relay 7. Connect to the digital output of a microcontroller or other device.
  • IN8 (Pin 11): Digital signal input for Relay 8. Connect to the digital output of a microcontroller or other device.
  • Relay Output Section:
  • NO1 (Pin 12): Normally Open (NO) contact for Relay 1. Connect to the load (e.g., AC/DC device) to be controlled.
  • NC1 (Pin 13): Normally Closed (NC) contact for Relay 1. Connect to the load (e.g., AC/DC device) to be controlled.
  • COM1 (Pin 14): Common contact for Relay 1. Connect to the power source of the load (e.g., AC/DC device).
  • NO2 (Pin 15): Normally Open (NO) contact for Relay 2. Connect to the load (e.g., AC/DC device) to be controlled.
  • NC2 (Pin 16): Normally Closed (NC) contact for Relay 2. Connect to the load (e.g., AC/DC device) to be controlled.
  • COM2 (Pin 17): Common contact for Relay 2. Connect to the power source of the load (e.g., AC/DC device).
  • NO3 (Pin 18): Normally Open (NO) contact for Relay 3. Connect to the load (e.g., AC/DC device) to be controlled.
  • NC3 (Pin 19): Normally Closed (NC) contact for Relay 3. Connect to the load (e.g., AC/DC device) to be controlled.
  • COM3 (Pin 20): Common contact for Relay 3. Connect to the power source of the load (e.g., AC/DC device).
  • NO4 (Pin 21): Normally Open (NO) contact for Relay 4. Connect to the load (e.g., AC/DC device) to be controlled.
  • NC4 (Pin 22): Normally Closed (NC) contact for Relay 4. Connect to the load (e.g., AC/DC device) to be controlled.
  • COM4 (Pin 23): Common contact for Relay 4. Connect to the power source of the load (e.g., AC/DC device).
  • NO5 (Pin 24): Normally Open (NO) contact for Relay 5. Connect to the load (e.g., AC/DC device) to be controlled.
  • NC5 (Pin 25): Normally Closed (NC) contact for Relay 5. Connect to the load (e.g., AC/DC device) to be controlled.
  • COM5 (Pin 26): Common contact for Relay 5. Connect to the power source of the load (e.g., AC/DC device).
  • Connection Guidelines:
  • 1. Connect the power supply (12V DC) to the VCC and GND pins.
  • 2. Connect the digital signal input from a microcontroller or other device to the IN pins.
  • 3. Connect the load (e.g., AC/DC device) to the corresponding relay output pins (NO, NC, and COM).
  • 4. Ensure that the relay board is properly grounded and connected to a reliable power source.
  • 5. Use a suitable cable or wire to connect the relay board to the load and power supply, considering the current rating and voltage of the load.
  • By following these guidelines and understanding the pinout structure, you can successfully integrate the 8-CH 12V ULN2003 Based Relay Board into your IoT project.

Code Examples

8-CH 12V ULN2003 Based Relay Board Documentation
Overview
The 8-CH 12V ULN2003 Based Relay Board is a versatile IoT component designed to control up to 8 external devices or loads using a microcontroller or microprocessor. The board is based on the ULN2003 Darlington array, which provides high current and voltage capabilities, making it suitable for a wide range of applications.
Pinouts and Connections
The relay board has the following pinouts and connections:
VCC: 12V power input
 GND: Ground connection
 IN1-IN8: Input pins for controlling the relays (active low)
  Relay 1-8: Normally Open (NO) and Normally Closed (NC) contacts for each relay
Code Examples
### Example 1: Arduino Uno Control
This example demonstrates how to control the relay board using an Arduino Uno microcontroller. We will turn on Relay 1 and Relay 3 for 5 seconds, then turn them off.
```c++
const int relayPins[] = {2, 3, 4, 5, 6, 7, 8, 9}; // define the input pins for the relay board
void setup() {
  for (int i = 0; i < 8; i++) {
    pinMode(relayPins[i], OUTPUT);
  }
}
void loop() {
  digitalWrite(relayPins[0], LOW); // turn on Relay 1
  digitalWrite(relayPins[2], LOW); // turn on Relay 3
  delay(5000);
  digitalWrite(relayPins[0], HIGH); // turn off Relay 1
  digitalWrite(relayPins[2], HIGH); // turn off Relay 3
  delay(5000);
}
```
### Example 2: Raspberry Pi Control using Python
This example demonstrates how to control the relay board using a Raspberry Pi and Python. We will turn on Relay 2 and Relay 4 for 5 seconds, then turn them off.
```python
import RPi.GPIO as GPIO
import time
# set up GPIO mode
GPIO.setmode(GPIO.BCM)
# define the input pins for the relay board
relayPins = [17, 23, 24, 25, 12, 16, 20, 21]
# set up the input pins as outputs
for pin in relayPins:
    GPIO.setup(pin, GPIO.OUT)
try:
    while True:
        GPIO.output(relayPins[1], GPIO.LOW) # turn on Relay 2
        GPIO.output(relayPins[3], GPIO.LOW) # turn on Relay 4
        time.sleep(5)
        GPIO.output(relayPins[1], GPIO.HIGH) # turn off Relay 2
        GPIO.output(relayPins[3], GPIO.HIGH) # turn off Relay 4
        time.sleep(5)
except KeyboardInterrupt:
    GPIO.cleanup()
```
### Example 3: ESP32 Control using MicroPython
This example demonstrates how to control the relay board using an ESP32 microcontroller and MicroPython. We will turn on Relay 5 and Relay 7 for 5 seconds, then turn them off.
```python
import machine
import utime
# define the input pins for the relay board
relayPins = [23, 18, 5, 15, 4, 2, 12, 13]
# set up the input pins as outputs
for pin in relayPins:
    machine.Pin(pin, machine.Pin.OUT)
while True:
    relayPins[4].value(0) # turn on Relay 5
    relayPins[6].value(0) # turn on Relay 7
    utime.sleep(5)
    relayPins[4].value(1) # turn off Relay 5
    relayPins[6].value(1) # turn off Relay 7
    utime.sleep(5)
```
Note: In all examples, ensure that the relay board is properly connected to the microcontroller or microprocessor, and that the input pins are correctly defined in the code.