LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph Readings with Arduino (Analog)

I am currently trying to graph the voltage of a waveform on LabVIEW using a waveform generator and an Arduino Uno, however as the waveform is generated and displayed the graph does not properly relay what is coming out of the waveform generator. The images attached is the program I have created for my application. I am currently trying to graph a range of 0-10 Volts of a sin wave but the graph labeled Voltage measurement is all that I am able to read through the Arduino into LabVIEW. If there is any advice for cleaning up the noise or adjusting my graphs that would be greatly appreciated! Thank you

Download All
0 Kudos
Message 1 of 6
(467 Views)

Included is the VI for the program.

0 Kudos
Message 2 of 6
(465 Views)

Hi klumsy,

 


@Klumsy wrote:

the graph does not properly relay what is coming out of the waveform generator.


What exactly is "coming out of the FGEN"?

Does your Arduino even support a signal range of ±10V?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(427 Views)

@Klumsy wrote:

I am currently trying to graph the voltage of a waveform 


Oh, you are using the Spectral Measurements FFT-(Peak) function. 

 

An Arduino is nowhere near fast enough DAQ for spectral analysis. See Nyquist–Shannon Theorem

 

What is the "loop rate" you are getting? I think the best I have seen for an Arduino with LYNX is near 200 loops per second.

 

That means you are sampling at approximately 200Hz, probably less. That is going to severely limit the frequency range you can analyze.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 6
(398 Views)

Apologies, I don't understand what you're referencing when you say "coming out of FGEN". I realized after I posted that the Arduino only supports up to 5V and I adjusted it to such and still am unable to read the waveform properly. I am working on creating a non inverting op amp level shifter to adjust the negative readings to a 0-5V reading. The waveform will go through the level shift before the output from the waveform generator is sent into the Arduino. Ideally the graph would be a sine wave that is bound between 0-5V from a ±10V waveform generator. 

 

A simulated image of the level shifter I created is attached as stated above. Thank you for the question and another thank you from the future for your help.

 

Download All
0 Kudos
Message 5 of 6
(341 Views)

You are absolutely right now that I've done a little more research regarding the loop rate/DAQ of an Arduino for spectral analysis and what I need for this project.

 

I believe I was getting around a 100Hz with the Arduino Uno I was using for. I have looked into alternatives like the NI CompactDAQ Chassis, DSP Boards, and possibly even a Raspberry Pi. I had originally decided to use Arduino because of my familiarity with it. Do you have any preference or suggestions for what I should use for spectral analysis, specific to this project? Thank you for your insight on my project and the help!

0 Kudos
Message 6 of 6
(339 Views)