Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Converting Raw Acceleration values (from MyRio) to G-forces

Solved!
Go to solution
Highlighted

Hi,

I'm measuring multiple variables from a MyRio 1900 (temp, GPS & acceleration values), and am reading the values through FPGA. As I cannot use the MyRio express VI for accelerometer, I am attempting to convert the raw acceleration values from the onboard I/O into their respective G force values for each axis (and in total).

 

I've tried using the differential VIs, but am getting back some crazy values (+/-100!)

 

Are there any other ways to calculate the g-forces from the raw data?

0 Kudos
Message 1 of 9
(179 Views)

Hi,

 

I'm assuming the raw data you are seeing is being displayed as a voltage, would that be correct?

 

If it's not, then you could just do a simple mathematical conversion i.e. m/s into g-force by diving by 9.80665

 

 

- Michael

0 Kudos
Message 2 of 9
(149 Views)

Hi Michael,

 

The raw acceleration values are outputting as displacement, from values between +/- 270 (depending on the MyRio position). 

 

I've tried using two differentiation blocks to convert the displacement values to velocity -> acceleration, but this threw back some extreme values. 

 

I've attached a picture of my code (and the waveform chart of the X-axis displacement). 

 

From looking into the Low Level Read Accelerometer subvi in the MyRio palette, I can see that there is a 'LSB Weight' value that the raw values are multiplied by to produce the scaled values, but I'm unsure what this LSB Weight is. Smiley Frustrated

 

 

0 Kudos
Message 3 of 9
(145 Views)

Values of 100g can be perfectly normal for intense vibrations. Make sure, that you divide with the correct time duration, if you create the derivative by differences. If you are interested in the frequency domain of the acceleration, you can make a "live" FFT and multiple the magnitude two times with "f" (the frequency). What will happen, is that your displacement spectrum, will be multiplied two times with a ramp (1*f) and this will be equal to the acceleration spectrum.



0 Kudos
Message 4 of 9
(141 Views)

I've just been using the Time Domain Derivative block (found in Mathematics -> Integration & Differentiation), but that does not give me the option to specify duration. The '100g' vibrations occur when I simply pick up and rotate the MyRio, so I'm skeptical that it is a true reading. 

 

As the ultimate goal is to provide a log of vibration, with timestamps for values, am I right in thinking that remaining in the time domain would be easier than using the frequency domain?

 

 

0 Kudos
Message 5 of 9
(136 Views)

Actually, since you are already provided with acceleration values, there is no need to differentiate anything (an yes, you can stay in the time domain). As mdoherty already mentioned, if the acceleration is giving you the m/s^2 value, one needs to divide by 9.81.

You should receive x=0g, y=0g and z=0g or 1g when you place the device on a table. Some accelerometers come with an offset in the z-direction, in order to compensate the weight of gravity.

Also try to contact NI directly; the usually reply swiftly and give helpful hints.



0 Kudos
Message 6 of 9
(133 Views)

Im not entirely convinced that the values are acceleration values, as they never exceed 250 even with excessive vibrations. (250 is the same value that an axis will output even when stationary).

 

When placed on a table, the outputs will be 0 (+/- 3) on 2 axis, and (+/-) 250 on the 3rd axis.

 

I've contacted NI, just awaiting a reply now Smiley Happy

0 Kudos
Message 7 of 9
(120 Views)

Okay.

by the way, I noticed, that your indicator number format is blue (integer) instead of orange (double). And 250 is close to 256 which is the range of an unsigned 8-bit integer. Just saying...



0 Kudos
Message 8 of 9
(117 Views)
Solution
Accepted by topic author HTaylor95
04-12-2019 06:07 AM

I did some digging around in the MyRio 1900 spec and found the exact value for the LSB Smiley Happy

 

Thanks for the help with this though guys, much appreciated 

0 Kudos
Message 9 of 9
(75 Views)