last day (15 days later) » 

21:40
1
Q: ESP8266 NodeMCU CP2102 ESP-12E I2C with MPU 6050 Error

ShoutOutAndCalculateSo the previous two questions could be found here: ESP8266 computtion error and ESP8266 not working with MPU 6050 over wire library and I2C However, it was not resolved, and with updates and debugs, I'm going to delete them later and summarize in this single post. Issue: An ESP8266 CP2102 ...

The MPU6050 boards I found need a +5V supply voltage as they have an internal 5V->3.3V voltage regulator. I would try to connect the yellow wire to your MPU6050 to +5V instead of 3.3V. It also looks like pull up resistors are already on the board so I would leave them out (if you have the same board), See this schematic
@StarCat I have tried that as well, in previous case 7 when adjusting the power supply. both 5V and 3.3V. Pull up resistors have been attempted from 0 to 100k
I've actually built the same setup here (Generic ESP8266-12E "NodeMCU", generic MPU6050 board). I'm using the Adafruit MPU6050 library and it worked out of the box with the supplied library examples. My MPU 6050 is supplied from +5V, no pull ups on the I2C pins, no twisted cables.
did you solder the pins header on MPU6050 breakout board?
@Juraj, Good point as they are often delivered without a pin header attached. ShoutOutAndCalculate tested multiple working MPU6050s.
21:40
@StarCat, zoom in the module on photo
@Juraj, I see what you mean. I assumed the yellow tape was put there by the factory, but it does look suspicious.
@StarCat how? could you try the script from case 6 please? (I have honestly tried everything you've told me to, plus 72 hours) what brand of ESP8266-12E "NodeMCU" are you using?(also, are you sure those value reading are correct?)
@ShoutOutAndCalculate, My NodeMCU is a brandless "NodeMCU v3" (the wide breadboard-unfriendly version). The script from case 6 worked (I did change the SCL and SDA pin numbers and the serial speed to 115200). The Gyro and Acceleration values looked correct to me (i.e. rotating along different axes produced consistent results). BTW, what results do you get? What happens exactly?
One more question: Do you run your ESP8266 at 80 or 160Mhz? Mine run at 80 by default but I've not yet come across a situation in which I need the extra speed. Edit: At 160Mhz the sketch from case 6 still worked well.
@StarCat I tried both frequency, but isn't V3 unofficial? (the one in graph was v2)
@ShoutOutAndCalculate, No, V3 is not official and there is no technical difference between a V2 and a V3 except for some unimportant differences in pinout. It's mostly just marketing.
21:40
@StarCat the scanner can get the address, online code in case 6 get 0(nothing). my code for gyro was fine if I don't move it too fast, but accelerator angle was wrong.
@StarCat wait, v3 use the unstable CH340, could that be the reason why it actually worked? (could you check if you are using CH340 or CP2102)
@ShoutOutAndCalculate, please answer our doubts about soldering
@Juraj I tried multiple ones as mentioned in case 2, they were all working well, the tape is just to protect the circuit and, if you don't trusted it, I've used multiple pre soldered chips as well.
this long breadboards have the side rails for ground and power separated in the middle. has the module really common ground with NodeMcu?
@Juraj yes, see case 7 power supply. I tried multiple breadboard in case9 as well.
@ShoutOutAndCalculate, The NodeMCU (v3) I have been testing with has the CH340 (no problems with instability). But I can't think of any reason why this would make my MPU6050 work and yours not.
21:40
@StarCat I think that might be the reason, as I have attempted the rest, somehow CP2102 has nasty behavior with Wire library and i2c bus, I might try the one with CH340 later. but why cp2102 didn't work?
if it shows up when doing the i2c scan, it's your program code that's the problem.
@dandavis the code was standard wire library and worked very well on Arduino. I tried other scripts online(which supposed to be working, but did not) as well. I mentioned that in case 8 and case 6.

last day (15 days later) »