Welcome, Guest

Author Topic: MOD-MPU6050 with MOD-WIFI-ESP8266-DEV  (Read 1901 times)

edup

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
MOD-MPU6050 with MOD-WIFI-ESP8266-DEV
« on: November 28, 2016, 08:11:03 PM »
Hi,

I'm trying to get started with MOD-MPU6050 and MOD-WIFI-ESP8266-DEV (both from olimex).

I'm using the arduino sketch that olimex has in their page https://www.olimex.com/Products/Modules/Sensors/MOD-MPU6050/open-source-hardware but it never finds the module. The error message is:

Code: [Select]
Initializing I2C devices...
Testing device connections...
MPU6050 connection failed

Does anyone could give me some tips?

Thanks in advance.



LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1752
  • Karma: +45/-2
Re: MOD-MPU6050 with MOD-WIFI-ESP8266-DEV
« Reply #1 on: December 01, 2016, 11:34:06 AM »
Hello,

Probably, there is no pull-up on the I2C line since both boards start with the MOD- prefix - these are considered boards that should operate as "devices". They are usually connected to boards that operate as "hosts" (without MOD- prefix). It is typical for the host boards to have the pull-up resistors.

You need to place the pull-up resistors on one of the boards. Both boards have pads provided for such resistors on SCL and SDA. For example, you can place 4.7k ohm resistors on R4 and R5 pads of the MOD-MPU6050 board. Refer to the schematics of the boards.

Best regards,
Lub/OLIMEX

Technical support and documentation manager at Olimex

edup

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
Re: MOD-MPU6050 with MOD-WIFI-ESP8266-DEV
« Reply #2 on: December 09, 2016, 05:31:45 PM »
Thanks for your answer. I have it working now.

Wiring:
I connected SCL to pin GPIO4 and SDA to GPIO2.
I connected VCC and ground to the right pins of the breadboard.

Code:
I need to begin it with: Wire.begin(2,4);

It works now.