WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.600 --> 00:00:10.800
Hello everyone. Welcome back to the RFID NFC section.

1
00:00:10.800 --> 00:00:13.400
 And this is video number 2.5 and the last

2
00:00:13.400 --> 00:00:15.000
 project of that section.

3
00:00:15.900 --> 00:00:18.300
In this project we are going to control the

4
00:00:18.300 --> 00:00:21.600
 12 volt lock using RFID tag. You

5
00:00:21.600 --> 00:00:25.100
 guys can Implement that project into your home like

6
00:00:24.100 --> 00:00:27.200
 you can convert your traditional doors into

7
00:00:27.200 --> 00:00:30.300
 the smart doors. So guys, let's get started with

8
00:00:30.300 --> 00:00:31.400
 that. Okay.

9
00:00:32.600 --> 00:00:36.300
Here, this is our old setup where r5g

10
00:00:35.300 --> 00:00:38.400
 module has been connected with

11
00:00:38.400 --> 00:00:41.100
 the vmos D1 mini. And now we need

12
00:00:41.100 --> 00:00:44.600
 to connect that relay lock and all the stuff. Okay, here are

13
00:00:44.600 --> 00:00:47.600
 the 12 volt charger and these are

14
00:00:47.600 --> 00:00:50.000
 the connections. Okay, so firstly we need

15
00:00:50.200 --> 00:00:51.700
 to test that by

16
00:00:54.400 --> 00:00:57.600
giving the power and see how the Lock Works.

17
00:01:00.300 --> 00:01:00.600
actually, it's

18
00:01:01.800 --> 00:01:04.200
Or from the power so you can just use your

19
00:01:04.200 --> 00:01:07.200
 hands to assemble the cables. Okay

20
00:01:07.200 --> 00:01:08.300
 now

21
00:01:11.800 --> 00:01:13.300
sorry the other cable.

22
00:01:14.200 --> 00:01:17.200
Has been removed this cable the red cable.

23
00:01:17.200 --> 00:01:18.800
 Okay, no worries. We need to.

24
00:01:22.700 --> 00:01:26.200
Okay, there is a still small Grant in

25
00:01:25.200 --> 00:01:28.200
 the charger capacitor. So you

26
00:01:28.200 --> 00:01:31.300
 need to take care. By the way. This is a 12 volt. It will not

27
00:01:31.300 --> 00:01:33.700
 hurt you. But still you need to take care.

28
00:01:34.900 --> 00:01:35.700
and now

29
00:01:36.900 --> 00:01:38.100
cable setup has been ready.

30
00:01:40.300 --> 00:01:42.500
Now I give the power and you see it.

31
00:01:43.600 --> 00:01:46.900
pull the lock automatically and when

32
00:01:46.900 --> 00:01:47.100
 we

33
00:01:49.300 --> 00:01:52.900
remove the charger from the power cord it automatically

34
00:01:52.900 --> 00:01:55.400
 opens and now it's the lock and

35
00:01:55.400 --> 00:01:58.000
 it struck. So what we are going to do is

36
00:01:59.700 --> 00:02:02.700
we're going to you can take any of

37
00:02:02.700 --> 00:02:04.500
 the cable either ground either.

38
00:02:05.800 --> 00:02:08.000
power cable okay and give it

39
00:02:08.200 --> 00:02:09.900
 to the relay and

40
00:02:12.500 --> 00:02:15.300
here are the options. This is

41
00:02:15.300 --> 00:02:18.200
 the comb the direct adapter cable goes

42
00:02:18.200 --> 00:02:20.500
 there and there are some other options.

43
00:02:22.600 --> 00:02:25.800
If you see here, this is the NC normally closed

44
00:02:25.800 --> 00:02:28.700
 and this is an normally open. I'm going

45
00:02:28.700 --> 00:02:32.200
 to use the normally closed whenever our system restarts. It

46
00:02:31.200 --> 00:02:34.700
 will automatically close down

47
00:02:34.700 --> 00:02:37.800
 mean. There's the no power on the system. If

48
00:02:37.800 --> 00:02:40.400
 you choose normally open it will automatically allow

49
00:02:40.400 --> 00:02:43.200
 the power till the system gives some

50
00:02:43.200 --> 00:02:45.600
 more command Okay, so firstly we need to

51
00:02:46.600 --> 00:02:49.500
use the screw and lose our

