LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Signal Processing accelerometer ADXL345 using FFT


@sasa_one wrote:

you mean like this ?, i didnt find example FFT ptbypt


You really (really!!!) need to start with a few basic LabVIEW tutorials!

 

See the array diagram constant to the left of the shift register? Just grab the index terminal and resize down to show two indices. now it is a 2D array! Magic!

 

altenbach_0-1687123788508.png

There is no example for the ptbypt function, just read the help! All ptbypt functions take a single scalar as input and operate on the last N seen values as wired.

0 Kudos
Message 11 of 18
(1,157 Views)

Try doing a Web search for "ADLX345 and LabVIEW".  You will learn that the ADXL345 is a triaxial accelerometer on a tiny chip that communicates with the "outside world" using SPI or I²C protocol.  LabVIEW does not have drivers for these Protocols.  The Web will show you some ways you can connect this chip to an Arduino, and if you have the Arduino software for LabVIEW installed (which is a whole other subject that has little directly to do with learning LabVIEW), you will be able to use the Arduino-specific sub-VIs to communicate with the Chip (using SPI, so you should know how to use SPI).

 

I believe that the ADXL326, combined with an NI USB-600x multifunction DAQ device, would be a better way to "learn" how to acquire analog data (which the ADXL326 outputs, 3 channels for X, Y, and Z, with output from 0 to 3.3 V, with 1.65 V meaning "0" and higher and lower voltages representing positive and negative accelerations).  I hope you'll understand what you need to do when you connect this chip up, lay it face up and not moving, and get X, Y, and Z voltages that are not precisely 1.65 V.  Two will be close to that value, but one will be "way off".

 

I was working with some BME Masters students who were attempting to make a sensor for anesthesiologists using a similar triaxial chip who could not explain the readings that "should have meant" 0g, but instead were not zero.  Turns out they'd never done "practical engineering", and were definitely not ready for "real jobs".  I don't believe this project went anywhere ...  Can you guess what they didn't think about?

 

Bob Schor

0 Kudos
Message 12 of 18
(1,134 Views)

Depending on the MEMS you use , if you use one with internal oscillator and digital output , and the information you want to optain (frequency , magnitude .. phase?)

here is a link to a paper that show up  challanges due to not stable (internal ) sample frequency and sample time jitter. 

.. even if the MEMS has a good internal timig (or a good external one) , even the software provided by the manufactors can lead into missing samples..

https://cfmetrologie.edpsciences.org/articles/metrology/pdf/2019/01/metrology_cim2019_22003.pdf

 

 

Bob, I'm not going to spoiler 😄

(But my impression is, that the majority of kids missed the stone and sticks part and never build up the mindset for a physical understanding ...)

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 13 of 18
(1,126 Views)

Hi, Sir Henrik Thank you for answering my question, I think i've done with my problem. FFT looks better than before. I reprogrammed my Labview and IDE. In my IDE I use a 256 buffer to cache data within 5ms. The data is then processed into FFT.

sasa_one_0-1687392113427.jpeg


and a big thanks to Sir Alten, and Sir Bob Schor for helping me answer my questions. 
and this post helped me full too https://forums.ni.com/t5/LabVIEW/Arduino-analog-read-pin-to-frequency/td-p/2055606

0 Kudos
Message 14 of 18
(1,103 Views)

Hi Sasa_one, 

 

Can you please post the file of the VI, it would be very helpful 

0 Kudos
Message 15 of 18
(1,049 Views)

Hi.

I need some guidance, i am trying to develop a vi with the intention to generate a random frequency from 20- 2 Khz, with the purpose of to build a vibration home made system. I have to accelerometers with 10mV/g.

 

do you know how can i be oriented in that matter. 

 

thanks

0 Kudos
Message 16 of 18
(1,039 Views)

i am also getting Error like not error but not getting live waveforms for X,Y & Z. i want to do continuous waveform but what is get is "If i entered 5 samples for FFT then it will stay in for loop for 5 times then it will execute whole circuit 1 time then again 5 times in for loop & 1 time & go on. i want to do continuous waveform by applying Samples for X,Y & Z.

 

i am attaching my labview file for the reference .really loking for some positive response . thank you

0 Kudos
Message 17 of 18
(671 Views)

Hi Dev,

 


@dev0010 wrote:

i am also getting Error like not error


So what do you get: "error" or "no error"?

 


@dev0010 wrote:

i am attaching my labview file for the reference .really loking for some positive response .


Please downconvert your VI when you use a (very) recent LabVIEW version (File->Save for previous)!

The usual recommendation is "LV2021 or earlier", I prefer LV2019.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 18
(660 Views)