AS3935 to Wemos D1 Mini connection, w/ ESPHome

Hi.

I’m attempting to get my new AS3935 to work with a D1 Mini, using ESPHome’s SPI & AS3935_SPI modules.

The Wemos boots fine and firmware installed when no As3935 is connected. I’ve double-checked the connections and then wrote them down (below)to make sure I wasn’t mis-wired and I’m 98% sure I’m on track there.

If I remove the “CS” line, it boots up… but with everything connective, I get no response upon power-on or reset.

Connections are:

AS3935 - Wemos D1 Mini Wiring

AS3935 - wire - D1 Mini
-------------------------------
mosi - purple - d7 (GPIO13, MOSI)
miso - blue   - d6, (GPIO12, MISO)
sck  - green  - d5 (GPIO14, SCLK)
cs   - grey   - d8 (GPIO15, CS)
int  - red    - d1 (GPIO5)
3v3  - white  - 3v3,
gnd  - brown  - G

and the relevant ESP code is here:

spi:
#  clk_pin: D5
#  mosi_pin: D7
#  miso_pin: D6
  clk_pin: GPIO14
  mosi_pin: GPIO13
  miso_pin: GPIO12
  
  
as3935_spi:
#  cs_pin: D8
  cs_pin: GPIO15
#  irq_pin: D1
  irq_pin: GPIO5
  indoor: true
  noise_level: 2
  spike_rejection: 2
  # lightning threshold (default 5) can be: 1, 5, 9, or 16.  number of lightnings that must appear in a 15-minute time window before a lightning storm is detected
  lightning_threshold: 5
  mask_disturber: false
  div_ratio: 0
  capacitance: 0
  # watchdog threshold (default 2)
  watchdog_threshold: 1

Could this just be as simple as “it’s a bad board” ? Or is there something I need to invert for the CS line?

Thanks!

Hmmmm, have you managed to get the lightning sensor working with a different controller closer to what our hook-up guide suggests? An Arduino Uno board or similar should work.

Have you managed to get the SPI interface of the ESP8266 D1 mini working on a different device? I can’t really offer much in support on the product because we do not carry it, however, I do know that ESP devices can be a bit finicky to work with in general.

Let me know and we can go from there.

No, to both.

I have several D1’s hooked up to:

  • WLED lights

  • a PIR and Vibration sensor

  • a set of Load Cells

(unsure if the PIR and VIB talk SPI or not, though).

The only other controller I could try that’s not a D1 mini is an ESP32 board

Any other thoughts, @TS-John?

Hmnmm, I am stumped. Fill out a return ticket and we can send another lightning detector and see if that works.

https://www.sparkfun.com/returns

TS-John:
Hmnmm, I am stumped. Fill out a return ticket and we can send another lightning detector and see if that works.

https://www.sparkfun.com/returns

ok. it was an amazon order, so I'll RMA/replace thru them and try again in a week. Thanks!

Perfect. Let me know else we can be of assistance.

TS-John:
Perfect. Let me know else we can be of assistance.

hopefully i'll reply next week with "new one works" !