This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can somebody provide me the the tutorial of how to interface nrf51822 with MPU6050 ?

Hi there, I am begineer for nrf51822 and I want to interface MPU6050 WITH nrf51822 so can somebody provide me the tutorial with full detail.i want to read just raw values of mpu6050. How to use Neil I'd? How to write a program for nrf51822?

Great help appreciated!!!

Regards Abhijeet

  • Hello, Abhijeet kapse.

    I want to interface MPU6050 WITH nrf51822 so can somebody provide me the tutorial with full detail.

    Well, I think it will be hard to help you to the fullest.

    especially when you say

    How to write a program for nrf51822? I want to interface MPU6050 WITH nrf51822

    I hope you have Keil MDK or Eclipse installed on your computer.

    And actually, there are great sources to learn.

    Let's have a compromise; after you study these, create detailed questions and post them on the devzone.

    However, to prevent creating duplicated questions such as, "nrf52832 ble transfer data continuously"

    search some questions which might help you, please.

    // In details

    Since you have mentioned about

    I want to interface MPU6050 WITH nrf51822

    you should take a look at I2C, also called as TWI.

    As you see the Nordic's SDK, the TWI example is provided. Use this example to understand TWI.

    Unfortunately, in the readme page, it says that

    Not tested on PCA10036 and MPU60x0

    However, the MPU series is quite similar to others. So this is not a big issue.

    You have to look at the register map of MPU6050.

    Your goal is this; create a firmware that can read/write MPU6050's register.

    The aforementioned GitHub link will provide a great help.

    Also, please keep in mind that

    The examples are not extensively tested and only meant as simple explanations and for inspiration. NO WARRANTY of ANY KIND is provided.

    tooLong

    // In short,

    Study about TWI (I2C) and try Nordic's TWI example ->

    Read about the register map of MPU6050 ->

    nrf51822 can read/write MPU's register with TWI, so start with reading the value from the WHO_AM_I register ->

    configure registers using TWI, such as CLKSEL, FIFO_EN, more. Use the GitHub link to speed things up.

    -Best Regards

  • Hey mango, thanks for your reply, i appreciate your answer and delighted that you have answered my question very deeply. i have already done the interfacing of mpu 9250 with arduino and i knew about the twi protocol too just need coding help for nrf51822. could you share me the simple mpu 9250 code for nrf51822 with good explanation.

    Regards, Abhijeet

  • In addition to mango's link to this repository (which supports nRF51 and MPU9250) there are also some drivers for the MPU6050 in the latest SDKs. You will find the driver in "SDK_root_folder\components\drivers_ext\mpu6050". Although it says MPU6050, it should work out of the box with MPU9250.

  • ._build\nrf51422_xxac.axf: error: L6002U: Could not open file ._build\main.o: No such file or directory i got this error while compiling the mpu code in keil what should be the solution?

  • Hi. Considering your deleted comments looks like you have compiled a Keil project.

    Actually, I don't know about that linker error L6002U.

    However, there are some links that can help you out.

    Nordic devzone

    Keil forum

    Sorry about helping you out in more detail and the coding help.

    Check the sdk_config.h file to see what TWI pins are used if you are using Nordic's SDK above v12.

    -Best Regards, MANGO

Related