Hey everyone,
I’m trying to get the CJMCU-AS3935 lightning sensor working over I2C with my ESP8266 NodeMCU v3, using ESPHome. Unfortunately, the sensor isn’t being detected.
Here’s my current I2C configuration:
esphome:
name: "esphomehelloworld"
platform: ESP8266
board: nodemcuv2
i2c:
sda: GPIO4 # D2
scl: GPIO5 # D1
scan: true
id: bus_a
Problem:
ESPHome reports:
[I][i2c.arduino:072]: Scanning i2c bus for active devices...
[I][i2c.arduino:084]: Found no i2c devices!
What I’ve done so far:
- Initially (mistakenly) used D4 (GPIO2) and D5 (GPIO14) — switched now to the correct pins: GPIO4 (D2) for SDA and GPIO5 (D1) for SCL.
- The CJMCU-AS3935 is currently powered via 5V to VCC.
- I read that this module does not include level shifters and may not have onboard pull-up resistors.
My questions:
- Could powering VCC with 5V while using 3.3V I2C logic (from the ESP8266) have damaged the sensor’s I2C interface?
- Do I need to add external pull-up resistors (e.g. 4.7 kΩ) on SDA and SCL manually?
- Has anyone successfully used the CJMCU-AS3935 with ESPHome + ESP8266 over I2C?
- Is switching to SPI more reliable with this module?
I’ve double-checked the wiring and will attach a photo of my setup. Any help, tips, or working configs would be greatly appreciated!