Lightning on the Menu

Thread Starter

jpanhalt

Joined Jan 18, 2008
11,087
I have been playing with the AMS AS3935 "Franklin" lightning detector for a couple of Winters. Have a few analog detectors for 500 kHz, but for now, I am using one based on the old TA7642 AM detector. The lightning detector is basically the AS3935 with a few software mods. For now, the AS3935 is tuned to 500 +/- 1 kHz and the TA7642 is just dependent on the same antenna tuned to approximately 500 kHz.

My goal is to probe the secret algorithm used for distance calculation by the AS3935. Had our first lightning storm tonight, which is very weak, but I wanted to share some results.

Results for the AS3935 are reported in dec for distance in km and intensity in hex arbitrary units. I have not assigned any units to the TA 7642 detector yet.

First, this is the local storm just after the first strike shown below. The red circle = 10 miles (16 km):
upload_2018-4-3_17-15-25.png

As3935 = 20 km @ 0x68F5. TA7642 is this:

upload_2018-4-3_17-20-48.png

And here is an earlier strike intensity =0x1CA1 @ 5 km (same scope settings):

upload_2018-4-3_17-25-16.png

Any comments are welcome.

John
 
Last edited:

Raymond Genovese

Joined Mar 5, 2016
1,653
I have been playing with the AMS AS3935 ----/
Any comments are welcome.

John
I remember that chip and thought at the time that it looked pretty interesting, but never got one.

Have you seen her work https://github.com/evsc/ThunderAndLightning on this?

Just thinking out loud, but apparently the chip does some kind of pattern matching (looking for a lightning signature).

The figure comes from the cited github page and there, it is attributed to http://www.electronicproducts.com/S...gning_truly_portable_lightning_detectors.aspx but I can't see the figures in the link.


After that, I wonder if it is not some kind of relatively simple function that could be derived from curve fitting the results? That is, after detecting a signature, come up with a weighted average energy across the signature time. By fitting the resulting energy by distance function, you could determine the parameters.


Fig. from https://github.com/evsc/ThunderAndLightning

Also, I wonder if the chip could be used as a smart EM pulse detector...I mean, I guess that is what it is, but I mean for other uses in EMI.

Just musing over coffee - cool stuff :)
 
Last edited:

Thread Starter

jpanhalt

Joined Jan 18, 2008
11,087
I have pretty much memorized that pattern. All of that is in the datasheet or referenced therein. The "black magic" is calculating a distance estimate from a single point. Direction, as I understand it, can be done with crossed antennas (I have done that) or a single loop and sense antenna as is done with ADF. The crossed antennas suffer from 180° ambiguity, which is really not such an issue on the ground.

There are 51 user-accessible registers on the chip. The first 9 are for user control (e.g., setting noise level, masking disturbers, front-end gain, and so forth). The last 42 registers are a "lightning" look up table. I suspect distance is estimated in part from that table as well as intensity.

My code allows the user to modify any of those registers to the extent they are writeable (3 registers for intensity and the INT bit of register 0x03 are not writeable). Right now, the code is pretty crude, but I plan to post at least portions of it as I clean it up. Unfortunately, it is in Assembly, so that may not help many people. The detector chip is the 16F1829, and I am using the SPI interface. That chip is running out of pins, so my display is a relatively slow (19200 baud), 1-wire serial 4x20 LCD from Parallax. Still, it is workable. My real focus will be on the look-up table (LUT). It is now a single routine where the user can upload a new table. That is the only one of the 16 routines that requires re-programming. Everything else is just done using two pushbutton switches and an on-screen dialog.

I am hoping others are interested in probing the LUT. I plotted the values in the datasheet and think I see pattern. I posted a bit early hoping others have been down the same path and will share.

My current tools are the receiver described that gives an envelope, some op-amp-based receivers that resolve each peak (500 kHz), and a lightning emulator that pretty reproducibly causes an "event" for either close (1 to 2 km), intermediate range (6 to 8 km), or disturber. The emulator schematic is basically that shown in the datasheet, except I use a 12F1840 that has only a 5-bit DAC to drive the LED controller.

Regards,
John
 
Top