5v-relay-module-ky-019-with-optocoupler Μεγαλύτερη προβολή

5V Relay Module KY-019 with Optocoupler

PRD-002693

Νέο προϊόν

Features:

  • High quality 5v relay.
  • LED status indicator
  • High Current relay, AC250V 10A ; DC30V 10A
  • Perfect for Arduino Projects and more

Product may differ from the picture

Περισσότερες λεπτομέρειες

Διαθέσιμο

2,20 € με Φ.Π.Α

Άλλες πληροφορίες

Here's a step-by-step tutorial on how to connect a 5V Relay Module to an Arduino:

Step 1: Gather the Required Equipment:

  • Arduino board (such as Arduino Uno)
  • 5V Relay Module
  • Breadboard
  • Jumper wires

Step 2: Understand the 5V Relay Module:

  • The 5V Relay Module is an electromechanical switch module that can be used to control high-voltage devices with a low-voltage microcontroller, such as an Arduino.
  • It typically has three pins: VCC (power supply), GND (ground), and IN (input control signal).
  • The VCC pin is used to provide power to the relay module (typically 5V).
  • The GND pin is connected to the ground of the Arduino.
  • The IN pin is used to provide a control signal from the Arduino to activate or deactivate the relay.

Step 3: Connect the 5V Relay Module to the Breadboard:

  • Insert the 5V Relay Module into the breadboard so that its pins are on separate rows.
  • Connect the VCC pin of the 5V Relay Module to the 5V pin on the Arduino board using a jumper wire.
  • Connect the GND pin of the 5V Relay Module to the GND pin on the Arduino board using a jumper wire.
  • Connect the IN pin of the 5V Relay Module to any digital pin on the Arduino board, such as D7, using a jumper wire.

Step 4: Control the 5V Relay Module with Arduino:

  • Open the Arduino IDE software on your computer and create a new sketch.
  • Copy and paste the following code into the sketch:

#define RELAY_PIN 7   // Pin number to which the 5V Relay Module input is connected

void setup() {
  pinMode(RELAY_PIN, OUTPUT); // Set the 5V Relay Module pin as output
}

void loop() {
  digitalWrite(RELAY_PIN, HIGH); // Turn on the relay
  delay(1000); // Wait for 1 second
  digitalWrite(RELAY_PIN, LOW); // Turn off the relay
  delay(1000); // Wait for 1 second
}

  • Verify and upload the code to your Arduino board.
  • The relay on the 5V Relay Module should now switch on and off at 1-second intervals, controlling the high-voltage device connected to the relay's output terminals.

That's it! You have successfully connected and controlled a 5V Relay Module with an Arduino. You can now use the relay module to control various high-voltage devices in your Arduino projects, such as lights, motors, fans, and more. Please note that when dealing with high-voltage devices, be sure to take proper precautions and follow safety guidelines to avoid any potential hazards.

Αξεσουάρ

Πελάτες που αγόρασαν αυτό το προϊόν, αγόρασαν επίσης: