I'm currently trying to read values from an MPU6050 using an STM32duino, but using an I2C scanner code, the STM32 can't detect the sensor. I've checked all the connections using an avometer and it all seems good. Connecting the connection boards to an arduino works perfectly fine so the board is not busted. I've connected the VCC to +5V and GND to GND, from my experience, the MPU works fine under +5 volts because there is a regulator and my module which is a GY-521 already has pull up resistors. So what am i doing wrong?
\$\begingroup\$
\$\endgroup\$
3
-
\$\begingroup\$ There are many different possible troubleshooting approaches, depending on things not mentioned - e.g. Do you have an oscilloscope (better) or a logic analyser (most of which can't show analog signal changes, but might help identify certain problems)? Do you measure 3.3V on SDA with the GY-521 only connected to 5V & Gnd? Have you tried any other known-working I2C device instead? How confident are you about the correctness of the code (firmware) you are using? Adding good quality photos of your h/w (PCBs & wiring etc.) into the question, would allow readers to spot certain types of problem. \$\endgroup\$– SamGibson ♦Commented Dec 15, 2019 at 19:59
-
\$\begingroup\$ well, testing my connections shows that it works just fine. But the thing is, when using an I2Cscanner code, the board can't found the device. Is there a way to force the board to use a specific SDA and SCL pin? \$\endgroup\$– 3MP The RookCommented Dec 16, 2019 at 17:31
-
\$\begingroup\$ Unfortunately I didn't understand your reply (you said "it works just fine" without saying what "it" means - since your question says "the STM32 can't detect the sensor" then obviously something isn't fine). Also, I didn't see a reply to any of my requests for information. So since there is clearly some mis-communication, I will stop here and wish you sincere good luck. Hopefully someone else who understands what you mean, will come along. \$\endgroup\$– SamGibson ♦Commented Dec 16, 2019 at 21:34
Add a comment
|