LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to separate,displace,integrate and aplicate the FFT of the data obtained from the mpu6050 (Arduino). Using LINX

Hello Everyone!!!!, I'm making a project to measure vibrations of a system with Arduino + the accelerometer MPU6050 + LabVIEW + the library LINX.

 

I new using Labview, but I achieve to do this program with a tutorial :

 

CAPTURE.png

If I Run the program give me this output: 

capture7.png

All seems to be excellent, but I want to improve several things : 

1) Separate the different accelerations: I want that the acceleration of Z to be in one graph, the acceleration of Y in other, and the acceleration of X in other. How can I do this? 

 

2) Elimite the offset of the gravity: Once that the graph of Z will be alone I want to move the graph to 0 since I will be using the sensor in a unique position. 

 

3) Integrate the accelerations: I was thinking that to do this I can use the function "Time domain math" to obtain the velocity but I was reading about this, and on some websites it says that do this process can result in some accumulative errors like drift, but I see too that this can be fixable, it is true? , Can someone give me an idea of how do this?  or the unique thing that I need to do is use the function "Time domain math" ? 

 

4) Use the FFT to every graph: Can give some help with this? , maybe some tutorial to do it? 

 

0 Kudos
Message 1 of 7
(5,680 Views)

I fixed the first problem!!!, now my program look like this:

 

capture9.pngcapture 10.png

But now how you can see I need to solved the others problems :s, and all the graphs seems to have some offset that I need to fix. 

0 Kudos
Message 2 of 7
(5,616 Views)

I solved the problem of the offset!!! Now my program is this: 

capture14.png

Now I have some problems with the scale of my graphs and with the integration :s, I try to do it, as you can see in the photo above I think that the graph give me a strange result, but the scale don't let me see so well :s 

 

 

capture15.png

I would appreciate if someone can give me a hand. 

0 Kudos
Message 3 of 7
(5,581 Views)

It looks like you are still reading the raw I16 binary values from the arduino. You will have to find out the bit resolution of the acutal data (probably 10 bit) and scale that by the range your chip is set to. On the home page they list it as ±2g, ±4g, ±8g, and ±16g. So assuming 10 bit resolution and ±4g, you would need to scale your raw data by a factor of (2*4)/(2^10-1) = 8/1023.

Also are you sure that sensors offset is constant?
I would double check to see if there is any drift. Also it seems (during my brief search) that this device needs a 10-40 second calibration period at startup. Make sure you account for whatever that includes.

0 Kudos
Message 4 of 7
(5,543 Views)

@ConnerP
You will have to find out the bit resolution of the acutal data (probably 10 bit) and scale that by the range your chip is set to. On the home page they list it as ±2g, ±4g, ±8g, and ±16g. 

Where I can found this information? The resolution and the range that is using my chip?

 


Also are you sure that sensors offset is constant?
I would double check to see if there is any drift. Also it seems (during my brief search) that this device needs a 10-40 second calibration period at startup. Make sure you account for whatever that includes.

Well if I'm honest, I have a little problem later of a while in the 3 graphs, I don't really know why is the reason maybe the offset it's not constant? 😧 

This is what I do to know the offset of every graph : 

 

capture 17.png

And in that way with the indicators I can know what's the mean, and later subtract it or add them to my graphs, but this seems don't work for a while :s capture 16.png
 
As you can see, in the graph of X I do this process, but after a while the offset appear again, What I can do? :s 

0 Kudos
Message 5 of 7
(5,529 Views)

I'm no expert with arduino or accelerometers but they seem to have an extensive (read: long) example of the main arduino page for the device. Lines 270-281 seems to be about setting that directly in a bit register somehow. That should get you started.

As for the step in the baseline after an event, I'm not really sure. Maybe you could get the baseline before and after your event and scale the event linearly? Someone with more experience will have to chime in on that one.

0 Kudos
Message 6 of 7
(5,523 Views)

Hello Sr I am got the same Issue , (more or less), did you finally got the solution, may you please share the labview code...i got issues with the FFT

Thanks in advance

Message 7 of 7
(3,625 Views)