1
00:00:07,000 --> 00:00:08,000
Hello, friends.

2
00:00:09,000 --> 00:00:17,000
In today's lecture, I just show you how to control your AC appliances with the help of relay.

3
00:00:18,000 --> 00:00:25,000
And over here as a controller, I am using any USB 6001 DAC card and software.

4
00:00:25,000 --> 00:00:32,000
I am using Matlab and the input device over here is capacitive touch sensor.

5
00:00:33,000 --> 00:00:47,000
This is nearly same video as in my IR sensor and relay connections in my previous video as we see how

6
00:00:47,000 --> 00:00:49,000
to control the relay using IR sensor.

7
00:00:50,000 --> 00:00:52,000
So now I just change the only.

8
00:00:52,000 --> 00:00:55,000
There is a change in only in the sensor.

9
00:00:55,000 --> 00:01:02,000
So as you see this is my capacitive touch sensor This module have three pins.

10
00:01:02,000 --> 00:01:10,000
One is ground, one is VCC, one is signal that when I just put my hand over it, it will generate a

11
00:01:10,000 --> 00:01:13,000
signal, otherwise it will generate zero.

12
00:01:13,000 --> 00:01:20,000
So I am using digital pin for signal acquisition over here.

13
00:01:20,000 --> 00:01:21,000
This is my VCC.

14
00:01:22,000 --> 00:01:28,000
This one pin goes to over here to this sensor this capacitive touch sensor.

15
00:01:28,000 --> 00:01:33,000
One ground is connected and the blue one is my signal.

16
00:01:33,000 --> 00:01:35,000
That is from the touch sensor.

17
00:01:36,000 --> 00:01:40,000
On the other hand I am using analog output pin over here.

18
00:01:40,000 --> 00:01:45,000
I am using A0 zero to control the relay.

19
00:01:45,000 --> 00:01:53,000
Again, in the case of relay we have three pins, one is VCC, one is ground, one is signal pin that

20
00:01:53,000 --> 00:01:57,000
it requires to control the appliance.

21
00:01:57,000 --> 00:02:01,000
Over here on the output side in the relay we have three pins.

22
00:02:01,000 --> 00:02:05,000
One is normally open.

23
00:02:05,000 --> 00:02:08,000
This is normally open normally closed.

24
00:02:08,000 --> 00:02:09,000
This is phase.

25
00:02:10,000 --> 00:02:11,000
so one.

26
00:02:11,000 --> 00:02:15,000
This is my main AC in India.

27
00:02:15,000 --> 00:02:16,000
We have 220.

28
00:02:16,000 --> 00:02:23,000
So one wire goes to the holder, another wire goes to the face.

29
00:02:24,000 --> 00:02:35,000
Then this is the wire from main AC and I just use another wire.

30
00:02:35,000 --> 00:02:39,000
I just connect with the holder.

31
00:02:39,000 --> 00:02:42,000
Another pin as you see over here.

32
00:02:42,000 --> 00:02:44,000
Another wire to the end.

33
00:02:44,000 --> 00:02:51,000
This end and this wire goes to my normally closed pin.

34
00:02:51,000 --> 00:03:06,000
So over here when it is when relay is working, it just make a connection for this to this main AC face

35
00:03:07,000 --> 00:03:08,000
over here.

36
00:03:08,000 --> 00:03:10,000
Let's say this is my ground right now.

37
00:03:10,000 --> 00:03:12,000
This is my face.

38
00:03:12,000 --> 00:03:20,000
And this face just goes through from here to normally closed pin when it is closed.

39
00:03:20,000 --> 00:03:24,000
To this end, this bulb gets powered up.

40
00:03:24,000 --> 00:03:30,000
Okay, so right now I just go to the software part again.

41
00:03:30,000 --> 00:03:34,000
In this case I am just using digital input pin.

42
00:03:35,000 --> 00:03:41,000
I am using a port zero line one pin over here.

43
00:03:41,000 --> 00:03:43,000
Then I use a switch.