52
00:02:49.500 --> 00:02:49.800
 nuts.

53
00:03:03.700 --> 00:03:04.800
Put into the center.

54
00:03:06.900 --> 00:03:10.500
Awesome. We are good to go. Just write

55
00:03:09.500 --> 00:03:10.900
 your nuts.

56
00:03:16.500 --> 00:03:16.700
and

57
00:03:32.900 --> 00:03:33.400
no.

58
00:03:34.400 --> 00:03:36.800
We're done with that setup.

59
00:03:37.500 --> 00:03:38.700
Good to go. Okay.

60
00:03:40.600 --> 00:03:44.000
It's loose but I think I need to again try

61
00:03:43.000 --> 00:03:44.400
 it.

62
00:03:45.200 --> 00:03:46.100
because it's a very

63
00:03:47.700 --> 00:03:50.900
Thin cable, that's why it's creating

64
00:03:50.900 --> 00:03:53.600
 the issue, but no worries. We need

65
00:03:53.600 --> 00:03:54.300
 to just

66
00:03:57.400 --> 00:03:59.200
push the cable inside

67
00:04:00.100 --> 00:04:03.700
or we can just make a big hole in that.

68
00:04:04.800 --> 00:04:05.400
by

69
00:04:07.400 --> 00:04:08.600
pushing and

70
00:04:28.500 --> 00:04:30.300
Gain, combine the red pin.

71
00:04:30.900 --> 00:04:31.100
and

72
00:04:32.300 --> 00:04:33.500
for the safety reason

73
00:04:34.300 --> 00:04:37.800
use the electric tape to wrap up these terminals

74
00:04:37.800 --> 00:04:40.700
 So to avoid the conflict between

75
00:04:40.700 --> 00:04:42.200
 positive and the negative.

76
00:04:43.100 --> 00:04:45.800
Either it it will make your that system hot.

77
00:04:46.900 --> 00:04:50.100
Now here we have a three pins.

78
00:04:51.300 --> 00:04:52.800
I need to take it.

79
00:04:55.500 --> 00:04:56.700
The first one is the

80
00:04:58.400 --> 00:05:01.000
Signal pin this is the signal and this is

81
00:05:01.300 --> 00:05:04.100
 the positive and this is the ground, okay.

82
00:05:04.900 --> 00:05:07.400
So from where we need to take the power?

83
00:05:08.200 --> 00:05:08.500
if we

84
00:05:09.800 --> 00:05:10.800
see the system.

85
00:05:12.400 --> 00:05:13.000
we have

86
00:05:14.900 --> 00:05:15.900
VCC here

87
00:05:16.900 --> 00:05:19.300
and this is the ground we will

88
00:05:19.300 --> 00:05:19.800
 take the

89
00:05:20.600 --> 00:05:21.400
power from

90
00:05:22.500 --> 00:05:23.600
that module

91
00:05:24.400 --> 00:05:27.500
so the orange will be VCC.

92
00:05:30.800 --> 00:05:32.700
And the yellow will be ground.

93
00:05:33.900 --> 00:05:34.100
Okay.

94
00:05:41.500 --> 00:05:44.000
And same we will

95
00:05:44.800 --> 00:05:45.500
 plug into that.

96
00:05:48.100 --> 00:05:48.300
Okay.

97
00:05:49.500 --> 00:05:49.800
and

98
00:05:51.100 --> 00:05:51.500
We will.

99
00:05:58.400 --> 00:06:01.100
connect the signal pin and here we will use the

100
00:06:02.000 --> 00:06:03.200
D4 pin

101
00:06:07.600 --> 00:06:08.400
If you see here.

102
00:06:16.700 --> 00:06:19.500
This is the D4 Prime previously we

103
00:06:19.500 --> 00:06:20.000
 used.

104
00:06:22.200 --> 00:06:24.800
D1 and D2 and the three left

105
00:06:25.700 --> 00:06:26.700
And now here we have.

106
00:06:27.500 --> 00:06:29.900
D4 pen, okay. Now the setup has been ready.

107
00:06:30.700 --> 00:06:34.100
And we need to move towards the coding. So

108
00:06:33.100 --> 00:06:36.100
 in the next part, we will do the coding.

109
00:06:38.700 --> 00:06:41.500
Welcome back guys. So firstly we need to

110
00:06:41.500 --> 00:06:44.400
 get the tag it to move

