Unable to use I2C sensors with ESP32-C3

jamesyoung
Posts: 1
Joined: Wed Aug 28, 2024 5:05 am

Unable to use I2C sensors with ESP32-C3

Postby jamesyoung » Wed Aug 28, 2024 5:13 am

Hello,

I am using an ESP32-C3 Super Mini board. I am unable to read from any attached I2C devices. I have connected them to a Raspberry Pi and they show up under i2cdetect and I can read and write from them with no issues. I have also tried an ESP32 board, and they work fine, however I cannot seem to make them work on the ESP32-C3 Super Mini. I have connected the sensor (PCT2075D) to pins 8 and 9 (SDA and SCL). I then ran a sketch pct2075_test.ino (https://raw.githubusercontent.com/adafr ... 5_test.ino) to test it, but it cannot see the sensor. I then tried running WireScan.ino (https://raw.githubusercontent.com/espre ... reScan.ino), and this also does not show any devices found. I connected my logic analyzer to the port, and it can see write activity from the ESP32-C3 Super Mini, but it does not show any devices connected. Attached is a screenshot of the capture. I have 3 of them, and none of them want to work with I2C. I have also tried different board options in Arduino, including Adafruit QT Py ESP32-C3, Geekble Mini ESP32-C3 and ESP32C3 Dev Module.

Any help would be greatly appreciated!
Attachments
Screenshot 2024-08-28 151123.png
Screenshot 2024-08-28 151123.png (189.82 KiB) Viewed 2071 times
Screenshot 2024-08-28 151134.png
Screenshot 2024-08-28 151134.png (250.32 KiB) Viewed 2071 times

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: Unable to use I2C sensors with ESP32-C3

Postby lbernstone » Wed Aug 28, 2024 4:06 pm

The esp32 is a 3V3 device. Make sure all your signals are at 3V3, and have pull up resistors also connected to 3V3. Note that pin9 is the boot pin, so the pull up must be weaker than the path through the boot button.

Soyrisha
Posts: 2
Joined: Wed Oct 02, 2024 4:52 pm

Re: Unable to use I2C sensors with ESP32-C3

Postby Soyrisha » Wed Oct 02, 2024 5:02 pm

This helped me:
ESP32C3 Dev Modul + Arduino IDE v.2.3.2
Menu >>> Tools >>> USB CDC On Boot: "Enabled", JTAG Adapter: "Integrated USB JTAG"

Soyrisha
Posts: 2
Joined: Wed Oct 02, 2024 4:52 pm

Re: Unable to use I2C sensors with ESP32-C3

Postby Soyrisha » Wed Oct 02, 2024 5:03 pm


tareq021
Posts: 1
Joined: Tue Nov 12, 2024 6:27 pm

Re: Unable to use I2C sensors with ESP32-C3

Postby tareq021 » Tue Nov 12, 2024 6:45 pm

1. ESP32-C3 Supermini does not need any external pull up resistor.
2. Connect Vin of I2C device with ESP's any pin (I used 6) and keep it HIGH in setup.
3. Connect PIN_9-> SDA, PIN_10-> SCL, avoid Pin 8.

Supermini's PIN 8 works on inverted logic (LOW means ON), for which it does not work if try to use as SDA.

I connected VL53L1X with Supermini using Arduino IDE 2.3.3, selected board MakerGo ESP32-C3 Supermini with the help of the library from Sparkfun.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 130 guests