LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT the signal which read from analog pin through Arduino

Solved!
Go to solution

@holucbme wrote:

Hi, RTSLVU

I use Labview interface for Arduino (LIFA). Can I fix the code in the firmware, bro?

Also, Can you show me the problem above? (the FFT was not right at 100Hz)


LIFA? That has long since been replace by LYNX https://www.labviewmakerhub.com/doku.php?id=libraries:linx:start

 

LINX has a VI for the Analog Reference LINX---->Peripherals---->Analog---->Set Reference Voltage

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 11 of 36
(2,581 Views)

Thanks RavensFan,

 

I'm not sure the Arduino is acquireing at 1 kHz but the signal which I generated is pretty accurate (I use Oscilloscope to observe the waveform and count the period to realize the frequency.

--------------------------------

Connect your waveform chart to the waveform wire after you build in the dT instead of the array of doubles.  It will show the timing info chart rather than just integers on the X axis.

 

I dont quite understand, can you show the detail. Thnk you!

0 Kudos
Message 12 of 36
(2,573 Views)

RTSLVU, Thank so much. I will try it 

0 Kudos
Message 13 of 36
(2,572 Views)

@holucbme wrote:

Thanks RavensFan,

 

I'm not sure the Arduino is acquireing at 1 kHz but the signal which I generated is pretty accurate (I use Oscilloscope to observe the waveform and count the period to realize the frequency.

--------------------------------

Connect your waveform chart to the waveform wire after you build in the dT instead of the array of doubles.  It will show the timing info chart rather than just integers on the X axis.

 

I dont quite understand, can you show the detail. Thnk you!


Post the Arduino code.  It's possible that it is acquiring data at a slower rate than you think.  Then when you hard code in the .001 and it makes LabVIEW think it was acquired faster than it actually was.

 

Take way the orange wire leading to the chart's terminal.  Connect the terminal to the brown wire.

0 Kudos
Message 14 of 36
(2,557 Views)

Take way the orange wire leading to the chart's terminal.  Connect the terminal to the brown wire.

--------------------

 

That will change the way I want to display the signal. What I pay attention here is it's SPECTRUM.

You said the acquiring rate is lower than I set 1KHz, so How can I know exactly the actual acquiring rate and what I have to do next?

0 Kudos
Message 15 of 36
(2,526 Views)

anyway, thank everyone for helping me enthusiastically

0 Kudos
Message 16 of 36
(2,527 Views)

@holucbme wrote:

Take way the orange wire leading to the chart's terminal.  Connect the terminal to the brown wire.

--------------------

 

That will change the way I want to display the signal. What I pay attention here is it's SPECTRUM.

You said the acquiring rate is lower than I set 1KHz, so How can I know exactly the actual acquiring rate and what I have to do next?



NOT the "magnitude" terminal.  The "WAVEFORM CHART" terminal.

 

It will display the raw waveform in the chart with the timing information you built into the waveform.  Not the raw array which has no timing and will thus assume a dt of 1.

 

You are thinking of the magnitude terminal which is on the Pink wire.  That is not what I'm talking about.

 

Connect the waveform chart to the brown wire, you'll have a more meaningful display of the raw waveform.  It will not affect your FFT one bit.

0 Kudos
Message 17 of 36
(2,518 Views)

I got you mean now. But, how about the FFT? Can you give me a suggestion to get the spectrum exactly? help me one more time. Thanks so much, Knight.

0 Kudos
Message 18 of 36
(2,485 Views)

I can't give you any suggestions beyond what I've already said.  I asked to see the Arudino code, but you haven't posted it.  I suspect that the code acquiring the data isn't operating correctly and not acquiring at the rate you think it is.  Getting an accurate picture of the waveform in the waveform chart is one piece of figuring out what is actually going on.

0 Kudos
Message 19 of 36
(2,467 Views)

Arduino code??? You mean the LIFA_Base? I only process the signal in Labview, sir. Where can I find it in the firmware of arduino?

0 Kudos
Message 20 of 36
(2,449 Views)