12-13-2015 11:55 AM
How can i get the displacment or anglur displacment graphs plotted with real time in seconds ?
Thank you in Advance
12-13-2015 11:58 AM
How can i get the displacment or anglur displacment graphs plotted with real time in seconds ?
Thank you in Advance
11-13-2016 01:45 PM
Thank you for that posting but the code that is posted for LabView myRio does not have any connection info. I know what the connection info is for the Arduino but I assume this method we can do away with teh Arduino and connect direct to the myRio. So what connection goes where.
Vcc and Gnd are self evident but we also have
SCL
SDA
XDA
XCL
AOD
INT
which pins on the myRio do they connected to?
11-15-2016 06:03 PM
Check the spec sheet for MyRio. I don't remember off the top of my head but it should be explain there
11-29-2016 09:22 AM
Hello,
Thank you for the code. I am trying to use MPU6050 GY521 Gyroscope with myRio. I tried your code and it worked fine until a certain period of time, it showed error. The error is shown in the image below.
Do you know what does this errors means? Is there any suggestion you could give to solve this?
06-22-2017 02:11 PM
I changed the original posters code to stop the estimated angle from drifting. This example only has one degree of freedom - the tilt which I believe is roll. it is damned confusing to get proper information on this device even from the data sheet. However, this example uses a complementary filter to combine the gyro and accelerometer readings. This is because one works well at high frequencies and one at low!! So an integrator is no longer required, instead it is a low pass filter and high-pass combined into a simple recursion. It is a clever yet simple approach used by many Segway builders.
y(k)=0.8(y(k-1)+gyro_rate*dt)+0.2(acceleration_angle)
(dt is the sample interval which we are told is 1/1000. I am confused if this is the sample rate for the sensor or for the control loop - because I have 10kHz sample loop and it still works).
of course 0.8+0.2 adds to 1 and different combinations can be used. the alternative is a Kalman filter which isn't that difficult but I am led to believe there is little difference in the result. (don't take my word for it). The acceleration angle is found using arctan2 as acceleration is a vector. (that was the confusing part). You can do this for all three axis of course but I am only interested on one since my application at present is in Segways and balancing carts. Connections are as previously mentioned. I also added a trim for the gyro velocity.
3.3V --> VCC
GND --> GND
VIO --> GND
SDA --> 34
SCL --> 32
This is for the blue break out board (not the red one that is often shown), Read previous postings about it as it needs an extra 3.3v I believe. This will sit for a long time without drifting.
07-09-2017 10:59 AM
Hi! tomnz! Thanks for your share, it gives me a ot of help.
But I get strange results,the value is zero all the time. I don't why, it has confused me for a while. And I really want to tell you that in the code I get from other people, it can run very well for the first time, but later, even I just click the red stop button"abort execution" , and run it for the second time, it will also get all-zero results. This code is basically the same as yours, it is also changed from the gyroscope demo in the "Part II - NI myRIO Mechatronics Kit". So I want to ask why all the values zero. Thanks!
07-09-2017 12:27 PM
Check your wiring. Also which break out board do you use? This is for the blue one not the red one. The red one needs an extra connection. Other than that it should work so if it doesn't try changing the Gyro board.
07-11-2017 01:07 AM
Thanks for your replying. I don't know the color problem you talk about, I don't know which color my board is. Do you mean the color of the MPU6050 module? I can show you in the following picture.
07-11-2017 01:07 AM
Thanks for your replying. I don't know the color problem you talk about, I don't know which color my board is. Do you mean the color of the MPU6050 module? I can show you in the following picture.