ESP32-PICO-D4 Custom PCB with MPU6050

BitsNBytes
Posts: 4
Joined: Thu Dec 30, 2021 9:42 am

ESP32-PICO-D4 Custom PCB with MPU6050

Postby BitsNBytes » Fri Sep 09, 2022 8:18 am

Hi all, although I have used the forum for a long time now to read topics, this is my first post!

I have designed a PCB that uses the ESP32-PICO-D4 and I attached a LoRa RA02 and an MPU6050 to it. Although the MCU works flawlessly and I am able to program it and use the RA02, I have a weird issue trying to get the MPU6050 to work.

Things I have tried so far:
1. I am using a small sketch to read through all possible I2C addresses and I cannot detect the MPU6050 at all. I tried various sketches none worked.
2. I double-checked my I2C pins. They are connected to the default PICO D4 pins, SDA 21, SCL 22.
3. I connected the I2C line to my oscilloscope to check if it the signal is bad and it's ok (I have pull-up resistors).
4. I have made 10 boards with this setup and none works (it's not just a faulty board case).

MPU6050 Schematic:
Image

Do you have any other ideas on how to debug my case!?

User avatar
mbratch
Posts: 302
Joined: Fri Jun 11, 2021 1:51 pm

Re: ESP32-PICO-D4 Custom PCB with MPU6050

Postby mbratch » Sat Sep 10, 2022 2:03 am

Not much to go on here. Is your VLOGIC connected to anything but the capacitor and ground? That is the digital logic reference voltage used by the MPU 6050 for I2C. If you referenced the Sparkfun MPU 6050 schematic, you'll note that VLOGIC goes to the VIO connector on their little board and it needs to be used to set that reference voltage.

You mentioned you hooked an oscilloscope up to your I2C bus and it "looks OK". What does that mean specifically? Are the lines always at 3.3V? Is there any evidence of communication at all from the ESP32 to the MPU 6050?

Did you breadboard and test your design before making PCBs?

BitsNBytes
Posts: 4
Joined: Thu Dec 30, 2021 9:42 am

Re: ESP32-PICO-D4 Custom PCB with MPU6050

Postby BitsNBytes » Mon Sep 12, 2022 1:26 pm

mbratch wrote:
Sat Sep 10, 2022 2:03 am
Not much to go on here. Is your VLOGIC connected to anything but the capacitor and ground? That is the digital logic reference voltage used by the MPU 6050 for I2C. If you referenced the Sparkfun MPU 6050 schematic, you'll note that VLOGIC goes to the VIO connector on their little board and it needs to be used to set that reference voltage.

You mentioned you hooked an oscilloscope up to your I2C bus and it "looks OK". What does that mean specifically? Are the lines always at 3.3V? Is there any evidence of communication at all from the ESP32 to the MPU 6050?

Did you breadboard and test your design before making PCBs?
Wow, I really missed the VLOGIC part, I referenced a Sparkfun board which seems the same as Adafruit's. So the VLOGIC should be connected to 3.3V right?

On oscilloscope, the signal goes high and low with an 'OK' (not deformed or spiked) digital signal.

Yes, I tested the circuit at the breadboard but with a MPU6050 PCB module.

User avatar
mbratch
Posts: 302
Joined: Fri Jun 11, 2021 1:51 pm

Re: ESP32-PICO-D4 Custom PCB with MPU6050

Postby mbratch » Fri Sep 23, 2022 1:20 am

Sorry for the late response. I just saw the notification.
BitsNBytes wrote:
Mon Sep 12, 2022 1:26 pm
[Wow, I really missed the VLOGIC part, I referenced a Sparkfun board which seems the same as Adafruit's. So the VLOGIC should be connected to 3.3V right?
Yes, assuming that's the logic level of your I2C (I assume it is). According to the MPU6050 datasheet:
For power supply flexibility, the MPU-60X0 operates from VDD power supply voltage range of 2.375V-3.46V. Additionally, the MPU-6050 provides a VLOGIC reference pin (in addition to its analog supply pin: VDD), which sets the logic levels of its I2C interface. The VLOGIC voltage may be 1.8V±5% or VDD.
It wouldn't hurt to keep the cap there although 100nF would perhaps be ideal imst as of the 10nF you have. If you don't have it already, a 100nF filter cap on your VCC would be good design practice. Keep the filter caps close to the voltage pin on the chip.

BitsNBytes
Posts: 4
Joined: Thu Dec 30, 2021 9:42 am

Re: ESP32-PICO-D4 Custom PCB with MPU6050

Postby BitsNBytes » Fri Nov 04, 2022 2:03 pm

mbratch wrote:
Fri Sep 23, 2022 1:20 am
Sorry for the late response. I just saw the notification.
BitsNBytes wrote:
Mon Sep 12, 2022 1:26 pm
[Wow, I really missed the VLOGIC part, I referenced a Sparkfun board which seems the same as Adafruit's. So the VLOGIC should be connected to 3.3V right?
Yes, assuming that's the logic level of your I2C (I assume it is). According to the MPU6050 datasheet:
For power supply flexibility, the MPU-60X0 operates from VDD power supply voltage range of 2.375V-3.46V. Additionally, the MPU-6050 provides a VLOGIC reference pin (in addition to its analog supply pin: VDD), which sets the logic levels of its I2C interface. The VLOGIC voltage may be 1.8V±5% or VDD.
It wouldn't hurt to keep the cap there although 100nF would perhaps be ideal imst as of the 10nF you have. If you don't have it already, a 100nF filter cap on your VCC would be good design practice. Keep the filter caps close to the voltage pin on the chip.

Hi there, thank you for the response and the comments on the cap.
The issue was the VLOGIC part obviously. It now works fine :)

Who is online

Users browsing this forum: No registered users and 127 guests