44
00:03:43,000 --> 00:03:46,000
And over here I am just using analog output.

45
00:03:46,000 --> 00:03:47,000
Just run it.

46
00:03:47,000 --> 00:03:48,000
Check.

47
00:03:48,000 --> 00:03:55,000
Let's check what happened when I just put my hand over the touch sensor.

48
00:03:56,000 --> 00:03:57,000
As you see.

49
00:03:58,000 --> 00:04:05,000
Turn on, turn off, turn on, turn off, turn on, turn off.

50
00:04:05,000 --> 00:04:12,000
Let's check what happened to it when I just put one, two, three over here.

51
00:04:12,000 --> 00:04:13,000
So just stop it.

52
00:04:16,000 --> 00:04:18,000
I just put one over here.

53
00:04:19,000 --> 00:04:20,000
Apply it.

54
00:04:21,000 --> 00:04:22,000
Okay.

55
00:04:22,000 --> 00:04:23,000
Run it.

56
00:04:23,000 --> 00:04:25,000
Let's check what happened to it.

57
00:04:26,000 --> 00:04:34,000
Initially it is on because threshold value is one over here.

58
00:04:34,000 --> 00:04:36,000
So I need to put two over here.

59
00:04:36,000 --> 00:04:37,000
Let's say.

60
00:04:38,000 --> 00:04:41,000
Or you can just change the threshold value.

61
00:04:41,000 --> 00:04:45,000
In this case let's say I just put threshold value 0.5.

62
00:04:46,000 --> 00:04:47,000
Let's check what happened.

63
00:04:52,000 --> 00:04:54,000
Again I just run it.

64
00:04:57,000 --> 00:05:00,000
Still it is in on condition.

65
00:05:04,000 --> 00:05:05,000
Stop it.

66
00:05:08,000 --> 00:05:11,000
Just put two over here.

67
00:05:14,000 --> 00:05:15,000
Run it

68
00:05:20,000 --> 00:05:25,000
Still it is in on condition.

69
00:05:31,000 --> 00:05:32,000
Let's put.

70
00:05:36,000 --> 00:05:36,000
Five.

71
00:05:36,000 --> 00:05:37,000
Over here.

72
00:05:46,000 --> 00:05:49,000
Now let's check what happened.

73
00:05:51,000 --> 00:05:51,000
Again.

74
00:05:51,000 --> 00:05:52,000
Run it!

75
00:05:55,000 --> 00:05:56,000
Now it is working.

76
00:05:56,000 --> 00:05:59,000
Let's do it for four.

77
00:06:00,000 --> 00:06:02,000
As you see right now, it is working.

78
00:06:06,000 --> 00:06:13,000
When your program is running this signal, acquisition and generation works.

79
00:06:13,000 --> 00:06:23,000
If your program stops, let's say I just stop my program, and then I just put my hand over it.

80
00:06:23,000 --> 00:06:29,000
It is not working because data acquisition and generation are Not happened in this case.

81
00:06:29,000 --> 00:06:33,000
So let's say I just put four over here.

82
00:06:33,000 --> 00:06:34,000
What happened to it?

83
00:06:36,000 --> 00:06:37,000
Run it.

84
00:06:45,000 --> 00:06:50,000
It is continuous on, but some delay is there.

85
00:06:50,000 --> 00:06:54,000
So to control the relay you require a five volt signal.

86
00:06:54,000 --> 00:06:58,000
That's why I put over here five.

87
00:06:59,000 --> 00:07:01,000
So I just put five over here.

88
00:07:01,000 --> 00:07:04,000
In this case it is working as you see.

89
00:07:05,000 --> 00:07:06,000
Okay.

90
00:07:06,000 --> 00:07:15,000
So this is all about today's lecture how to control your AC appliance with touch sensor with the help

91
00:07:15,000 --> 00:07:21,000
of relay and Knee tech card and software as a Matlab.

92
00:07:22,000 --> 00:07:22,000
Thank you

