Coder Social home page Coder Social logo

leech001 / mpu6050 Goto Github PK

View Code? Open in Web Editor NEW
311.0 10.0 80.0 1.37 MB

STM32 HAL library for GY-521 (MPU6050) with Kalman filter

License: GNU General Public License v3.0

C 100.00%
stm32 stm32f103c8t6 bluepill hal gy-521 mpu6050 kalman kalman-filter peripheral i2c

mpu6050's People

Contributors

leech001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpu6050's Issues

clerical error

DataStruct->KalmanAngleX = Kalman_getAngle(&KalmanX, roll, DataStruct->Gy, dt);
I think DataStruct->Gy should be DataStruct->Gx ?

Isn't there any way to calibrate mpu6050?

Isn't there any way to calibrate mpu6050?

For not using mpu6050 DMP, I can not know how to make calibration function for this library.. plz let me know, if you know

anyway, Thanks for your awesome library :)

MPU6050_Init не происходит

Добрый день, возникла проблема с вашей реализацией. Есть плата с STM32F103 и MPU6050 на борту. И есть 3 прошивки с моими реализациями, одна просто читает данные с MPU6050 , вторая с реализацией фильтра Мажвика и третья с реализацией фильтра Махони. Все три прошивки работают, причем как если настроить I2C на Standart Mode, так и на Fast Mode. Но в вашей реализации не работает MPU6050_Init, то есть не приходит ответ 0х68, при чем реализация метода не сильно отличается от моей реализации, как думаете, в чем может быть проблема ?

stm32f446re port

Hey I have ported this code for F446RE, considering the fact it is quite pop and F401 is quite old arch. Will u like to view && merge the code if I send a PR?
P.S. The code is working superfine

MPU6050.KalmanAngleX NaN

I've used the example code from this repository. When I log the MPU6050.KalmanAngleX value and move the IMU quickly, it changes to nan(0x800000...) and does not recover afterwards. This only happens with KalmanAngleX, not KalmanAngleY. What part of the calculation could cause this?

Getting Random Values

Hi! First of all, thanks for this library!
But I am having issues with it:
With the sensor standing still , when I use MPU6050_Read_All I am getting random values that repeat over time without a noticeable pattern.
With MPU standing still, the values read vary between positive and negative values in all Acc and Giro values. Havent tried yet temperature and Kalman values.
Any Ideas about what could be causing this issue??

Thanks in advance!

Fix for MPU6050's that don't start

I had quite some trouble getting my MPU6050's to work.
As it turns out they start with the PWR_MGMT_1_REG set as 0x40 (everything zero, reset flag 1), which doesn't result in a working chip if you try to overwrite it with zeros.
What ended up working for me is first writing 0xFF to the PWR_MGMT_1_REG and subsequently writing the zeroes.

I'm not sure if I just had a batch of dud MPU6050's that way, or of this is going to be a common problem, but this is my request to add the line of code to the initialization function. :)

(MPU6050.c Line 77-78)

        // power management register 0X6B we should write all 0's to wake the sensor up
          Data = 0;
          HAL_I2C_Mem_Write(I2Cx, MPU6050_ADDR, PWR_MGMT_1_REG, 1, &Data, 1, i2c_timeout);

to:

        // power management register 0X6B we should write all 0's to wake the sensor up
          Data = 0xFF;
          HAL_I2C_Mem_Write(I2Cx, MPU6050_ADDR, PWR_MGMT_1_REG, 1, &Data, 1, i2c_timeout);
          Data = 0x00;
          HAL_I2C_Mem_Write(I2Cx, MPU6050_ADDR, PWR_MGMT_1_REG, 1, &Data, 1, i2c_timeout);

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.