Code Monkey home page Code Monkey logo

mpu6050-stm32-dma-exti's Introduction

MPU6050-STM32-DMA-EXTI with HAL lib

MPU6050 DMA & EXTI with HAL library. Real time orientation with Madgwick Orientation & Complementary Filter

This repository aims to keep the efficiency at the highest level by giving the workload to all possible hardware in order to achieve maximum performance with minimum code and processing power in STM32 microcontrollers of the MPU6050 sensor.


General operation:

The sensor takes samples every 5ms (200Hz) and generates new Accel and Gyro data using the internal DLPF

Sends interrupt signal from external interrupt pin as soon as data is generated

STM32 detects external interrupt and sets up DMA to receive data from i2c non-blocking

When the DMA reading is complete, the received data is scaled, then the orientation is calculated by applying the Madgwick Orientation or Complementary Filter.

The process is automatically repeated every time the sensor generates new data (every 5ms).


Since all the data produced by the sensor is processed by the orientation algorithm, in theory the best yaw pitch and roll values that can be obtained from this sensor are obtained.


Madgwick Orientation Filter & Fast inverse sqrt for madgwick filter is taken from https://github.com/nickrehm/dRehmFlight. Thanks for nickrehm


CubeMX settings:

image

image

image

image

mpu6050-stm32-dma-exti's People

Contributors

yscif avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.