This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lightning Detector
#1
Has anyone tried to interface one of those AS3935 lightning detector devices to Open Plotter/Signal K? 

I've been using them with Arduinos but since they can communicate via SPI or I2C I don't see any reason you couldn't interface with a Raspi or even make a wireless module with an ESP32 although the libraries I have are for Arduino (Tested and 2 devices functional) and a python script for the Raspi. (I haven't tested it yet) They basically send a warning signal, number of strikes and approximate distance although they seem to try to track the distance to the storm's front edge rather than the distance of the actual strike which technically is better because that's where the closest potential for lightning would be. Max distance is 40 km or 25 miles although I've checked mine against some online lightning maps and got hits a little further than that

If not would anyone be interested in something like that? It should be easy to set it up to trigger a warning and send to a dashboard to log strikes and distance. I could document it if there is interest although I can't guarantee when exactly I'd finish it but likely before May or June

A couple of places that sell them are

http://www.playingwithfusion.com/product...hp?pdid=22   Playing With Fusion

http://www.embeddedadventures.com/as3935...-1016.html    Embedded Adventures <----- This is the one I've used
Reply
#2
Interesting suggestion! I could envisage a "ESP32-WiFi-bluetooth battery" based solution to be rather useful. Would send a mqtt message to OP but what then?
Just triggering an alarm? Or is the AS3935 also providing directional information.

Definitely worth further investigation.
Reply
#3
Knowing there was lighting somewhere, and at what distance, would be useful, but I'd really like to know which direction it is.
Reply
#4
(2018-03-07, 05:10 PM)abarrow Wrote: Knowing there was lighting somewhere, and at what distance, would be useful, but I'd really like to know which direction it is.

Unfortunately to do something like that you would need a minimum of 3 stations more advanced with directional antenna send the data via the Internet and triangulate them.  But if you have internet access already a far cheaper solution is to use a website like blitzortung.org or lightningmaps.org or one of the various national services The people that contribute to these networks usually have homemade system from a partial kit but are land based although they have a much larger range. Most are essentially radios tuned below the AM band at around 400 kHz. As far as I know there isn't even a professional lightning detection device that's directional in stand alone use and all are networked in some way

Now what you could do because no one wants to waste data with 24/7 monitoring of a website would be to use an AS3935 to alert you lightning is in the area and then you could go check either of these websites for exact location although it's mostly coastal coverage other than around east of Australia, the Caribbean and the Mediterranean

(2018-03-07, 07:55 AM)SkipperEarly Wrote: Interesting suggestion! I could envisage a "ESP32-WiFi-bluetooth battery" based solution to be rather useful. Would send a mqtt message to OP but what then?
Just triggering an alarm? Or is the AS3935 also providing directional information.

Definitely worth further investigation.

It basically sends an alert, distance and counts lightning strikes and sends it as text data. One I built is a portable unit with Arduino Pro Mini and a Nokia 5110 display  and when it senses a strikes it flashes the backlight and shows you the number of strikes since you turned it on and the approximate distance of the last strike. The other one is hooked to an Arduino Nano and I plug it into my computer's USB port and it sends the data to CoolTerm which adds a time stamp and logs the distance to a file. You can also use the serial monitor in the Arduino IDE. The device just sends a detection pulse/signal and a distance number in km and the Arduino code formats it into a sentence and/or converts to miles and keeps a running count.  I'd probably do it with a Pro Mini or a Nano and add an ESP 8266 to it to send the data unless I come across a Library for the ESP32 ..... I can hack together some boilerplate code and usually make things work but writing a Library is a bit above my skill level, I'm a hardware guy. I'm still reading the docs on Signal K but it shouldn't be a problem to format the data into something SK can use, in fact it looks like it would be pretty straight forward

