LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino analog read pin to frequency

Solved!
Go to solution

Hey Y3G,

 

Your questions are getting harder Smiley Happy!

 

How do you know the input signal is at 200Hz? Do you know the accuracy of the Arduino's internal oscillator?

 

The FFT should be using all of the samples provided.

 

Feeding a simulated 200Hz signal into the FFT provides great results:

 

Front panel.png

 

Code.png

 

Regards,

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 31 of 33
(2,012 Views)

Ok,

Hope I don't being annoying on this...

So it is not the FFT for sure, but what does it say about the ARDUINO.vi?

Why does the Arduino not indicate the righ frequency input?

Is it because of the limited bit-resolution (10 bits)? The internal clock freq is some MHz...

 

Have you thought about ARDUINO.vi to sample faster than 5 kHz?

Any Soundcard can sample at least 44.1 kHz.  

 

Thanks,

Y3G

0 Kudos
Message 32 of 33
(1,991 Views)

I'm not sure about the arduino firmware at all.

 

All the Arduino toolkit does is send VISA commands to an Arduino. The firmware that you load onto it provides the communications API for those commands. I don't know why they chose 5kS/s acquisition rate but it's probably related to CPU and Serial bus limitations or even device compatibility.

 

It's pretty easy to spin your own Arduino firmware, and code it to respond to serial commands if you want more control of things.

 

At any rate you'll probably get more helpful responses if you post to the Arduino Community group here: https://decibel.ni.com/content/groups/labview-interface-for-arduino

 

Have a nice day!

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 33 of 33
(1,963 Views)