-
Notifications
You must be signed in to change notification settings - Fork 0
2ch Mod Relay Overview
The relay module is a 2-channel logically operated switch that allows you to turn on or off a circuit that operates at voltage and/or current much higher than a microcontroller could handle, 110-220V AC / 10A for this particular module. This relay is galvanically isolated, i.e., there is no electrical connection between the low voltage circuit operated by the microcontroller logic and the high power circuits. The relay protects MCU from AC cirquit. However, if you wand to use common ground for MCU and the signal ground make sure the jumper is placed on the GND=SGND pins, remove otherwise. This module has 3 relays with three connections each named NC, COM, and NO. Depending on the input signal each relay will switch from CLOSED (connected) at LOW to OPEN (disconnected) at HIGH.
- On-board EL817 photoelectric coupler with strong photoelectric anti-interference isolating ability
- 2 on-board 5V, 10A / 250VAC, 10A / 30VDC relays
- Endurance: 100000 cycles
- Module has diode current protection, short response time
- PCB Size: 52.5mm x 44.5mm
- SGND: ground
- IN1: control signal
- IN2: control signal
- GND: ground
- VCC: 5V DC
void setup(){
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
void loop(){
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
delay(4000);
digitalWrite(5, HIGH);
digitalWrite(6, LOW);
delay(4000);
}
The components to be used are:
- Microcontroller (any RobotDyn MCU or arduino-compatible controller)
- 2 channel 5V 10A relay module
- Pin connectors
- Breadboard
- USB cable
- 2 AC lamps
- Connect the components based on the figure shown in the wiring diagram using pin connectors. VCC and COM pin is connected to the 5V power supply, GND pin is connected to the GND, IN1 and IN2 pins are connected to the digital I/O pins. Pin numbers are based on the actual program code.
- After hardware connection, insert the sample sketch into the Arduino IDE.
- Using a USB cable, connect the ports from the microcontroller to the computer.
- Upload the program.
- Connect the 2 AC-powered lamps to the AC power ground and to phase line via the relay using the NC connector of each relay Be very careful working with AC circuits as high AC power can injure or kill
- Power up the MCU and observe the lamps switching on and off for 2 seconds repeatedly