{"id":3313,"date":"2023-12-29T04:48:19","date_gmt":"2023-12-29T04:48:19","guid":{"rendered":"https:\/\/vegaprocessors.in\/blog\/?p=3313"},"modified":"2023-12-29T04:48:19","modified_gmt":"2023-12-29T04:48:19","slug":"interfacing-mpu6050-sensor-module-to-vega-aries-boards-to-find-roll-and-pitch-values","status":"publish","type":"post","link":"https:\/\/vegaprocessors.in\/blog\/interfacing-mpu6050-sensor-module-to-vega-aries-boards-to-find-roll-and-pitch-values\/","title":{"rendered":"Interfacing MPU6050 Sensor Module to VEGA ARIES boards to find roll and pitch values"},"content":{"rendered":"\n<p>In this tutorial, we are going to learn how to interface&nbsp;<strong>MPU6050<\/strong>&nbsp;with<strong>&nbsp;ARIES v3 Board<\/strong>. The MPU6050 sensor module is a complete 6-axis Motion Tracking Device. It combines 3-axis Gyroscope, 3-axis Accelerometer, and Digital Motion Processor all in a small package. Also, it has the additional feature of an on-chip temperature sensor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MPU6050(Gyroscope + Accelerometer + Temperature)<\/h2>\n\n\n\n<p>As we said, The MPU6050 is a Micro-Electro-Mechanical System (<strong>MEMS<\/strong>) which consists of a 3-axis Accelerometer and 3-axis Gyroscope inside it. This helps us measure acceleration, velocity, orientation, displacement, and many other motion-related parameters of a system or object. This module also has a (DMP) Digital Motion Processor inside it which is powerful enough to perform complex calculations and thus free up the work for Microcontroller.<\/p>\n\n\n\n<p>The MPU6050 module allows us to read data from it through the I2C bus. Any change in motion will be reflected on the mechanical system which will, in turn, vary the voltage. Then the IC has a 16-bit ADC which it uses to accurately read these changes in voltage and stores it in the FIFO buffer.<\/p>\n\n\n\n<p><strong>DMP (Digital Motion Processor)<\/strong><\/p>\n\n\n\n<p>The embedded Digital Motion Processor (DMP) is used to compute motion processing algorithms. It takes data from gyroscope, accelerometer, and additional 3rd party sensor such as magnetometer and processes the data. It provides motion data like roll, pitch, yaw angles, landscape and portrait sense, etc. It minimizes the processes of the host in computing motion data. The resulting data can be read from DMP registers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"210\" height=\"180\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu-1.jpg\" alt=\"\" class=\"wp-image-3381\" style=\"width:321px;height:300px\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows 10 or above\/Linux (64 bit)<\/li>\n\n\n\n<li>Arduino IDE<\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv3.php\" target=\"_blank\" rel=\"noreferrer noopener\">VEGA ARIES Board support package<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Components Required<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ARIES v3.0 Board<\/li>\n\n\n\n<li>USB type C to USB type A cable<\/li>\n\n\n\n<li>MPU6050<\/li>\n\n\n\n<li>Jumper Wires<\/li>\n<\/ul>\n\n\n\n<p><strong>Not<\/strong><strong>e:<\/strong>&nbsp;All of the following boards can be used for this project<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv2.php\">ARIES v2.0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv3.php\">ARIES v3.0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesmicro.php\">ARIES Micro<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesdot.php\">ARIES DOT<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesiot.php\">ARIES IoT<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Connection Diagram<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"696\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu-1024x696.png\" alt=\"\" class=\"wp-image-3461\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu-1024x696.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu-300x204.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu-768x522.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu.png 1090w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>MPU6050 communicates with the ARIES v3 board via the I2C-1 port. MPU6050 &nbsp;is composed of 8 pins, but we need only 5 pins for the working, VCC, GND, and two I2C pins(SCL and SDA). Connect VCC and GND to +3.3V and GND respectively of ARIES v3 board. Connect SCL of the sensor to SCL_1 and SDA of the sensor to SDA_1 of ARIES v3 board. <\/p>\n\n\n\n<p>Now, for powering up and programming the code into the ARIES v3 board, we have to connect a&nbsp;<strong>USB type C<\/strong>&nbsp;(common data cable, used for mobile charging and data transfer) in the&nbsp;<strong>UART0<\/strong>&nbsp;port of the ARIES v3 board, to a Laptop\/Desktop\/PC .<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>MPU6050<\/strong><\/td><td><strong>ARIES v3 Board<\/strong><\/td><\/tr><tr><td>VCC<\/td><td>+3V3<\/td><\/tr><tr><td>GND<\/td><td>GND<\/td><\/tr><tr><td>SCL<\/td><td>SCL-1<\/td><\/tr><tr><td>SDA<\/td><td>SDA-1<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong>Connection pins for MPU6050 with ARIES v3.0<\/strong><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Procedure<\/h2>\n\n\n\n<p>Open and set up the Arduino IDE as described in\u00a0<a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv3.php\" target=\"_blank\" rel=\"noreferrer noopener\">Getting Started with ARIES v3.0<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Make sure you have selected&nbsp;<strong>ARIES v3<\/strong>&nbsp;Board from&nbsp;<strong>Tools<\/strong>&nbsp;-&gt;&nbsp;<strong>Board<\/strong>&nbsp;-&gt;&nbsp;<strong>VEGA Processor: ARIES Boards<\/strong>&nbsp;-&gt;&nbsp;<strong>ARIES v3<\/strong><\/li>\n\n\n\n<li>Select Programmer as VEGA XMODEM from&nbsp;<strong>Tools<\/strong>&nbsp;-&gt;&nbsp;<strong>Programmer<\/strong>&nbsp;-&gt;&nbsp;<strong>VEGA XMODEM<\/strong><\/li>\n\n\n\n<li>Also select appropriate port from\u00a0<strong>Tools<\/strong>\u00a0->\u00a0<strong>Port\u00a0-> COM* (ARIES Board<\/strong>)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"847\" height=\"415\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/12\/1-12.png\" alt=\"\" class=\"wp-image-4610\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/12\/1-12.png 847w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/12\/1-12-300x147.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/12\/1-12-768x376.png 768w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/figure>\n\n\n\n<p>Now, Open&nbsp;<strong>Files<\/strong>&nbsp;-&gt;&nbsp;<strong>Examples<\/strong>&nbsp;-&gt; Under&nbsp;<strong>Examples for ARIES v3<\/strong>&nbsp;<strong>-&gt;&nbsp;Wire-&gt;&nbsp;MPU_Roll_Pitch<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"751\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu2-1-1024x751.png\" alt=\"\" class=\"wp-image-3323\" style=\"width:637px;height:467px\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu2-1-1024x751.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu2-1-300x220.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu2-1-768x563.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpu2-1.png 1132w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Finally upload the code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Output<\/h2>\n\n\n\n<p>Once the program is uploaded, Open the serial monitor, you can see the X,Y,Z values for accelerometer and Gyroscope along with Temperature, Roll and pitch values using MPU6050 in the serial monitor of Arduino IDE<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpuoutput-1024x768.jpeg\" alt=\"\" class=\"wp-image-3387\" style=\"width:635px;height:476px\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpuoutput-1024x768.jpeg 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpuoutput-300x225.jpeg 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpuoutput-768x576.jpeg 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpuoutput-1536x1152.jpeg 1536w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpuoutput-2048x1536.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Demonstration<\/h2>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"720\" style=\"aspect-ratio: 1280 \/ 720;\" width=\"1280\" controls src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mpuvideo.mp4\"><\/video><\/figure>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to learn how to interface&nbsp;MPU6050&nbsp;with&nbsp;ARIES v3 Board. The MPU6050 sensor module is a complete 6-axis Motion Tracking Device. It combines 3-axis Gyroscope, 3-axis Accelerometer, and Digital Motion Processor all in a small package. Also, it has the additional feature of an on-chip temperature sensor. MPU6050(Gyroscope + Accelerometer + Temperature) [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":3387,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[95,76,7,66,77,31,24],"class_list":["post-3313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aries-with-arduinoide","tag-aries-v3-board","tag-c-dac","tag-cdac","tag-iic","tag-thejas-32","tag-thejas32","tag-vegaprocessor"],"_links":{"self":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/3313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/comments?post=3313"}],"version-history":[{"count":14,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/3313\/revisions"}],"predecessor-version":[{"id":4611,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/3313\/revisions\/4611"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media\/3387"}],"wp:attachment":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media?parent=3313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/categories?post=3313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/tags?post=3313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}