VM211 Earth Listener - VMA343 Lightning sensor does not report any lightning

Hi @bert.test, @Pz83, @Guus.Assmann,

something we are going to test this weekend when there is lightning:

Change this part in the setup file:

// enable interrupt (hook IRQ pin to Arduino Uno/Mega interrupt to AS3935_IRQPIN → 19)
pinMode(AS3935_IRQPIN, INPUT_PULLUP); // See http://arduino.cc/en/Tutorial/DigitalPins
attachInterrupt(digitalPinToInterrupt(AS3935_IRQPIN), interruptFunction, RISING);

to:

// enable interrupt (hook IRQ pin to Arduino Uno/Mega interrupt to AS3935_IRQPIN → 18)
pinMode(AS3935_IRQPIN, INPUT); // See http://arduino.cc/en/Tutorial/DigitalPins
attachInterrupt(digitalPinToInterrupt(AS3935_IRQPIN), interruptFunction, CHANGE);

We are also working with another library to make sure we have the right feedback from the sensor.
Keep us posted about your findings!

Kind regards,
VEL342

Hi @VEL342 Pieter,

Good to see you are really supporting us. Thanks.

I wonder about the change you propose in the comment (OKE I know it’s just a comment…)

We simple hobbyists get confused about things like that :wink: But as I see it that is an improovement as the Lightning sensor is using IRQ-18

Will try to implement the change later this evening as the sky at the moment is turbulent. Far away some flashes are already visible and some rumbling can be heard

Kind regards,
Bert

@VEL342 Pieter how this change can help us?:slightly_smiling_face:

@bert.test In my place the sky is clear, it is hot around 30 C now, but the storm is not brewing up.

This is first time when I am really really waiting for the storm;)

Przemek The change Pieter proposes, changes the initialization of the sensor by telling the arduino how to handle the signals on the pins and wires to the sensor.
(Not that I 100% understand… :slight_smile: )

Local situation here: cloudy and some distant flashes have past far away.

I now have implemented the change Pieter proposed and running.

Maybe later tonight no…
Correction: maybe tomorrow a chance to trigger the lightning sensor.

Bert

@VEL342 Pieter , hypothetical question - if sensor is mounted outside the casting is it possibile that it loses connection during operating? For example when tipped off by something? I am asking because sometimes when I am turning on the station I get message that lightning sensor is not detected and then I have to check the wires and turn it on again.

@bert.test Current forecast for my town! Circles on the diagram in the second row indicate possibile thunderstorm.

Very interesting graphic, Przemek! Thanks.
My Polish does not go any further than “supermarket” :wink:
By the indication of KM for distance I assume there are quit some possibilities of Lightning triggers coming. (No looking at the wrong row…)

No possibilities around here today :frowning:
Bert

@bert.test
Here is the same version but in English and with legend of markings so You can identify what means what:)
Also You can go to the maps.meteo.pl website and it also has an English version😀

Thank you. So much info. (auto translated for me in English)

No thunderstorm today;-(

Hello @VEL342,
Unfortunatelly, I don’t have the schematics for the I/O board.
But I checked and the lightning sensor is really connected to pin 19 on my board.
I measured from the IRQ pin on the board, to a transistor. And from that transistor to the pin on the arduino.
So in my case, It would mix up pin 18 and 19, the IRQ for the sensor boards would be wrong. (Unless I made a mistake in the measurements, I checked the 2nd IRQ as well and came up on pin 18 and the other transistor.)
I could test by deliberately connecting pin 18 or 19 to GND to trigger an interrupt. Or trigger the IRQ pin on the I/O board.

@bert.test New forecast:

Soooooooooooooooo . . . .
Tomorrow after 5 in the afternoon.
Fingers crossed.

No heavy showers expected here on short notice…

Have a safe day,
Bert

@bert.test @VEL342
There is thunderstorm right now, but the sensor does not report any disturbances.
Code has been uploaded with changes and nothing…:frowning:
Station is placed on the window.
What could be wrong?

Nasty,

Let’s hope Pieter and colleagues have an update on the source and/or library to help us debug.

But obviously at this moment . . .

Bert

Hi all!

Just to be clear: the interrupt form the lightning sensor should go to pin 18 on the sensor board.
See https://manuals.velleman.eu/article.php?id=1163
@bert.test sorry for the confusion, the commends in the code indeed mentioned pin 19, but we have changed this in version 3.7 and that’s why I also changed that in the code here ;-).

The change in the code above was handling the interrupts of the sensor. It will now detect a change on rising or falling, so we are sure not to miss anything from the sensor. If you want to know more about this, check https://www.arduino.cc/en/Tutorial/DigitalPins.

@Pz83 If the sensor is mounted on the outside, we do not had issues with the wiring coming loose. But it’s always a good practice to double check the wiring. If you boot the EarthListener, you will have an overview if sensors are wired correctly, otherwise the screen will say “not found” or “error” at that sensor.

Kind regards,
VEL342

Hi all,

An update after a disappointing weekend without lightning :frowning: .
No lighting = no real lightning event testing, so our tests were limited to artificial generated lightning.
However, they did give us some insight about what is going on.

Here is what we tested:

This version (v3.7_2) is not officially released yet, but available for download via this link:
https://velleman.bitrix24.eu/~xiIi3

The test results remained the same: artificial lightning was detected by the new version 3.7_2 and the old version 3.4.

However, Sparkfun noted they had trouble with the I²C implementation of the sensor and are suggesting using the SPI interface instead. We are now investigating if the SPI interface is a more stable solution. The lightning sensor supports SPI, but it is difficult to connect when the screen and sensor board are in place.

We are waiting for the next round of lightning to have a clear view what is possible with version 3.7_2 and are investigating further. Please keep us posted about your findings as it is not possible for us to go storm chasing across Europe, looking for some lightning :wink: .

Since some of you asked for the datasheet of the chip, that can be found here: https://www.embeddedadventures.com/datasheets/AS3935_Datasheet_EN_v2.pdf

Kind regards,
VEL342

@VEL342 Pieter - just to be clear with wiring connections - IRQ on lightning sensor stays connected to I18 ?

How did You create the artificial lightning? Maybe I can check if my sensor detects artificial lightnings?

Maybe today we have another thunderstorm and there will be more lightnings.

I will keep You posted :slight_smile:

1 Like

Hi @Pz83,

Yes, lightning sensor stays connected to I18.

We use a spark lighter for a gas cooking stove, a mini tesla coil and a PlayingWithFusion Lightning “Generator” Shield to create artificial lightning sparks.

Works great, but keep in mind to remove your wallet from the testing area… Credit cards tend not to like electronic discharge :wink: .

Kind regards,
VEL342

Wow, @vel342 you have been busy!
Good to have the comments correct. No real confusion here.

Will download the 3v7_2 and give it a test.

Thanks for the datasheet.

@Pz83 The lightning sensor is mounted outside the box here.
No problems with wiring coming loose.
I left the jumpers on only one pin on the sensor, so they give some protection if the box is on his (her?) back.

Bert

@bert.test @VEL342 Guys, do I need to upgrade to 3.7 too? Where to get the update? I can’t see it on github.