Welcome To DPV Technology.In this video we
will learn how to connect this one channel
Relay module with any microcontroller.
For demonstration purpose we will use an arduino
UNO and We will control and LED bulb with
the help of this one channel relay.
So let's get started.
You can buy all types of electronic components
sensors modules at the best price from dpvtechnology.com
Here is the one channel 5 volt relay module.
This is the input side and this is the output
side.
At the input side we have 3 pins- Vcc ground
and signal pin .We have to supply a 5volt
DC voltage to this relay module to operate
it properly.We can supply 5Volt from our arduino
microcontroller 5Volt pin.
But in most of the cases this Will not work
because arduino Uno 5V pin has very low output
current.Therefore we will use a 9 volt battery
to supply power to this relay module.
The signal pin of the relay module is used
to send signal from the arduino to the relay
module.
We can turn on or turn off the load connected
at the output side by sending signal to the
signal pin of the Relay module.
At the output side ,we have 3 pins - one is
NO means normally open, com means common and
NC means normally closed.
In the circuit diagram, we can see If you
want to connect an AC bulb at the output then
we can connect the com pin directly to the
AC and the Normally open pin will be connected
to the AC through the bulb.
In this case if you will not send any signal
to the relay module from the microcontroller
the bulb will be in OFF state.
We have to send a high Signal to the relay
module to turn on the light.That means by
default this is an open circuit pin .That
is why this pin is called normally open pin.
On the other hand if we connect the AC bulb
to the normally closed pin then the bulb will
be in on State without any microcontroller
signal.
So we can say this is a closed circuit pin.
That is why this pin is called normally closed
pin.
We can also turn off the bulb connected to
normally closed pin By sending signal to the
relay module.
Now at the input side we can see +v or we
can say vcc pin of the relay module is connected
to positive terminal of the the external 9V
battery.Then the ground pin of the relay module
should be connected to ground pin of the 9V
battery.
Also we have to connect the ground pin of
the relay module to ground pin of the arduino.We
can connect the signal pin of the relay module
to any digital pin of the arduino, in our
case we have connected it to pin number 8
of the arduino.
Here we can see we have connected the VCC
pin of the relay module to Positive terminal
of the 9 volt battery and the ground pin of
the relay module is connected to to ground
pin of the battery and also to ground pin
of the arduino UNO..The signal pint is connected
to pin number 8 of the Arduino.
Here at the output side we can see the red
wire from the common pin is directly connected
to One terminal of the AC Plug.
Then The normally open pin is connected to
the other terminal of the AC plug through
the AC bulb.
Now connect your arduino board to your PC
through the arduino USB cable.
After that connect the plug to the AC supply.
Do not touch The relay module after connecting
to AC supply Because at the output direct
AC will be there.
Now open your arduino IDE software and copy
and paste this code.
the link of this code is given in the description
of this video.
This code is very simple.
at the beginning of the code we have connected
the relay signal pin at pin number 8 of the
arduino.Then we have to define Relay pin as
output pin.At the beginning of the code we
have kept the relay pin as low So that light
will be off at the beginning of the code .
Then we have send a high signal to the relay
module from the arduino UNO .Therefore the
bulb will be on Connected at the output side
of the relay module.The bulb will be on for
2 seconds since we have introduced a delay
of 2 seconds here .Then we have sent a low
signal to the relay module and that is why
the bulb will be off after 2 second And it
will be in off state for 2 seconds Due to
this two second delay here.Since these codes
are written inside the loop section,Show the
bulb will be in on and off state every after
2 seconds interval.
Now go to tools and select your proper board
and proper port .And then upload the code.
We can see the bulb is turned on and off in
every after 2 seconds according to 
the program.
