Facing challenges in activating DMP for accurate Yaw, Pitch, and Roll readings using Flowcode, seeking assistance.

For general Flowcode discussion that does not belong in the other sections.
Post Reply
bazkhf
Posts: 9
http://meble-kuchenne.info.pl
Joined: Sun Jan 14, 2024 10:15 am
Has thanked: 2 times
Been thanked: 1 time

Facing challenges in activating DMP for accurate Yaw, Pitch, and Roll readings using Flowcode, seeking assistance.

Post by bazkhf »


Hello,

I am facing an issue while using the MPU6050 unit in Flowcode. When I use the Gyroscope reading function (GetGyroReadingReal), I notice that the readings are affected by motion vibrations, especially in the Gyroscope values.

When DMP (Digital Motion Processor) is enabled, the readings should not be affected by vibrations, but in Flowcode, I am unable to enable DMP directly. I would like to know if there is a way to activate DMP by writing values to the registers, or if there is another method using Flowcode.

Additionally, I would like to know how to obtain the correct values for Yaw, Roll, and Pitch, ensuring they are error-free, as I need these values to be accurate and unaffected by vibrations.

I would appreciate your help in finding a solution to this problem. If there is anything missing in the code I have written or any settings I have not configured correctly, I would be grateful for guidance on the proper approach.

I have attached the Flowcode file for you to review the code and ensure its correctness.

Please observe the two images:




Image

The first image: when the MPU6050 unit is placed flat on the table. As you can see, the graph is stable and does not shake.




Image

The second image: when the MPU6050 unit is placed flat but held in my hand. As you can see, the graph shakes because my hand is vibrating.

The problem is that when the unit is installed in an aircraft, due to engine vibrations, the unit will also shake, leading to unstable readings.

Thank you for your cooperation.
Attachments
MPU6050_test_v10.fcfx
(20.5 KiB) Downloaded 90 times

bazkhf
Posts: 9
Joined: Sun Jan 14, 2024 10:15 am
Has thanked: 2 times
Been thanked: 1 time

Re: Facing challenges in activating DMP for accurate Yaw, Pitch, and Roll readings using Flowcode, seeking assistance.

Post by bazkhf »

Dear Flowcode Team,

I am writing to inform you that I am still experiencing the issue mentioned above with the MPU6050 unit in the Flowcode environment. Given the importance of this matter to my project, I kindly request assistance or guidance from the developers or relevant team members to resolve this problem.

Thank you for your understanding and continued support.

Best regards,

Bilal

chipfryer27
Valued Contributor
Posts: 1430
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 336 times
Been thanked: 497 times

Re: Facing challenges in activating DMP for accurate Yaw, Pitch, and Roll readings using Flowcode, seeking assistance.

Post by chipfryer27 »

Hi

It has been years since I last used any of these devices and I am probably not best placed to answer, but if I remember correctly after a bit of messing around I did get results that were good enough for me.

I will try and dig out my info to refresh my memory.

Regards

chipfryer27
Valued Contributor
Posts: 1430
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 336 times
Been thanked: 497 times

Re: Facing challenges in activating DMP for accurate Yaw, Pitch, and Roll readings using Flowcode, seeking assistance.

Post by chipfryer27 »

Hi

Have you downloaded the Register Map document? In there it details which registers to set for any particular requirements. I don't have a copy to hand but once I get access to my copy I can have a further look.

Regards

Steve-Matrix
Matrix Staff
Posts: 1428
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 196 times
Been thanked: 331 times

Re: Facing challenges in activating DMP for accurate Yaw, Pitch, and Roll readings using Flowcode, seeking assistance.

Post by Steve-Matrix »

Your program may need to average out the readings to give you a smoother response. For example, read every 100ms and then take a rolling average of the previous 10 readings.

The actual number and frequency of the readings you take may need to be tailored to your exact situation and you'll probably need to experiment a little to achieve the best results.

bazkhf
Posts: 9
Joined: Sun Jan 14, 2024 10:15 am
Has thanked: 2 times
Been thanked: 1 time

Re: Facing challenges in activating DMP for accurate Yaw, Pitch, and Roll readings using Flowcode, seeking assistance.

Post by bazkhf »

Dear Flowcode Team and Contributors,

I would like to extend my heartfelt thanks to each one of you for taking the time to respond to my query regarding the challenges I am facing with the MPU6050 in the Flowcode environment. Your suggestions and insights have been incredibly helpful.

To chipfryer27, I appreciate your willingness to revisit your past experience and your suggestion to refer to the Register Map document. I will certainly check the register settings to ensure everything is correctly configured.

To Steve-Matrix, your advice on averaging the readings and applying a rolling average was very helpful. I will experiment with this method to smooth out the response and fine-tune the readings to get more accurate results.

I will try out the proposed solutions and will keep you updated on the progress. Thank you again for your valuable support.

Best regards,

medelec35
Matrix Staff
Posts: 1701
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 594 times
Been thanked: 569 times

Re: Facing challenges in activating DMP for accurate Yaw, Pitch, and Roll readings using Flowcode, seeking assistance.

Post by medelec35 »

Hi Bilal.
If you look at Component Libraries > Math, you will see several different types of averaging components you might find useful
Martin

Post Reply