HOS logo

Arduino 4 Channel Relay Module 5V
පරිශීලක අත්පොත

HOS 5V Arduino 4 Channel Relay Module

5V Arduino 4 නාලිකා රිලේ මොඩියුලය

When we want to control 4 high-voltage devices such as pumps, fans, actuators… We can use multiple relay modules. However, there is a simpler way is to use a 4-channel relay module. A 4-channel relay module is a combination of 4 relays on a single board.
A 4-channel relay module vs 4 x 1-channel relay modules:
♦— A 4-channel relay module has simpler wiring.
♦— A 4-channel relay module uses less space.
♦— A 4-channel relay module is cheaper.
♦— The programming is the same.

About Arduino 4 Channel Relay Module:

HOS 5V Arduino 4 Channel Relay Module - Fig 1

HOS 5V Arduino 4 Channel Relay Module - Fig 2

For detail of how to connect relay to high-voltage, what are differences between normally closed and normally open
It also has 4 jumpers to select between the low trigger and the high trigger for each relay individually.

රැහැන් සටහන:

4-channel relay module consumes considerable power. Therefore, we should NOT power the module directly from the 5V pin of Arduino. We need to use external 5V power for the module instead.
So, we need to use three power sources:
♦— A 5V power adapter for Arduino
♦— A 5V power adapter for the 4-channel relay module
♦— A higher-voltage power adapter (12VDC, 24VDC, 48VDC, 220AC…) for things that are controlled by the 4-channel relay module
♦— Wiring diagram with three power sources. Power supply for Arduino (not included in the image) can be via either USB cable or power jack.

HOS 5V Arduino 4 Channel Relay Module - Fig 3

♦— We can reduce the number of power adapters by using a single 5V power source for both Arduino and the 4-channel relay module.

HOS 5V Arduino 4 Channel Relay Module - Fig 4

* NOTE THAT:
If 4 devices that are controlled by a 4-channel relay module use the same voltage, we can use a single high-voltage power adapter for all. However, if they use different voltages, we can use different high-voltage power adapters independently.

How to Program for 4-Channel Relay Module:
♦— Initialize the Arduino pin to the digital output mode by using pin Mode() function.
pin Mode(PIN_RELAY_1, OUTPUT);
pin Mode(PIN_RELAY_2, OUTPUT);
pin Mode(PIN_RELAY_3, OUTPUT);
pin Mode(PIN_RELAY_4, OUTPUT);
♦—Control the relays state by using digital Write() function.
digital Write(PIN_RELAY_1, HIGH);
digital Write(PIN_RELAY_2, HIGH);
digital Write(PIN_RELAY_3, HIGH);
digital Write(PIN_RELAY_4, HIGH);

Arduino Code:
/*
* Created by ArduinoGetStarted.com
*
* මෙම හිටපුample කේතය පොදු වසමෙහි ඇත
*
* Tutorial page: https://arduinogetstarted.com/tutorials/arduino-4-channelrelaymodule

*/

#define PIN_RELAY_1 2 // the Arduino pin, which connects to the IN1 pin of relay module
#define PIN_RELAY_2 3 // the Arduino pin, which connects to the IN2 pin of relay module
#define PIN_RELAY_3 4 // the Arduino pin, which connects to the IN3 pin of relay module
#define PIN_RELAY_4 5 // the Arduino pin, which connects to the IN4 pin of relay module

// the setup function runs once when you press reset or power the board void setup() { Serial. begin(9600);
// initialize digital pin as an output.
pin Mode(PIN_RELAY_1, OUTPUT);
pin Mode(PIN_RELAY_2, OUTPUT);
pin Mode(PIN_RELAY_3, OUTPUT);
pin Mode(PIN_RELAY_4, OUTPUT); }
// the loop function runs over and over again forever void loop() {
Serial. println (“Turn on all”);
digital Write(PIN_RELAY_1, HIGH);
digital Write(PIN_RELAY_2, HIGH);
digital Write(PIN_RELAY_3, HIGH);
digital Write(PIN_RELAY_4, HIGH); delay(1000);
Serial. println(“Turn off all”);
digital Write(PIN_RELAY_1, LOW);
digital Write(PIN_RELAY_2, LOW);
digital Write(PIN_RELAY_3, LOW);
digital Write(PIN_RELAY_4, LOW); delay(1000); }

ඉක්මන් පියවර:

♦— Copy the above code and open with Arduino IDE
♦— Click Upload button on Arduino IDE to upload code to Arduino
♦— Listen the click sound on relays.
♦— See the result on Serial Monitor.

HOS 5V Arduino 4 Channel Relay Module - Fig 5

ලේඛන / සම්පත්

HOS 5V Arduino 4 Channel Relay Module [pdf] පරිශීලක අත්පොත
5V Arduino 4 Channel Relay Module, 4 Channel Relay Module, Relay Module, Module

යොමු කිරීම්

කමෙන්ට් එකක් දාන්න

ඔබගේ විද්‍යුත් තැපැල් ලිපිනය ප්‍රකාශනය නොකෙරේ. අවශ්‍ය ක්ෂේත්‍ර සලකුණු කර ඇත *