111
00:06:44.400 --> 00:06:47.500
 next. So click on the serial monitor.

112
00:06:48.200 --> 00:06:48.700
and

113
00:06:50.400 --> 00:06:53.400
here we have a card. Okay, and this is our

114
00:06:53.400 --> 00:06:56.400
 it so double click

115
00:06:56.400 --> 00:06:59.500
 on that and copy that ID because we need to

116
00:06:59.500 --> 00:07:01.500
 verify that ID.

117
00:07:02.600 --> 00:07:05.500
I copied that by control C. And yeah, this

118
00:07:05.500 --> 00:07:08.400
 works controlling by the way. I increase the

119
00:07:08.400 --> 00:07:11.800
 font size. So you guys can understand easily. Okay

120
00:07:11.800 --> 00:07:14.200
 here we need to in the setup. We

121
00:07:14.200 --> 00:07:14.600
 need to

122
00:07:17.200 --> 00:07:19.600
Change the mode pin mode.

123
00:07:21.500 --> 00:07:24.900
D4 comma output okay,

124
00:07:24.900 --> 00:07:27.300
 because we need to write

125
00:07:27.300 --> 00:07:30.300
 some stuff on that board either one

126
00:07:30.300 --> 00:07:31.900
 or zero to turn on.

127
00:07:32.600 --> 00:07:36.300
and here we're going to verify the

128
00:07:37.100 --> 00:07:40.200
uid with that value that we have copied, okay.

129
00:07:42.700 --> 00:07:44.900
and what we will do is

130
00:07:47.900 --> 00:07:50.900
to use if uid value

131
00:07:51.600 --> 00:07:52.400
equal to

132
00:07:54.100 --> 00:07:55.000
that ID

133
00:07:56.100 --> 00:07:56.500
then

134
00:07:57.300 --> 00:07:58.900
digital, right

135
00:07:59.900 --> 00:08:03.900
D4 comma 0 and

136
00:08:02.900 --> 00:08:05.000
 we need to

137
00:08:05.200 --> 00:08:06.100
 use the delay.

138
00:08:06.800 --> 00:08:08.000
so it could

139
00:08:09.300 --> 00:08:12.200
turn off the lock for the

140
00:08:12.200 --> 00:08:15.000
 four seconds and then again.

141
00:08:16.900 --> 00:08:19.900
G4 comma 1 okay.

142
00:08:20.900 --> 00:08:23.100
Save and now it's time

143
00:08:23.100 --> 00:08:26.300
 to upload the code verify the port and we are good to

144
00:08:26.300 --> 00:08:26.700
 go with that.

145
00:08:28.800 --> 00:08:31.400
Welcome back guys. Now. Our code has been uploaded

146
00:08:31.400 --> 00:08:34.900
 to the development board and it's time for testing. So

147
00:08:34.900 --> 00:08:38.000
 let's get started. I put the tag and

148
00:08:37.400 --> 00:08:39.200
 the lock is

149
00:08:40.300 --> 00:08:43.200
Closed for the five seconds. Actually, I change the

150
00:08:43.200 --> 00:08:45.800
 time from four second to the five second and automatically.

151
00:08:46.600 --> 00:08:46.900
it

152
00:08:47.800 --> 00:08:51.400
release the lock after the five seconds because

153
00:08:50.400 --> 00:08:53.500
 we cannot wait to put

154
00:08:53.500 --> 00:08:56.300
 the tag again or put any other tag to

155
00:08:56.300 --> 00:08:57.400
 close the lock.

156
00:08:58.200 --> 00:08:59.200
so again

157
00:09:00.300 --> 00:09:03.300
it take the 5 seconds, then it will release the

158
00:09:03.300 --> 00:09:03.600
 lock.

159
00:09:09.900 --> 00:09:13.500
So guys happy hacking and make some

160
00:09:13.500 --> 00:09:17.000
 productive prototype in your

161
00:09:16.100 --> 00:09:19.400
 home and share in the message box

162
00:09:19.400 --> 00:09:23.200
 so I can share it with the other students. So guys see

163
00:09:22.200 --> 00:09:25.200
 you in the next video where we are

164
00:09:25.200 --> 00:09:28.600
 going to discuss about the pros and the cons of RFID and the NFC,

165
00:09:28.600 --> 00:09:30.900
 so guys see you in the next video. Have a good day, bye-bye.
