Hi welcome to Robojax . In this video I'm going to show you how you can use this 5
volt relay module for Arduino so you can connect a control a light like this.
This is a relay. You can see physical dimensions here. We have three
connections here that can be connected to Arduino for control and power purpose
we have three terminals here this one the middle one is positive the other
side is negative if you can see it here they label it as negative and then the
last one is signal. We have ground the middle one is positive which would be connected to
5 volts this will be connected to the power of Arduino and this is a signal
where it receives a signal to turn this ON. Now we have an LED here whenever it
receives a signal to energize relay to establish that connection this will turn
ON indicating that there is signal on this side we have three terminals here
and this is normally connected (NC) what it means is that if you connect two wires
like that this will be these two will be connected if you connect two wires here
these are normally open (NO) and they will be connected or be connected like that when
the power establishes or the signal comes whatever you do this pin, the
middle one will never change so keep the wire the middle wire here if you don't
know what is the condition of the relay under what condition it's ON or OFF so keep
the middle not changed just change the other wire here or there and then you
will find your way. Another thing that's to remember about this relay is that it
can handle up to 10 ampere and any voltage. Here it says 30 volts 10 amperes
if you are using 30V or 28 volts that's 10 ampere but if you are let's
say in North America you are using 120 volts so that's 10A so what you
do is multiply by 10 just put a zero here this this can handle in North
America 1250 watts or 1.25 kilowatt machine to turn on and if
you're in Europe or Asia or somewhere else which has 220 or 240 volts so then
it would be two 2500W watts so remember that that's the
limitation because if you connect a load that is heavier or it needs more current
this will melt down or not were considered a limitation when you're
using it another thing to remember about this one is that this is not optically
isolated so it doesn't have optocoupler which means the relay is connected to
the rest of the circuit except these three contacts are isolated totally keep
in mind that when you're working with AC voltage we have to be very careful you
have to wear a protective gloves if you're trying to touch this area once
it's connected or the power is connected and make sure that you do not put this
in a metal metallic surface. Let me explain the AC bulb so this is a table
light that can be connected to the wall outlet and then the wire goes and will
be turned on but I have disconnected one of these two wires here I've just cut
this wire from here. Now this can be connected to the relay. Jos of relay is
to just connect them when it is ON and disconnected it when it is OFF. I've just
twisted them and then put some solder so this can be inserted into a connector
with a screw to connect with screw. To connect the wire just unscrew the screw, insert the wire
wire and then tighten it back. The same thing for the other one. Now I have
connected the AC load here between the middle one and the side. This is normally
open so when really get power or gets a signal that
will connect these two wires to turn on the bulb. This wire is connected to pin 7
and then the red is connected to 5 volts and then ground is connected to the
ground of Arduino. [Code explained] let me explain the
Using pinMode, setting pin 7 as output but this will be connected to terminal s or
the signal of relay. Inside the setup() we don't do anything and inside the loop we say
that when as initially at starts pin 7 should be High This is turning
the really ON and then keeping it for 3000 milliseconds or 3 second and after
that it turns it off and keeps it off for 5000 milliseconds. So this
is as simple as that. You can do whatever you want under your
condition or controlled controlling some heater or maybe the relay may be turned
on and off under certain condition. Let's say a temperature increases or you're
turning on and off some fan or other equipment you can do it here. Just
control pin 7 to be HIGH or LOW under certain condition. For example this
push is a value of a push button that you're receiving it when somebody pushes
a button if push is equal HIGH then turn this on and
keep it for 3,000 milliseconds on or you can just remove this and just turn
it ON. To do that just put this line. Now the AC load is also connected everything is
connected except Arduino. Arduino doesn't have any power yet.
There is AC power now. There as you can see normally open means when the system doesn't have
any signal or any power it's open or not connected.
It goes for three seconds ON and 5 seconds OFF.
you can get the code by clicking at the link at the description below or you can
go directly to robojax.com/learn/arduino thank you for watching. Please
thumb up the video if you liked it. Please subscribe and also share this
video appreciated
you