• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 with 3x MPU-9250’s

Q&A Forum › Category: ESP32 › ESP32 with 3x MPU-9250’s
0 Vote Up Vote Down
Richard Montoya asked 4 years ago

Any chance you could give a hint a the best way to read 3x separate MP-9250’s. I’ve been loving your guides and can’t wait for more.

I just need to be guided in the right direction.

One MPU-9250 will be the reference and the other two will be read and compared to the reference.

Thanks

dan

Question Tags: mpu-9250
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Dan.

I don’t have a MPU-9250 to experiment with. So, I’m not sure if my advice will work.

There is a library from Sparkfun to interface with the MPU9250 and the Arduino.

  • https://github.com/sparkfun/SparkFun_MPU-9250-DMP_Arduino_Library

I’m not sure if it works with the ESP32. However, there’s a fork of this library to make it compatible with the ESP32. It says it is a “work in progress”, so I’m not sure if it actually works. Here’s the library:

  • https://github.com/rupin/SparkFun_MPU-9250-DMP_Arduino_Library

And the basic example: https://github.com/rupin/SparkFun_MPU-9250-DMP_Arduino_Library/blob/master/examples/MPU9250_Basic/MPU9250_Basic.ino

I’ve also found out another library that seems very easy to use. So, if it works I would go with this one:

  • https://github.com/asukiaaa/MPU9250_asukiaaa

Here’s a simple example: https://github.com/asukiaaa/MPU9250_asukiaaa/blob/master/examples/GetData/GetData.ino

I hope this helps.

Then, let me know if any of these libraries worked or if you found out another solution.

Regards,

Sara

0 Vote Up Vote Down
Richard Montoya answered 4 years ago

I think a multiplexer will do the trick for multiple I2C devices.  It would be great if you (or maybe you already have) done a tutorial on basic communication methods for various sensor modules.  
Thanks for the help.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Richard.

I think you can connect multiple I2C interfaces on the same I2C bus as long as they have different I2C address. But because you’re using the three equal sensors, they should have the same I2C address.

The ESP32 has two I2C buses, so you could control two at the same time.

To control 3, a multiplexer is probably the best solution. However, at the moment, we don’t have any tutorial about multiplexers.

The TCA9548A  supports up to 8 I2C devices, so it can be a good module for your project: https://learn.adafruit.com/adafruit-tca9548a-1-to-8-i2c-multiplexer-breakout/overview

Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.