5v-relay-module-for-arduino View larger

5V Relay Module KY-019 (for arduino)

PRD-000847

New product

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

More details

This product is no longer in stock

2,00 € tax incl.

More info

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

Step 1: Gather the Required Equipment:

  • Arduino Uno board
  • 5V Relay Module KY-019
  • Breadboard
  • Jumper wires

Step 2: Understand the 5V Relay Module KY-019:

  • The 5V Relay Module KY-019 is an electromagnetic switch that can be controlled by a low-voltage microcontroller, such as an Arduino.
  • It typically has three pins: VCC (power supply), GND (ground), and SIG (signal).
  • The VCC pin is used to provide power to the module (typically 5V).
  • The GND pin is connected to the ground of the Arduino.
  • The SIG pin is used to control the relay switch, and it requires a digital signal (HIGH or LOW) from the Arduino to turn the relay on or off.

Step 3: Connect the 5V Relay Module KY-019 to the Breadboard:

  • Insert the 5V Relay Module KY-019 into the breadboard so that its pins are on separate rows.
  • Connect the VCC pin of the 5V Relay Module KY-019 to the 5V pin on the Arduino Uno using a jumper wire.
  • Connect the GND pin of the 5V Relay Module KY-019 to the GND pin on the Arduino Uno using a jumper wire.
  • Connect the SIG pin of the 5V Relay Module KY-019 to any digital pin on the Arduino Uno, such as D2, using a jumper wire.

Step 4: Control the 5V Relay Module KY-019:

  • 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 2 // Pin number to which the SIG pin of the relay module is connected

void setup() {
  pinMode(RELAY_PIN, OUTPUT); // Set the relay 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 Uno.
  • The code will turn on the relay for 1 second and then turn it off for 1 second in a loop.
  • You can test the relay by connecting a device, such as a light bulb or a motor, to the relay contacts (usually labeled "NO" and "COM") and observing it turning on and off according to the code.

Note: Be sure to connect the relay module to an external power source if you are controlling high-current devices, as the Arduino pins may not be able to provide enough current to drive the relay directly.

That's it! You have successfully connected and controlled a 5V Relay Module KY-019 using an Arduino Uno.



Accessories

Customers who bought this product also bought: