Hello, friends.
In today's lecture, I just show you how to control your AC appliances with the help of relay.
And over here as a controller, I am using any USB 6001 DAC card and software.
I am using Matlab and the input device over here is capacitive touch sensor.
This is nearly same video as in my IR sensor and relay connections in my previous video as we see how
to control the relay using IR sensor.
So now I just change the only.
There is a change in only in the sensor.
So as you see this is my capacitive touch sensor This module have three pins.
One is ground, one is VCC, one is signal that when I just put my hand over it, it will generate a
signal, otherwise it will generate zero.
So I am using digital pin for signal acquisition over here.
This is my VCC.
This one pin goes to over here to this sensor this capacitive touch sensor.
One ground is connected and the blue one is my signal.
That is from the touch sensor.
On the other hand I am using analog output pin over here.
I am using A0 zero to control the relay.
Again, in the case of relay we have three pins, one is VCC, one is ground, one is signal pin that
it requires to control the appliance.
Over here on the output side in the relay we have three pins.
One is normally open.
This is normally open normally closed.
This is phase.
so one.
This is my main AC in India.
We have 220.
So one wire goes to the holder, another wire goes to the face.
Then this is the wire from main AC and I just use another wire.
I just connect with the holder.
Another pin as you see over here.
Another wire to the end.
This end and this wire goes to my normally closed pin.
So over here when it is when relay is working, it just make a connection for this to this main AC face
over here.
Let's say this is my ground right now.
This is my face.
And this face just goes through from here to normally closed pin when it is closed.
To this end, this bulb gets powered up.
Okay, so right now I just go to the software part again.
In this case I am just using digital input pin.
I am using a port zero line one pin over here.
Then I use a switch.
And over here I am just using analog output.
Just run it.
Check.
Let's check what happened when I just put my hand over the touch sensor.
As you see.
Turn on, turn off, turn on, turn off, turn on, turn off.
Let's check what happened to it when I just put one, two, three over here.
So just stop it.
I just put one over here.
Apply it.
Okay.
Run it.
Let's check what happened to it.
Initially it is on because threshold value is one over here.
So I need to put two over here.
Let's say.
Or you can just change the threshold value.
In this case let's say I just put threshold value 0.5.
Let's check what happened.
Again I just run it.
Still it is in on condition.
Stop it.
Just put two over here.
Run it
Still it is in on condition.
Let's put.
Five.
Over here.
Now let's check what happened.
Again.
Run it!
Now it is working.
Let's do it for four.
As you see right now, it is working.
When your program is running this signal, acquisition and generation works.
If your program stops, let's say I just stop my program, and then I just put my hand over it.
It is not working because data acquisition and generation are Not happened in this case.
So let's say I just put four over here.
What happened to it?
Run it.
It is continuous on, but some delay is there.
So to control the relay you require a five volt signal.
That's why I put over here five.
So I just put five over here.
In this case it is working as you see.
Okay.
So this is all about today's lecture how to control your AC appliance with touch sensor with the help
of relay and Knee tech card and software as a Matlab.
Thank you