Four Channel 12V ULN2003 Based Relay Board Module
Four Channel 12V ULN2003 Based Relay Board Module
The Four Channel 12V ULN2003 Based Relay Board Module is a versatile and compact relay module designed for a wide range of applications in the Internet of Things (IoT) and automation domains. This module features four individual relay channels, each capable of switching high-power loads, making it an ideal solution for controlling multiple devices or circuits in a single module.
The Four Channel 12V ULN2003 Based Relay Board Module is primarily used to control high-power loads such as motors, solenoids, and lights. It accepts low-voltage inputs (typically 3.3V or 5V) from a microcontroller or other digital devices and uses the ULN2003 Darlington transistor array to switch the higher voltage (12V) relay coils. Each relay channel can be controlled independently, allowing for precise and simultaneous control of multiple loads.
SPDT (Single Pole Double Throw)
10A @ 250V AC, 10A @ 30V DC
12V
120
AgSnO2
3.3V or 5V
20mA (max)
-40C to 85C
-40C to 125C
5% to 95% RH (non-condensing)
The module measures 65mm x 55mm x 18mm (L x W x H).
IoT projects
Robotics
Automation systems
Home automation
Industrial control systems
Security systems
Overall, the Four Channel 12V ULN2003 Based Relay Board Module is a versatile and reliable solution for controlling multiple high-power loads in a single module, making it an ideal component for a wide range of IoT and automation applications.
Four Channel 12V ULN2003 Based Relay Board Module Documentation
Overview
The Four Channel 12V ULN2003 Based Relay Board Module is a relay module designed to control high-power devices using a microcontroller or other low-voltage signal sources. The module features four SPDT (Single Pole Double Throw) relays, each capable of switching up to 12V and 10A. The relays are controlled by the ULN2003 darlington transistor array, which provides a high current gain and allows the module to be driven by low-voltage logic signals.
Pinout and Connections
The module has the following pinout:
VCC: 12V power supply for the relays
GND: Ground connection
IN1, IN2, IN3, IN4: Input control pins for each relay (active low)
COM1, COM2, COM3, COM4: Common terminals for each relay
NO1, NO2, NO3, NO4: Normally open terminals for each relay
NC1, NC2, NC3, NC4: Normally closed terminals for each relay
Example 1: Controlling a Relay with an Arduino
In this example, we will use an Arduino Uno to control one of the relays on the module.
```c++
const int relayPin = 2; // control pin for relay 1
void setup() {
pinMode(relayPin, OUTPUT);
}
void loop() {
digitalWrite(relayPin, LOW); // turn relay on
delay(1000);
digitalWrite(relayPin, HIGH); // turn relay off
delay(1000);
}
```
Example 2: Controlling Multiple Relays with a Raspberry Pi (Python)
In this example, we will use a Raspberry Pi to control multiple relays on the module using Python.
```python
import RPi.GPIO as GPIO
import time
# set up GPIO mode
GPIO.setmode(GPIO.BCM)
# define relay control pins
relay_pins = [17, 23, 24, 25]
# set up relay control pins as outputs
for pin in relay_pins:
GPIO.setup(pin, GPIO.OUT)
try:
while True:
# turn relays on and off in sequence
for pin in relay_pins:
GPIO.output(pin, GPIO.LOW)
time.sleep(1)
GPIO.output(pin, GPIO.HIGH)
time.sleep(1)
except KeyboardInterrupt:
GPIO.cleanup()
```
Example 3: Controlling a Relay with a ESP32 (MicroPython)
In this example, we will use an ESP32 microcontroller to control one of the relays on the module using MicroPython.
```python
import machine
import time
# define relay control pin
relay_pin = machine.Pin(2, machine.Pin.OUT)
while True:
relay_pin.value(0) # turn relay on
time.sleep(1)
relay_pin.value(1) # turn relay off
time.sleep(1)
```
Note: In all examples, make sure to connect the control pins (IN1, IN2, IN3, IN4) to the corresponding digital outputs on your microcontroller, and the VCC and GND pins to a suitable power supply.