The output of the CoolTerm log looks like this: (This was a pretty active storm and that's just 2 minutes of data) 

2017-07-21 18:46:48 Lightning detected 17 kilometers away.

2017-07-21 18:46:50 Lightning detected 17 kilometers away.

2017-07-21 18:46:59 Lightning detected 17 kilometers away.

2017-07-21 18:47:03 Lightning detected 17 kilometers away.

2017-07-21 18:47:03 Lightning detected 17 kilometers away.

2017-07-21 18:47:05 Lightning detected 14 kilometers away.

2017-07-21 18:47:10 Lightning detected 12 kilometers away.

2017-07-21 18:47:16 Lightning detected 12 kilometers away.

2017-07-21 18:47:21 Lightning detected 5 kilometers away.

2017-07-21 18:47:21 Lightning detected 5 kilometers away.

2017-07-21 18:47:32 Lightning detected 5 kilometers away.

2017-07-21 18:47:38 Lightning detected 5 kilometers away.

2017-07-21 18:47:39 Lightning detected 5 kilometers away.

2017-07-21 18:47:45 Lightning detected 5 kilometers away.

2017-07-21 18:47:48 Lightning detected 5 kilometers away.

2017-07-21 18:47:51 Lightning detected 5 kilometers away.

2017-07-21 18:47:51 Lightning detected 5 kilometers away.

2017-07-21 18:47:57 Lightning detected 5 kilometers away.

2017-07-21 18:48:02 Lightning detected 5 kilometers away.

2017-07-21 18:48:03 Lightning detected 5 kilometers away.

2017-07-21 18:48:06 Lightning detected 5 kilometers away.

2017-07-21 18:48:13 Lightning detected 5 kilometers away.

2017-07-21 18:48:24 Lightning detected 5 kilometers away.

2017-07-21 18:48:28 Lightning detected 5 kilometers away.

2017-07-21 18:48:34 Lightning detected 5 kilometers away.

2017-07-21 18:48:41 Lightning detected 5 kilometers away.

2017-07-21 18:48:43 Lightning detected 5 kilometers away.

2017-07-21 18:48:45 Lightning detected 5 kilometers away.

2017-07-21 18:48:48 Lightning detected 5 kilometers away.
Reply
#5
My portable unit is a slightly modified version of this

http://www.instructables.com/id/Arduino-...-Detector/

This page describes how it works and has some links to additional information although some of the stuff on calibration is wrong and the disturber info can be filtered out since it is unnecessary IMO

http://www.oss.io/p/evsc/ThunderAndLightning
Reply
#6
I almost forgot, I came across a no solder kit for the Raspi that includes a 2x16 LCD and a HAT for as Pi that's for IoT applications which is pretty much what Signal K is and shouldn't be too hard to adapt the example code. These aren't real picky about placement and you can adjust the sensitivity so you could even mount the detector in a cabin. (The example output was done in my basement) You'd have to come up with your own enclosure though if you don't have access to a 3D printer

https://shop.switchdoc.com/products/rasp...tector-kit

They also have a lot of stuff for building your own weather station, sensors and I2C hubs that may be of interest and also sell on Amazon Prime but for US only
Reply
#7
(2018-03-08, 02:23 AM)longjohn119 Wrote: Unfortunately to do something like that you would need a minimum of 3 stations more advanced with directional antenna send the data via the Internet and triangulate them. 
I was thinking more just direction and distance, which could be done with four antennas for direction, and the sensor's own distance sensor. You just detect the small phase difference in the received spike from the lightning on the four antennas, and you would have your direction. If this is really being used on a cruising boat, you don't need all that much accuracy, as typically it's not that hard to see where the thunderstorms are forming.
Reply
#8
i can get direction and distance pretty accurately with my bio sensors "eyes ears" ..
Reply
#9
I'm fishing inland on the Mississippi River and one warm night I had a storm sneak up on me mainly because the weather forecast had a 10% chance of rain so I wasn't checking weather radio channels on my Marine band radio. By the time I got my poles in and the anchors up it was right along side me but luckily stayed on the Illinois side but it was only a mile or so away for the entire 3 mile ride up river running parallel to me all the way. By the time I had the boat trailered it was gone and there wasn't a cloud in the sky and the wind was dead still. That's when I started experimenting with lightning detector circuits

I don't mind getting wet but I am quite adverse to having several thousand volts of electricity coursing through my body ....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)