ZHomeSlice / Simple_MPU6050

Going Live
MIT License
88 stars 24 forks source link

It doesn't work on ESP8266 or ESP32 #36

Open Olejan opened 1 year ago

Olejan commented 1 year ago

Hi!

I try to run the Simple_MPU6050_Calibration example on my ESP8266 Dev Module. It compiles. But after flashing in Serial Output, I see some kind of garbage instead of data. If I change the Serial Monitor speed from 115200 to 74880 baud it changes the situation. But the data in the Serial Monitor is strange:

load 0x4010f000, len 3424, room 16 tail 0 chksum 0x2e load 0x3fff20b8, len 40, room 8 tail 0 chksum 0x2b csum 0x2b v00042050 ~ld rf cal sector: 1020 freq trace enable 0 rf[112] : 0��r� �

The situation is repeated on the ESP32, although changing the speed of the Serial Monitor does not lead to readable data. What's wrong?

ZHomeSlice commented 1 year ago

It seems that you are looping in the boot up.The ESP8266 and ESP32 boot at a baud rate of 74880 to output some debug information. 0��r��� is all we are getting at the start of your program execution. I can't help further without more information.

Olejan commented 1 year ago

If I comment out all strings with "mpu" in the code from Simple_MPU6050_Calibration, then the Serial Monitor will display what should be in the code. But at the beginning of the message there will be some amount of garbage. If I leave the code in its original state, it will be what I described above. At the same time, my mpu6050 is definitely working, which I can verify by uploading my code.

Olejan commented 1 year ago

gGgCNuH

ZHomeSlice commented 1 year ago

I missed your prior comment. make sure you have the latest versions of the Simple_Wire and the Simple_MPU6050 files let me know if this solves the problem. the simple wire library has been modified to accommodate the esp8266 and esp32 chips I believe that the fixes were implemented there.

Olejan commented 1 year ago

Yes, I have the latest versions of the libraries and the situation has not changed. New data - when I send any character to the Serial port, it can be seen that the program starts the sensor calibration process. But there are the same problems with displaying - unreadable characters are displayed on the Serial Monitor in one line. At the same time, the calibration process does not end - this can be seen from the filling of the monitor with symbols when it is cleared.

ZHomeSlice commented 1 year ago

What voltage are you applying to the MPU6050 3V or 5V? Why I ask :) The breakout board has a 3V regulator on it and is designed to have 5V applied to the regulator. note that the connections to the ESP8266 are all at the 3V level after the voltage regulator. If you apply 3V to the regulator something like 2.3V is now at the MPU6050 and I have seen odd things happen. Schematic I'm struggling to determine why you would have the ESP8266 reset once the MPU becomes active. Unfortunately, I am not able to set up my test ESP8266 until after June 9th. I'll try to help where I can. Z

Olejan commented 1 year ago

Hi. Thanks a lot for your help. The voltage applied to the MPU6050 is 3.3V. But the voltage on pin 5 of Q2 of this scheme is same. I measured it. On the other hand, I have a code with i2cdevlib library and it works fine.

Olejan commented 1 year ago