Hello, friends.
In today's lecture, we just show you how to control a AC appliance using infrared sensor.
As you see over here, I have my infrared sensor.
In my previous videos, I already told you that in this module we have three pins, one is VCC, one
is ground and one is output signal.
That is the signal of your IR sensor.
Right now in this particular case or in this particular lecture, I just show you how to acquire a digital
signal and using that signal.
And based on that signal I just control a AC appliance through analog output.
Okay.
As you see over here, there is a relay.
In this relay again relay module we have three.
On the input side we have three pins.
One is input signal that is taken from the DAC card.
Another one is ground and another one is VCC.
Right now on this DAC card I have only one VCC.
That's why I just take it on the breadboard.
And from here I just take two VCs.
One is for the relay and one is for the IR sensor.
As you see first check the working of IR sensor.
Right now it is properly working.
As you see light goes on off on off on the sensor and over relay.
In my previous video, I already told you how to control this relay.
Connections of the relay or the bulb holder are nearly same.
Right now I just go to my software part.
Just go to the symlink over here.
You just drag analog output from data acquisition toolbox.
In this I just need to select a zero because on the DAC card I already connect a zero to relay input
pin analog output pin A is zero zero.
Just generate a signal for the relay based on this IR sensor.
So over here AA0 is selected.
Now I just drag and drop digital input signal.
Just open it right now.
In this particular case, the signal from the air sensor goes to a one pin.
Not AD1 pin.
Right now I just unselect all pin.
And this is my pin that I use to connect over here.
This is port zero line one.
Okay.
So just apply it.
As we know over here the signal from here is digital signal.
And over here I again require a signal that is analog signal.
This is analog output.
This is digital input.
Okay.
As you see over here this is digital input signal.
This is analog output signal.
Right now I just select a switch.
Connect this switch in between.
Connect this.
Just open it.
It is demanding threshold value.
Let's say when the value above zero.
It just generate another value.
So right now I just put some threshold value.
Let's say one over here apply okay.
Just use some constant.
I need to put some constant over here.
Just Select it and drag it over here.
The value is one, not one.
It is zero.
Just connect this.
Just copy this constant.
And for the relay we need a five volt signal.
So I just put value five over here.
You just change it I just show you in my this video when I just put 123, four what happened to the
relay.
Just run it.
Let's check what happened.
Just turn on the power of relay of the switch.
Right now we just connect this to the VCC.
Right now it is in on condition when I just put my hand as you see it automatically turn off.
Turn on turn off.
Turn on.
Turn off.
I am not doing any manual switching over here.
It is directly based on senses.
That is from air sensor.
I just put my hand or in front of infrared sensor and it will detect a signal.
Generate this deck card grabs the signal of this air sensor and generate a signal for this relay.
And based on that signal, my bulb goes on and off, as you see.
So this is how you can create your own application using deck 6001 with the help of Matlab.
This is all about today's lecture.
Thank you