- Community Home
- :
- Discussion Forums
- :
- Most Active Hardware Boards
- :
- Real-Time Measurement and Control
- :
- Converting Raw Acceleration values (from MyRio) to G-forces

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

04-02-2019 01:27 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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?

Solved! Go to Solution.

04-03-2019 04:25 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

04-03-2019 05:57 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

04-03-2019 06:01 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

04-03-2019 06:36 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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?

04-03-2019 06:48 AM - edited 04-03-2019 06:48 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

04-04-2019 11:59 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

04-04-2019 01:10 PM - edited 04-04-2019 01:11 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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...

Solution

Accepted by topic author HTaylor95

04-12-2019 06:07 AM

04-12-2019 08:06 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

Thanks for the help with this though guys, much appreciated