SparkFun Lightning Detector - AS3935 - Radio interference from ESP32 SPI bus - how to overcome?

I am running a SparkFun Lightning Detector - AS393527 SEN-15441, connected to a SparkFun Thing Plus - ESP32 WROOM (USB-C) WRL-20168.

The SPI bus (VSPI) is connected to and successfully talking with the AS3935 board. VSPI is also connected to and talking with the ESP32 on-board SD card (so I can datalog lightning strikes). I set up WiFi to set the time (NTP). Data is logged with Unix time stamps. I also connected the VSPI bus to a small TFT display. All features work as intended, except that I have proven (through process of elimination) that whenever the ESP32 sends data out the VSPI MOSI pin for the SD-Card or the TFT display it results in many disturbers and/or false lighting strikes. If I remove the SD-card and TFT code I get zero distrubers or false strikes. I changed VSPI bus speed in case it was a harmonic sending noise up the line or via RFI. I tried moving the TFT onto the HSPI bus but it made no difference. I attempted to move the AS3935 onto the HSPI bus (so does not share with SD card SPI) but could find find in the SparkFun_AS3935_Lightning_Detector_Arduino_Library how to redesignate SPI Pins. Attached has notes in header of exhaustive testing done.

How can I overcome the SPI-caused interference?

Any help or insights would be most welcome!

Franklin_Lightning_Detector_Nick_R46a_20240429.ino.txt (53.7 KB)

That is an impressive sitrep!

Create an issue in the github here https://github.com/sparkfun/SparkFun_AS … ary/issues with the same info to alert the engineering team

Thanks TS-Russell

The link seems to take me to the SparkFun Forums page, not a Github page on which to post? I might be missing something obvious?

cheers

Nick

I mis-pasted it, the link above has now corrected (https://github.com/sparkfun/SparkFun_AS … ary/issues)

I’m not super familiar with that module, but is anything interconnected with cabling? Lightning detectors, in my experience, are notoriously vulnerable to any RFI or high electric fields. I’ve experimented (years ago) with commercial units out on a golf course, where they would be VERY handy. Problem was, every time you touched the accelerator pedal on the electric golf cart, the detector would go nuts… so, very much not useful there.

Having said that - any cables should be bypassed with capacitors or wound through a toroid. That would be a start.

Thanks ka2irq

Most interesting. This senstitivity matches what I am seeing. I am thinking about merits of connecting only the AS3935 to one control board (say a RasPi Pico or similar) to receive data from the AS3935 and a second control board (the ESP32 Sparkfun board) to run the SD card, TFT display, RGB LED etc. I would need to use opto-isolators I think on the serial link between the Pico and ESP32 UARTS.

TS-Russell:
I mis-pasted it, the link above has now corrected (https://github.com/sparkfun/SparkFun_AS … ary/issues)

Much appreciated - Done!