Hello everyone. Welcome back to the RFID NFC section.
And this is video number 2.5 and the last
project of that section.
In this project we are going to control the
12 volt lock using RFID tag. You
guys can Implement that project into your home like
you can convert your traditional doors into
the smart doors. So guys, let's get started with
that. Okay.
Here, this is our old setup where r5g
module has been connected with
the vmos D1 mini. And now we need
to connect that relay lock and all the stuff. Okay, here are
the 12 volt charger and these are
the connections. Okay, so firstly we need
to test that by
giving the power and see how the Lock Works.
actually, it's
Or from the power so you can just use your
hands to assemble the cables. Okay
now
sorry the other cable.
Has been removed this cable the red cable.
Okay, no worries. We need to.
Okay, there is a still small Grant in
the charger capacitor. So you
need to take care. By the way. This is a 12 volt. It will not
hurt you. But still you need to take care.
and now
cable setup has been ready.
Now I give the power and you see it.
pull the lock automatically and when
we
remove the charger from the power cord it automatically
opens and now it's the lock and
it struck. So what we are going to do is
we're going to you can take any of
the cable either ground either.
power cable okay and give it
to the relay and
here are the options. This is
the comb the direct adapter cable goes
there and there are some other options.
If you see here, this is the NC normally closed
and this is an normally open. I'm going
to use the normally closed whenever our system restarts. It
will automatically close down
mean. There's the no power on the system. If
you choose normally open it will automatically allow
the power till the system gives some
more command Okay, so firstly we need to
use the screw and lose our
nuts.
Put into the center.
Awesome. We are good to go. Just write
your nuts.
and
no.
We're done with that setup.
Good to go. Okay.
It's loose but I think I need to again try
it.
because it's a very
Thin cable, that's why it's creating
the issue, but no worries. We need
to just
push the cable inside
or we can just make a big hole in that.
by
pushing and
Gain, combine the red pin.
and
for the safety reason
use the electric tape to wrap up these terminals
So to avoid the conflict between
positive and the negative.
Either it it will make your that system hot.
Now here we have a three pins.
I need to take it.
The first one is the
Signal pin this is the signal and this is
the positive and this is the ground, okay.
So from where we need to take the power?
if we
see the system.
we have
VCC here
and this is the ground we will
take the
power from
that module
so the orange will be VCC.
And the yellow will be ground.
Okay.
And same we will
plug into that.
Okay.
and
We will.
connect the signal pin and here we will use the
D4 pin
If you see here.
This is the D4 Prime previously we
used.
D1 and D2 and the three left
And now here we have.
D4 pen, okay. Now the setup has been ready.
And we need to move towards the coding. So
in the next part, we will do the coding.
Welcome back guys. So firstly we need to
get the tag it to move
next. So click on the serial monitor.
and
here we have a card. Okay, and this is our
it so double click
on that and copy that ID because we need to
verify that ID.
I copied that by control C. And yeah, this
works controlling by the way. I increase the
font size. So you guys can understand easily. Okay
here we need to in the setup. We
need to
Change the mode pin mode.
D4 comma output okay,
because we need to write
some stuff on that board either one
or zero to turn on.
and here we're going to verify the
uid with that value that we have copied, okay.
and what we will do is
to use if uid value
equal to
that ID
then
digital, right
D4 comma 0 and
we need to
use the delay.
so it could
turn off the lock for the
four seconds and then again.
G4 comma 1 okay.
Save and now it's time
to upload the code verify the port and we are good to
go with that.
Welcome back guys. Now. Our code has been uploaded
to the development board and it's time for testing. So
let's get started. I put the tag and
the lock is
Closed for the five seconds. Actually, I change the
time from four second to the five second and automatically.
it
release the lock after the five seconds because
we cannot wait to put
the tag again or put any other tag to
close the lock.
so again
it take the 5 seconds, then it will release the
lock.
So guys happy hacking and make some
productive prototype in your
home and share in the message box
so I can share it with the other students. So guys see
you in the next video where we are
going to discuss about the pros and the cons of RFID and the NFC,
so guys see you in the next video. Have a good day, bye-bye.