Hello, friends.
Today I will tell you how to acquire multiple analog signal using a USB DAC card with the help of Python
programming.
In the previous video I just use for single channel.
As you see import DAC max with DAC Mac task as task.
It is set for analog input.
Analog input voltage device one is zero.
The value it is a variable.
It will take the value.
Using task read print value task two and the for hardware part, I just use differential mode.
This one over here, this point.
This pin is my ground.
Then I have analog input.
0I0.
Then I have I for these three pins are used for single channel.
In this case of differential, I just ground I four also and I zero is my input pin for the potentiometer.
As you see over here.
My potentiometer is connected.
Now I just use a touch sensor.
As you see over here.
This is a capacitive touch sensor.
In this module we have signal VCC and ground.
I just ground to the ground.
Connect ground to the ground VCC to the positive pin of plus five volt and signal pin goes to directly
my AI1 analog input one and in the in this case it is also differential mode.
Ground is grounded.
I is connected to the signal pin of touch sensor and I five that is analog input five is grounded.
So this is the hardware connection.
Now in the software part, I just copy this part.
Enter and paste it.
So as you see over here in this case, task analog input over here, PIN number is zero.
And over here I want to just use I1I0 will take values from the potentiometer.
It will take values or it will read values from the potentiometer.
And I one it will read touch sensor value.
Touch sensor I can use in both way it will generate digital signal or analog signal.
In the case of analog signal, it just provide the value that is nearly about five volt and in the not
touching case it will generate a value nearly around ground that is zero volt.
So over here the PIN number is changed, the variable is also changed, name is also changed.
So now the code is ready.
Ctrl s to save now hit on run button.
So let's check what is the value it will read.
So now it is the value from potentiometer and this value is from the touch sensor.
Now I just put my finger on touch sensor and I just move the potentiometer in anticlockwise direction.
Again, I want to just run the code.
Let's check what happened.
As you see, 5.036 something value I got and the value of the potentiometer is 1.5593.
Again, I just change the potentiometer value and again hit on run button.
Now I'm just removing my finger from the potentiometer.
Now it is the 2.70 and the value is for the touch sensor is 0.1042.
So this is how you can read analog multiple analog signals using an I USB 6009 DAC card with the help
of Python programming for continuous reading, you just go for for loop or while loop.
So this is all about today's lecture.
Thank you.