1
00:00:09,000 --> 00:00:10,000
Hello, friends.

2
00:00:10,000 --> 00:00:20,000
Today I will tell you how to acquire multiple analog signal using a USB DAC card with the help of Python

3
00:00:20,000 --> 00:00:21,000
programming.

4
00:00:21,000 --> 00:00:26,000
In the previous video I just use for single channel.

5
00:00:26,000 --> 00:00:32,000
As you see import DAC max with DAC Mac task as task.

6
00:00:32,000 --> 00:00:34,000
It is set for analog input.

7
00:00:35,000 --> 00:00:38,000
Analog input voltage device one is zero.

8
00:00:38,000 --> 00:00:41,000
The value it is a variable.

9
00:00:41,000 --> 00:00:43,000
It will take the value.

10
00:00:43,000 --> 00:00:52,000
Using task read print value task two and the for hardware part, I just use differential mode.

11
00:00:52,000 --> 00:00:56,000
This one over here, this point.

12
00:00:56,000 --> 00:00:58,000
This pin is my ground.

13
00:00:58,000 --> 00:01:01,000
Then I have analog input.

14
00:01:01,000 --> 00:01:02,000
0I0.

15
00:01:02,000 --> 00:01:07,000
Then I have I for these three pins are used for single channel.

16
00:01:07,000 --> 00:01:18,000
In this case of differential, I just ground I four also and I zero is my input pin for the potentiometer.

17
00:01:18,000 --> 00:01:19,000
As you see over here.

18
00:01:19,000 --> 00:01:20,000
My potentiometer is connected.

19
00:01:20,000 --> 00:01:23,000
Now I just use a touch sensor.

20
00:01:23,000 --> 00:01:25,000
As you see over here.

21
00:01:25,000 --> 00:01:27,000
This is a capacitive touch sensor.

22
00:01:27,000 --> 00:01:30,000
In this module we have signal VCC and ground.

23
00:01:30,000 --> 00:01:33,000
I just ground to the ground.

24
00:01:33,000 --> 00:01:41,000
Connect ground to the ground VCC to the positive pin of plus five volt and signal pin goes to directly

25
00:01:41,000 --> 00:01:48,000
my AI1 analog input one and in the in this case it is also differential mode.

26
00:01:48,000 --> 00:01:50,000
Ground is grounded.

27
00:01:50,000 --> 00:01:57,000
I is connected to the signal pin of touch sensor and I five that is analog input five is grounded.

28
00:01:57,000 --> 00:01:59,000
So this is the hardware connection.

29
00:01:59,000 --> 00:02:05,000
Now in the software part, I just copy this part.

30
00:02:06,000 --> 00:02:11,000
Enter and paste it.

31
00:02:11,000 --> 00:02:21,000
So as you see over here in this case, task analog input over here, PIN number is zero.

32
00:02:21,000 --> 00:02:29,000
And over here I want to just use I1I0 will take values from the potentiometer.

33
00:02:29,000 --> 00:02:34,000
It will take values or it will read values from the potentiometer.

34
00:02:34,000 --> 00:02:40,000
And I one it will read touch sensor value.

35
00:02:40,000 --> 00:02:48,000
Touch sensor I can use in both way it will generate digital signal or analog signal.

36
00:02:48,000 --> 00:02:56,000
In the case of analog signal, it just provide the value that is nearly about five volt and in the not

37
00:02:56,000 --> 00:03:01,000
touching case it will generate a value nearly around ground that is zero volt.

38
00:03:01,000 --> 00:03:08,000
So over here the PIN number is changed, the variable is also changed, name is also changed.

39
00:03:08,000 --> 00:03:10,000
So now the code is ready.

40
00:03:10,000 --> 00:03:14,000
Ctrl s to save now hit on run button.

41
00:03:14,000 --> 00:03:18,000
So let's check what is the value it will read.

42
00:03:21,000 --> 00:03:29,000
So now it is the value from potentiometer and this value is from the touch sensor.

43
00:03:29,000 --> 00:03:39,000
Now I just put my finger on touch sensor and I just move the potentiometer in anticlockwise direction.

44
00:03:39,000 --> 00:03:42,000
Again, I want to just run the code.

45
00:03:42,000 --> 00:03:44,000
Let's check what happened.

46
00:03:47,000 --> 00:03:55,000
As you see, 5.036 something value I got and the value of the potentiometer is 1.5593.

47
00:03:56,000 --> 00:04:00,000
Again, I just change the potentiometer value and again hit on run button.

48
00:04:00,000 --> 00:04:03,000
Now I'm just removing my finger from the potentiometer.

49
00:04:03,000 --> 00:04:11,000
Now it is the 2.70 and the value is for the touch sensor is 0.1042.

50
00:04:12,000 --> 00:04:21,000
So this is how you can read analog multiple analog signals using an I USB 6009 DAC card with the help

51
00:04:21,000 --> 00:04:28,000
of Python programming for continuous reading, you just go for for loop or while loop.

52
00:04:28,000 --> 00:04:31,000
So this is all about today's lecture.

53
00:04:31,000 --> 00:04:31,000
Thank you.

