12-14-2023 12:29 AM
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
12-14-2023 12:33 AM
Included is the VI for the program.
12-14-2023 01:29 AM
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?
12-14-2023 09:49 AM - edited 12-14-2023 09:52 AM
@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.
12-18-2023 02:29 AM
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.
12-18-2023 02:35 AM
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!