The new KEYES 5V Relay Module is perfectly made for Arduino application. It has three pins, the VCC, GND and Signal. It can act as switch if the circuit and the load circuit have different supply voltage. It is commonly use if the load circuit is AC. It is a switch used to connect isolated connection from the circuit using a circuit signal. It has red LED that turns on every time the coil is energized or the signal pin has a high input. Commonly used in automation control circuit, it is actually a small Current to control a large current operation “automatic switch.”
Arduino Connection with Relay Module
For the DC part of the circuit:
Arduino digital pin 10 –> module pin S
Arduino GND –> module pin –
Arduino +5V –> module pin +
AC Part of the circuit:
On the AC side connect your feed to Common (middle contact) and use NO (Normally Open) to Lamp. It will get power when (S) is high.
Warning: Always be very careful when experimenting with AC, electrical shock can result in serious injures.
Relay module from bottom side is open when AC is connected do not touch the circuit.
Arduino Program for Relay module
//KY019 5V relay module int relay = 10; // relay turns trigger signal - active high; void setup () { pinMode (relay, OUTPUT); // Define port attribute is output; } void loop () { digitalWrite (relay, HIGH); // relay conduction; delay (1000); digitalWrite (relay, LOW); // relay switch is turned off; delay (1000); }
This program will turn on and off the Lamp. Similar to Blink example. You can see module led also blinks.
Responses