LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

how to enable 2 or more analog input pin in arduino uno labview simultaneously for voltage analysis?

Solved!
Go to solution

Hi everyone,

i am new to labview and using arduino uno board for measuring microwave analysis in my project. i want to measure the refflection coefficient by dividing two analog input received to arduino (Vref and Vin) to obtain so. problems come where i just can analyze only one analog input pin only. please, kindly helped to figure it out.i've try the others solution where i create two while loops for different analog pin. u can refer to my circuit in the attachment below.i really2 appreciate ur help, thank you.=)

http://forums.ni.com/ni/attachments/ni/170/715850/2/front%20panel.PNG     http://forums.ni.com/ni/attachments/ni/170/715850/3/block%20diagram.PNG

Message 1 of 15
(20,180 Views)

Hi,

You mentionned "i've try the others solution where i create two while loops for different analog pin"

What was the first solution?

What is sure, is that you should avoid tunnel between two while loop. (i.e, the stop button of second loop shall be controlled by a local for example).

Also the calculation (reflection coefficient, return loss) shall be include in the while if you want the value to be updated continuously.

Did you try something simple like this, with only one loop? :

snap.png

Message 2 of 15
(9,765 Views)

hi mknix,

thanx a lot for helping me..i did not realize that we just need to connect the analog read in series only for analysing more than 1 voltage input.btw, i will try the circuit that u suggested with the real input voltage later..thanx again for helping me buddy..=)

0 Kudos
Message 3 of 15
(9,765 Views)

The Arduino Uno only has one ADC.  Hence you can not read two analog signals simultaneously.  It takes about 100 micro seconds to do a conversion.  For a discussion on this topic see:

<http://arduino.cc/forum/index.php?action=printpage;topic=77715.0>

hrh1818

0 Kudos
Message 4 of 15
(9,765 Views)

For simultaneous sampling of multple analog inputs you could use an IC with a SPI interface such as the following.

<http://www.linear.com/product/LTC2351-12>

hrh1818

0 Kudos
Message 5 of 15
(9,765 Views)

interesting readings, thanks a lot hrh1818.

0 Kudos
Message 6 of 15
(9,765 Views)

hello guys,

         i think i had this same type of problem but instant of analog pins and i would like to use digital pins, can anyone plz give me some example block diagrams which   IT SHOULD USES MORE THAN ONE DIGITAL PINS which it may input or output

0 Kudos
Message 7 of 15
(9,765 Views)
Solution
Accepted by topic author syedanas

MKnix gave one solution.  The other would be to ues a single analog read port VI.  The analog read port VI reads all the analog pins as fast as it can (as hrh1818 mentioned there will be about 100 uS between reads due to the muxed ADC).  If you use two analog read pin vis in series in a loop (the other 'good' way to read two pins) you will have to wait for data to go from the arduino back to LV, from LV back to the arduino between the analog reads.  This latentcy will be in the 5 mS range so if you want to compare the two AIs at 'the same time' the read port options is much better.

-Sam K

LIFA Developer

Message 8 of 15
(9,765 Views)

Thanks a lot Sammy_K, Indeed, analog read port is much better.

0 Kudos
Message 9 of 15
(9,765 Views)

Happy to help.

-Sam K

LIFA Developer

0 Kudos
Message 10 of 15
(9,765 Views)