Close

Resolving the ESP8266 I2C Issue

A project log for SPINES Mote

Self-Powered IoT Node for Environmental Sensing

macro-yauMacro Yau 07/23/2018 at 13:330 Comments

TL;DR: Bad soldering. A really dumb mistake that I haven't discovered it until observing an anomaly on the oscilloscope a week later.

Spent several more days on diagnosing the I2C issue with the ESP-WROOM-02 module. Finally, I managed to get access to an oscilloscope. I hooked up the SDA (CH1) and SCL (CH2) lines, and the root cause became obvious: The SDA line could not be driven low!

At this point, I was skeptic if the boot pins (i.e., IO0, IO2, and IO15) cannot be used as GPIO (and hence the bit-banging I2C), so I tried running a simple sketch to toggle IO2 (CH1) and IO15 (CH2) as shown below.

Obviously there was something wrong with IO2. I repeated the same experiments on an ESP-12F breakout board, and both the toggling and I2C (IO2 as SDA and IO14 as SCL) functioned flawlessly.

IO2's waveform tells that the firmware attempts to drive the pin low, but something resists strongly. Then I looked for a short between VCC and SDA. Bingo.

Fixed the short, and got the BME280 and VEML6075 sensors working. After all, I could not trace the origin of the short, but my bet is on some tiny DFN or LGA pads...

Discussions