CJMCU-AS3935 with ESP8266 (NodeMCU v3) via ESPHome – I2C device not detected

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!

Mmm… The nodemcu is not well in focus, but the wiring does not seems right to me.
VCC (5V) is the last pin of the row, an it seems it’s not in your picture.
SDA/SCL do not seem to be GPIO4/5 either.

Could be that the pinout of you ESP is different than standard, though.
A picture of the other side will clarify.

Likely not, but you should power it at 3.3V.
You need to connect SI to VCC for I2C.

Also, you have grounded SI.
According to the spec of the AS3935, that means SPI, not I²C

image

I connected en_v and vcc and si to 3.3V or 5V but still no i2c device is found

If you powered it at 5V with EN_V pin not high, you might have fried the chip.
But I don’t know if the pin has pull-up on your specific module.