1
00:00:07,000 --> 00:00:08,000
Hello, friends.

2
00:00:08,000 --> 00:00:19,000
In today's lecture, we just show you how to control a AC appliance using infrared sensor.

3
00:00:19,000 --> 00:00:24,000
As you see over here, I have my infrared sensor.

4
00:00:24,000 --> 00:00:32,000
In my previous videos, I already told you that in this module we have three pins, one is VCC, one

5
00:00:32,000 --> 00:00:35,000
is ground and one is output signal.

6
00:00:35,000 --> 00:00:39,000
That is the signal of your IR sensor.

7
00:00:39,000 --> 00:00:48,000
Right now in this particular case or in this particular lecture, I just show you how to acquire a digital

8
00:00:48,000 --> 00:00:51,000
signal and using that signal.

9
00:00:51,000 --> 00:00:57,000
And based on that signal I just control a AC appliance through analog output.

10
00:00:58,000 --> 00:00:58,000
Okay.

11
00:00:59,000 --> 00:01:02,000
As you see over here, there is a relay.

12
00:01:02,000 --> 00:01:07,000
In this relay again relay module we have three.

13
00:01:07,000 --> 00:01:09,000
On the input side we have three pins.

14
00:01:09,000 --> 00:01:15,000
One is input signal that is taken from the DAC card.

15
00:01:16,000 --> 00:01:20,000
Another one is ground and another one is VCC.

16
00:01:20,000 --> 00:01:24,000
Right now on this DAC card I have only one VCC.

17
00:01:24,000 --> 00:01:27,000
That's why I just take it on the breadboard.

18
00:01:27,000 --> 00:01:31,000
And from here I just take two VCs.

19
00:01:31,000 --> 00:01:34,000
One is for the relay and one is for the IR sensor.

20
00:01:34,000 --> 00:01:38,000
As you see first check the working of IR sensor.

21
00:01:38,000 --> 00:01:40,000
Right now it is properly working.

22
00:01:40,000 --> 00:01:48,000
As you see light goes on off on off on the sensor and over relay.

23
00:01:49,000 --> 00:01:53,000
In my previous video, I already told you how to control this relay.

24
00:01:53,000 --> 00:02:01,000
Connections of the relay or the bulb holder are nearly same.

25
00:02:01,000 --> 00:02:07,000
Right now I just go to my software part.

26
00:02:07,000 --> 00:02:12,000
Just go to the symlink over here.

27
00:02:13,000 --> 00:02:22,000
You just drag analog output from data acquisition toolbox.

28
00:02:22,000 --> 00:02:35,000
In this I just need to select a zero because on the DAC card I already connect a zero to relay input

29
00:02:35,000 --> 00:02:42,000
pin analog output pin A is zero zero.

30
00:02:42,000 --> 00:02:48,000
Just generate a signal for the relay based on this IR sensor.

31
00:02:48,000 --> 00:02:52,000
So over here AA0 is selected.

32
00:02:53,000 --> 00:02:59,000
Now I just drag and drop digital input signal.

33
00:03:02,000 --> 00:03:05,000
Just open it right now.

34
00:03:05,000 --> 00:03:14,000
In this particular case, the signal from the air sensor goes to a one pin.

35
00:03:16,000 --> 00:03:18,000
Not AD1 pin.

36
00:03:19,000 --> 00:03:21,000
Right now I just unselect all pin.

37
00:03:21,000 --> 00:03:26,000
And this is my pin that I use to connect over here.

38
00:03:27,000 --> 00:03:30,000
This is port zero line one.

39
00:03:30,000 --> 00:03:31,000
Okay.

40
00:03:31,000 --> 00:03:33,000
So just apply it.

41
00:03:35,000 --> 00:03:40,000
As we know over here the signal from here is digital signal.

42
00:03:40,000 --> 00:03:48,000
And over here I again require a signal that is analog signal.

43
00:03:48,000 --> 00:03:49,000
This is analog output.

44
00:03:49,000 --> 00:03:51,000
This is digital input.

45
00:03:51,000 --> 00:03:51,000
Okay.

46
00:03:51,000 --> 00:03:55,000
As you see over here this is digital input signal.

47
00:03:55,000 --> 00:03:57,000
This is analog output signal.

48
00:03:57,000 --> 00:04:01,000
Right now I just select a switch.

49
00:04:06,000 --> 00:04:10,000
Connect this switch in between.

50
00:04:20,000 --> 00:04:21,000
Connect this.

51
00:04:23,000 --> 00:04:24,000
Just open it.

52
00:04:24,000 --> 00:04:27,000
It is demanding threshold value.

53
00:04:27,000 --> 00:04:31,000
Let's say when the value above zero.

54
00:04:31,000 --> 00:04:34,000
It just generate another value.

55
00:04:34,000 --> 00:04:38,000
So right now I just put some threshold value.

56
00:04:38,000 --> 00:04:42,000
Let's say one over here apply okay.

57
00:04:43,000 --> 00:04:45,000
Just use some constant.

58
00:04:50,000 --> 00:04:53,000
I need to put some constant over here.

59
00:04:58,000 --> 00:05:02,000
Just Select it and drag it over here.

60
00:05:02,000 --> 00:05:04,000
The value is one, not one.

61
00:05:04,000 --> 00:05:05,000
It is zero.

62
00:05:06,000 --> 00:05:08,000
Just connect this.

63
00:05:08,000 --> 00:05:10,000
Just copy this constant.

64
00:05:11,000 --> 00:05:16,000
And for the relay we need a five volt signal.

65
00:05:16,000 --> 00:05:18,000
So I just put value five over here.

66
00:05:19,000 --> 00:05:30,000
You just change it I just show you in my this video when I just put 123, four what happened to the

67
00:05:30,000 --> 00:05:30,000
relay.

68
00:05:32,000 --> 00:05:34,000
Just run it.

69
00:05:34,000 --> 00:05:36,000
Let's check what happened.

70
00:05:36,000 --> 00:05:43,000
Just turn on the power of relay of the switch.

71
00:05:43,000 --> 00:05:47,000
Right now we just connect this to the VCC.

72
00:05:47,000 --> 00:05:55,000
Right now it is in on condition when I just put my hand as you see it automatically turn off.

73
00:05:56,000 --> 00:05:59,000
Turn on turn off.

74
00:05:59,000 --> 00:06:00,000
Turn on.

75
00:06:01,000 --> 00:06:01,000
Turn off.

76
00:06:01,000 --> 00:06:07,000
I am not doing any manual switching over here.

77
00:06:07,000 --> 00:06:10,000
It is directly based on senses.

78
00:06:10,000 --> 00:06:12,000
That is from air sensor.

79
00:06:12,000 --> 00:06:19,000
I just put my hand or in front of infrared sensor and it will detect a signal.

80
00:06:19,000 --> 00:06:27,000
Generate this deck card grabs the signal of this air sensor and generate a signal for this relay.

81
00:06:27,000 --> 00:06:34,000
And based on that signal, my bulb goes on and off, as you see.

82
00:06:35,000 --> 00:06:47,000
So this is how you can create your own application using deck 6001 with the help of Matlab.

83
00:06:47,000 --> 00:06:49,000
This is all about today's lecture.

84
00:06:50,000 --> 00:06:50,000
Thank you

