01-31-2021 12:59 AM
Hello everyone.
So I'm trying to implement an acquisiton system with Arduino and LabVIEW. I've design an interface were you can introduce the acquisition speed and the number of samples, and with a button display de data on a graph and also save the data in a spreadsheet. I'm new to this topic of signal acquisition.
My first aproach was to use LINX, but i couldn't make it work, So i decided to use LIFA(I know it was been discontinued, so i use Arduino 1.8.5 to avoid problems with the Frimware), since LIFA has Analog and Continuous sampling VI's.
For testing purpouses i'm using (In real life) and LM555 with a low pass filter. The circuit produces a 1HZ (approximately) square signal.(The circuit example below,).
So everything it's working BUT, when im acquiring the signal, the display, the frequency doesn't match with the acquiring signal im testing. Also i have some noise when im not acquiring anything. I tried to change the frequency of the 555 to something higher and it doesnt seem to resolve the problem.
Noise
Not the signal i want
My questions are: What i am doing wrong?, Is there something really obvious that im passing?, Is Arduino the problem?, Should i use VISA instead?. I also tested in another arduino nano that i have, and still the problem is there.
I did 2 different VI's, one using the continuous sampling function, and the other one using the finite analog sample(this ones is the one that has better results in my opinion).
I've alredy browse on all the NI comunity and i couldnt find anything similar my problem, also i've seen the examples that LIFA has, and also in those i still had the problem with the frequency.
And my final note, Any suggestion or advice is helpfull. My native language is Spanish, so i apologize if there´s something misspelled.
Kudos to everyone.
02-06-2021 11:18 PM
Hi everyone! I need some help
I am trying to read, using a Arduino Mega and labview, a triphasic signal of voltage with three ZMPT101B modules.
I thought I could use the following module of LIFA:
but it turned out that the read signal is kind of weird. The signal's phase is around 60Hz. So accordingly Nyquist theorem the sample frequency should be more than 2*60Hz.
I set it in that way, like 880Hz of acquisition samples and 40 samples, but it is not working.
Has anyone used this LIFA module to read an analog signal properly?
If I am not considering something, please tell me 🙂
Thanks for your help
02-06-2021 11:27 PM
Hey bro!
Actually I am having exactly the same problem!
Question, are you considering the Nyquist Theorem?
Let me know if you resolve this problem
02-07-2021 01:44 PM
@navarro08 wrote:
Question, are you considering the Nyquist Theorem?
I believe you are on the right track here.
My experience with LIFA and LINX I was only able to get a loop rates in the 200 hertz range.
200 samples per second is a very slow DAQ.
02-07-2021 10:48 PM
Hi bro!
Ok, this is the vi I am using!
I don't know what is wrong.It seems to be easy but the signal I get is weird.
02-07-2021 10:53 PM
I have just attached another simple example,basically is the same.
Question, how many bytes an Arduino Mega sends per package??
It is an input of the beginning module
02-08-2021 12:02 AM - edited 02-08-2021 12:04 AM
Thanks
02-08-2021 09:17 AM
Thank you for responding both of you
First of all, yeah im considering the Nyquist Theorem.
I manage to solve the problem by disconnecting and reconnecting the circuit in real life, make sure that everything is connected to ground. The problem wasn't arduino, was the circuit.
Also I raised the acquired frequency to 50Hz (48.0898347Hz) and so with it, sampling rate too (to at least 500 Hz).
it works!!
After the signal pass throught the filter, it looks like this.
It seems like the problem is solved.
BUT if you want to get more rigorous...
According to the next formula.
(Number of samples/Sampling Rate)*Acquire Frequency
You should get the Number of waves you should see on the graph
In the last image, according to the formula, you could see 9.6 waves, and that's correct.
But if we change the frequency...
With the next one you should see 4.8, but it seems to be like 5.5 maybe, sometimes satisfies with the formula and sometimes not. Also the frequency changes a bit.
I am satisfied with the result, but if anyone knows why that happens, let me know.
02-08-2021 09:24 AM
So I looked your VI, but you dont use the 'Init' and the 'Close' comunication of the LIFA package,also you have to use a while loop to get continous data. I recommend you to check the examples. They can help you a lot. Also check this VI i did here. Cheers!!
02-08-2021 03:54 PM
Bro, I applied that formula and got the double of waves I was expecting :c sad!