I have a problem getting my AS3935 to work with I2C… I think my wiring is wrong since it says that it can’t find any devices and I couldn’t find a clear guide with the NodeMCU ESP8266…
I have one of these too but I haven’t seen it actually do anything yet. Unlike your ‘Found no i2c devices!’ message, I can see it detected in my ESPHome logs on address 0x03.
[22:48:47][I][i2c:033]: Scanning i2c bus for active devices...
[22:48:47][I][i2c:040]: Found i2c device at address 0x03
[22:48:47][I][i2c:040]: Found i2c device at address 0x48
[22:48:47][I][i2c:040]: Found i2c device at address 0x76
You may want to explicitly define your i2c bus with scan: true, like this:
I’m nit picking about this but your 3.3V supply is hooked to the negative bus. You need to send SI to VDD to tell it that you want i2c mode. but it looks like you figured that out.
I didn’t tie EN_V, A0, nor A1 to VDD like you did. I let them all float. I’m pretty sure that 0x3 is the default unless you start tying A0 and/or A1 to VDD. And you shouldn’t need the voltage regulator if your running 3.3V supply.
If you’re new to this (like I am), you might want to read the datasheet – page 14 has some juicy details.
I still don’t know if mine is working because we don’t get thunderstorms that much around here. So far the HA display has always looked like this:
Well I did have some progress, I soldered the stupid pins on, and now it picks it up in the lgos
I was under the impression that I could just push the pins in, but apparently that’s not enough.
Logs:
[10:45:51][C][i2c:028]: I2C Bus:
[10:45:51][C][i2c:029]: SDA Pin: GPIO4
[10:45:51][C][i2c:030]: SCL Pin: GPIO5
[10:45:51][C][i2c:031]: Frequency: 50000 Hz
[10:45:51][I][i2c:033]: Scanning i2c bus for active devices...
[10:45:51][I][i2c:040]: Found i2c device at address 0x02
[10:45:52][C][as3935:027]: AS3935:
[10:45:52][C][as3935:028]: Interrupt Pin: GPIO13 (Mode: INPUT)
[10:45:52][C][as3935_i2c:036]: Address: 0x03
Yeah, I tried the clicker lighter things (multiple and at the same time) and randomly my electric toothbrush and I wasn’t able to make it register. I’m just waiting for a storm so I can see if it does anything.
Interesting - and disappointing - to see that this sensor doesn’t work for others either.
Initially I connected mine via I2C, but didn’t get any values reported even during heavy thunderstorms. Then I connected it via SPI, and got some results, but primarily log messages telling me to change either the noise_level or spike_rejection parameters. Distance or storm alert never reported any values, and lightning energy occasionally reports a value during a thunderstorm.
You can see if there are any detectors nearby by going to the project area / station list menu at the top of the page and sorting your region by the country column.
This sensor is used in the Weatherflow weather stations, and the discussions around Lightning are frequent on their forums - mostly false detections.
For my part, I have two of their devices in my garden, one mounted horizontally, and one vertically right next to each other.
The horizontal one only detects a few strikes, usually legitimate ones. The vertical one detects many, many more on a daily basis, all false, just electrical interference from other sources (lights, compressors etc), so siting etc is pretty important.
Having had mine in operation for several years (and we by no means get a lot of storms), it does seem fairly usable to detect a storm and indicate it is moving towards us or away, once you have it well sited.
Don’t mean to detract from what you guys are doing, but thought you might be interested in some other perspectives from a commercial product using it. Its still good fun to watch and play around with - even though I have two (3 if I include the one indoors), I’m still tempted to have a play with these components and do a DIY one for fun too