I am trying my hand at building a smart watch from scratch. I just got the latest PCBs delivered and upon soldering everything I found that the TTGO micro-32, essentially an ESP32, cannot detect any of the sensors over I2C. (The linked datasheet is the most detailed one I can find). I currently have 4.7 kΩ pull-up resistors tying SCL and SDA to 3.3 V which is also the operating voltage of the TTGO.
However, I initially tried 1 kΩ pull-up resistors with no success either. I also tried removing the pull-up resistors completely because I figured the TTGO probably had internal pull-ups like the ESP32, but that did not work.
The sensors I am using are the BME680, MCP79402T-I/MS (RTC), and ADXL345BCCZ-RL7 (Accelerometer).
Below is the schematic for the design:
I found the TTGO cannot detect the sensors by running this I2C scanner code within the Arduino compiler:
#include <Arduino.h>
#include <Wire.h>
void setup()
{
Wire.begin(21, 22);
Serial.begin(115200);
while (!Serial);
Serial.println("\nI2C Scanner");
}
void loop()
{
byte error, address;
int nDevices;
Serial.println("Scanning...");
nDevices = 0;
for(address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address<16)
Serial.print("0");
Serial.print(address,HEX);
Serial.println(" !");
nDevices++;
}
else if (error==4)
{
Serial.print("Unknown error at address 0x");
if (address<16)
Serial.print("0");
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
delay(5000); // wait 5 seconds for next scan
}
Here is where it gets confusing though. Before I designed this board, I created a breakout board for the TTGO micro-32 and wired a 128x64 OLED module to it via I2C.
I ran the same code on the breakout board to find the I2C address of the screen and it worked. For reference, on the breakout I did not use any pull-up resistor because from the best I can tell the screen has 4.7 kΩ pull-ups on it already. I have no idea what the problem could be since from the best I can tell my schematic matches the datasheets and it isn't a software issue.