{"id":1600,"date":"2015-01-17T13:38:18","date_gmt":"2015-01-17T08:08:18","guid":{"rendered":"http:\/\/judepereira.com\/blog\/?p=1600"},"modified":"2015-01-17T13:38:18","modified_gmt":"2015-01-17T08:08:18","slug":"mpu-6050-and-its-dmp-over-time","status":"publish","type":"post","link":"https:\/\/judepereira.com\/blog\/mpu-6050-and-its-dmp-over-time\/","title":{"rendered":"MPU 6050 and it&#8217;s DMP over time"},"content":{"rendered":"<p>Using <a href=\"https:\/\/github.com\/jrowberg\/i2cdevlib\/tree\/master\/Arduino\/MPU6050\" title=\"MPU 6050 using the i2cdev library\" target=\"_blank\">Jeff&#8217;s brilliant library<\/a> for using the DMP on the MPU 6050, here are graphs of the DMP filling the FIFO buffer at 200 Hz, 100 Hz, and 50 Hz.<\/p>\n<p>At 200 Hz, I found that while the MPU did interrupt my Arduino Due at 200 Hz, I could only read off the FIFO at 150 Hz. It overflowed twice or thrice every second. To be sure, I used the examples from the library itself.<\/p>\n<p>In the graphs below, red is yaw, green is pitch, and blue is roll (time in seconds is on the x-axis, and the values are on the y-axis).<br \/>\nThe MPU was kept on steady on the floor at all times during this test.<\/p>\n<h2>FIFO rate at 200 Hz:<\/h2>\n<p><a href=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1603\" data-permalink=\"https:\/\/judepereira.com\/blog\/mpu-6050-and-its-dmp-over-time\/200hz\/\" data-orig-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png?fit=1251%2C333&amp;ssl=1\" data-orig-size=\"1251,333\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"MPU 6050 at 200 Hz\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png?fit=300%2C80&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png?fit=1024%2C273&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png?resize=1251%2C333\" alt=\"MPU 6050 at 200 Hz\" width=\"1251\" height=\"333\" class=\"aligncenter size-full wp-image-1603\" srcset=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png?w=1251&amp;ssl=1 1251w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png?resize=150%2C40&amp;ssl=1 150w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png?resize=300%2C80&amp;ssl=1 300w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/200hz.png?resize=1024%2C273&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/p>\n<p>It&#8217;s unbelievably unstable. The values randomly shoot to 50 &#8211; 70 and stay there for a while. Before the MPU gives away (it doesn&#8217;t fill the FIFO for over 100ms), it&#8217;s about <strong>17 minutes<\/strong>.<\/p>\n<h2>FIFO rate at 100 Hz:<\/h2>\n<p><a href=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1602\" data-permalink=\"https:\/\/judepereira.com\/blog\/mpu-6050-and-its-dmp-over-time\/100hz\/\" data-orig-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png?fit=1243%2C333&amp;ssl=1\" data-orig-size=\"1243,333\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"MPU 6050 at 100 Hz\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png?fit=300%2C80&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png?fit=1024%2C274&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png?resize=1243%2C333\" alt=\"MPU 6050 at 100 Hz\" width=\"1243\" height=\"333\" class=\"aligncenter size-full wp-image-1602\" srcset=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png?w=1243&amp;ssl=1 1243w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png?resize=150%2C40&amp;ssl=1 150w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png?resize=300%2C80&amp;ssl=1 300w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/100hz.png?resize=1024%2C274&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><br \/>\nThe values look stable enough for use. It&#8217;s just <strong>6 minutes<\/strong> before the MPU gives away this time.<\/p>\n<h2>FIFO rate at 50 Hz:<\/h2>\n<p><a href=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1601\" data-permalink=\"https:\/\/judepereira.com\/blog\/mpu-6050-and-its-dmp-over-time\/50hz\/\" data-orig-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png?fit=1241%2C330&amp;ssl=1\" data-orig-size=\"1241,330\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"MPU 6050 at 50 Hz\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png?fit=300%2C80&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png?fit=1024%2C272&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png?resize=1241%2C330\" alt=\"MPU 6050 at 50 Hz\" width=\"1241\" height=\"330\" class=\"aligncenter size-full wp-image-1601\" srcset=\"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png?w=1241&amp;ssl=1 1241w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png?resize=150%2C40&amp;ssl=1 150w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png?resize=300%2C80&amp;ssl=1 300w, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/50hz.png?resize=1024%2C272&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><br \/>\nAt 50 Hz, the values are very good. They stabilise within 10 seconds. However, the MPU stops filling the FIFO buffer after about <strong>36 minutes<\/strong>.<\/p>\n<p>Does anybody know what&#8217;s wrong here?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using Jeff&#8217;s brilliant library for using the DMP on the MPU 6050, here are graphs of the DMP filling the FIFO buffer at 200 Hz, 100 Hz, and 50 Hz. At 200 Hz, I found that while the MPU did interrupt my Arduino Due at 200 Hz, I could only read off the FIFO at [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[504],"tags":[521,518,517,516,515,519,522,520],"class_list":["post-1600","post","type-post","status-publish","format-standard","hentry","category-hardware","tag-521","tag-dmp","tag-imu","tag-invensense","tag-mpu","tag-mpu-6050","tag-mpu-9150","tag-mpu-dmp"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pqtyx-pO","jetpack-related-posts":[{"id":1675,"url":"https:\/\/judepereira.com\/blog\/sending-notifications-via-apples-new-http2-api-using-jetty-9-3-6\/","url_meta":{"origin":1600,"position":0},"title":"Sending notifications via Apple&#8217;s new HTTP\/2 API (using Jetty 9.3.6)","author":"Jude Pereira","date":"January 9, 2016","format":false,"excerpt":"HTTP\/2 is still very much new to Java, and as such, there are just two libraries who support it - Jetty (from 9.3), and Netty (in alpha). If you're going the Jetty way (as I have), you'll need to add their ALPN library to your boot classpath. Note: Jetty 9.3.x\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2039,"url":"https:\/\/judepereira.com\/blog\/remapping-%c2%a7-to-brightness-keys-from-macos-sonoma-14-3-1\/","url_meta":{"origin":1600,"position":1},"title":"Remapping \u00a7 to ~ + brightness keys from macOS Sonoma 14.3.1","author":"Jude Pereira","date":"February 20, 2024","format":false,"excerpt":"A year ago, I wrote about bringing the UK keyboard layout closer to the US one on my M2 Air here, however, that suddenly stopped working. While attempting to run the command involved by hand, I realised that it had to be executed as root. Apple updated macOS such that\u2026","rel":"","context":"In &quot;miscellaneous&quot;","block_context":{"text":"miscellaneous","link":"https:\/\/judepereira.com\/blog\/category\/misc\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1881,"url":"https:\/\/judepereira.com\/blog\/nrf52840-flash-s340\/","url_meta":{"origin":1600,"position":2},"title":"nRF52840 &#8211; flashing the s340 v6.1.1 SoftDevice","author":"Jude Pereira","date":"July 12, 2019","format":false,"excerpt":"This post is a work in progress (WIP). The result of this experiment is a success. I have flashed my SparkFun nRF52840 mini, and I'm able to run the bicycle combined speed & cadence sensor example. Before we begin, \u00a0a big hats off to\u00a0Charles, who brought support for the SparkFun\u2026","rel":"","context":"In &quot;hardware&quot;","block_context":{"text":"hardware","link":"https:\/\/judepereira.com\/blog\/category\/hardware\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1979,"url":"https:\/\/judepereira.com\/blog\/mac-m1-m2-keyboard-brightness-keys-remap-%c2%a7-to\/","url_meta":{"origin":1600,"position":3},"title":"Mac M1\/M2: Keyboard Brightness Keys + Remap \u00a7 to ~","author":"Jude Pereira","date":"April 15, 2023","format":false,"excerpt":"Remap the section key to the tilde key, and bring back the keyboard brightness keys to the MacBook M1\/M2 machines.","rel":"","context":"In &quot;miscellaneous&quot;","block_context":{"text":"miscellaneous","link":"https:\/\/judepereira.com\/blog\/category\/misc\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1757,"url":"https:\/\/judepereira.com\/blog\/us-toy-giant-threatens-to-sue-matchbox\/","url_meta":{"origin":1600,"position":4},"title":"US toy giant threatens to sue Matchbox","author":"Jude Pereira","date":"March 18, 2017","format":false,"excerpt":"TL;DR: A giant American toy company threatens to sue Matchbox. Having no resources at hand, Matchbox is forced to change it's name to Tuneup. On the 14th of March, I received an email from Apple (via the giant toy company) with the following content: The developer of the reported application\u2026","rel":"","context":"In &quot;life!&quot;","block_context":{"text":"life!","link":"https:\/\/judepereira.com\/blog\/category\/living-a-wonder\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1635,"url":"https:\/\/judepereira.com\/blog\/discover-my-second-ios-app\/","url_meta":{"origin":1600,"position":5},"title":"Discover &#8211; my second iOS app","author":"Jude Pereira","date":"July 5, 2015","format":false,"excerpt":"iTunes Genius is a great feature. However, it lacks music discovery outside your own music library. Sure, you can always do a Google search for similar tunes, but let's face it - who has time to do this anymore? There weren't any great music discovery apps on the App Store\u2026","rel":"","context":"In &quot;ios&quot;","block_context":{"text":"ios","link":"https:\/\/judepereira.com\/blog\/category\/code\/ios\/"},"img":{"alt_text":"Highlights of Discover","src":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/feature-both-small.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/feature-both-small.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/feature-both-small.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/feature-both-small.png?resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/1600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/comments?post=1600"}],"version-history":[{"count":5,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/1600\/revisions"}],"predecessor-version":[{"id":1608,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/1600\/revisions\/1608"}],"wp:attachment":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/media?parent=1600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/categories?post=1600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/tags?post=1600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}