Timeline for MPU6050 does not give output
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 27, 2021 at 21:11 | history | edited | tim | CC BY-SA 4.0 |
Updated in response to comments.
|
Jul 26, 2021 at 17:21 | vote | accept | Tobias Guo | ||
Jul 26, 2021 at 17:21 | comment | added | Tobias Guo | Thanks! That seems to have fixed the problem! I also switched to using the I2Cdev library and that helped streamline the process of communicating with the sensors, but now my MPUs are actually giving me the correct output! | |
Jul 24, 2021 at 17:16 | comment | added | tim | @TobiasGuo, here is a simple bi-directional level shifter. Click switches. | |
Jul 24, 2021 at 17:13 | comment | added | Tobias Guo | I haven't tried it yet. I was working on finding some level shifters to attach to the other pins on the MPU so I haven't been able to test the code yet. I will reply with another comment once I have and let you know how things are going! Thanks again for the help! | |
Jul 24, 2021 at 17:09 | comment | added | tim |
@TobiasGuo, did you get it working? I noticed from your question about accelerometer values that you changed the code, i.e. disabled the SLEEP mode without performing a reset because the reset re-enables SLEEP mode (Section 3, PWR_MGMT_1 register, page 8), and used keep-alive with Wire.endTransmission(false) before requesting data.
|
|
Jul 24, 2021 at 11:34 | comment | added | tim |
@TobiasGuo, you could also print and test the return value of each Wire.endTransmission() .
|
|
Jul 24, 2021 at 11:25 | comment | added | tim |
@TobiasGuo, as others have said, the chip could be damaged by a 5 V supply. While 5 V is within the absolute maximum rating of 6 V, it's outside the recommended operating voltage. Do you have level shifters on SCL, SDA and ADO? Try replacing the period print with Serial.println(Wire.available()); to see how many bytes it manages to read.
|
|
Jul 23, 2021 at 16:06 | comment | added | Tobias Guo | Thanks for the help! I've looked through the checklist that RowanP gave me and fixed anything that I thought might have been wrong, including switching to the 3.3V pin for power on the Uno. I've also used your code and it appears to still only give 0s, but when I rotate the sensor about the y-axis the code gets stuck in the State :: Wait case and only prints periods (but the heartbeat light doesn't stop). Do you have any idea why? | |
Jul 23, 2021 at 12:32 | history | edited | tim | CC BY-SA 4.0 |
Added electrical characteristics showing the Vdd range of 2.375 V to 3.46 V.
|
Jul 23, 2021 at 3:56 | history | edited | tim | CC BY-SA 4.0 |
Added a modified code snippet for debugging.
|
Jul 22, 2021 at 21:21 | history | answered | tim | CC BY-SA 4.0 |