Sunday, June 16, 2019

Arduino Based Lightning Detector

Moving to Colorado from Southern California resulted in huge changes to the "Radio Environment" I'm used to tinkering in. When we first came here, I talked to some local Hams about the effects of snow on antennas, and they all kind of chuckled and said "The wind will kill your antennas much faster than a snow/ice storm", which was change #1. We can get days of 40+ MPH winds with gusts to over 60MPH, so I adapted to the new wind loads, and beefed up all my mounting structures. We also get much more rain than in SoCal (DUH!), but that's easy to manage with proper weather proofing procedures, so no big change there.

And then we have the lightning, which didn't occur very often in SoCal, but can be a daily event here at certain times of the year. The NWS has charts of thunderstorm activity, and we historically get "60 Days" per year. We don't have as much lightning as SiliconGraybeard has where he lives, but we have enough that I think it's prudent to take some precautions.

Lightning protection is a complex subject, and I've worked at places that had extensive Perimeter Ground and Chemical ("Wet") Ground Systems installed, but that gets really expensive, and would involve tearing up the yard to install such a system. For a home-based Amateur Radio Station, it's nice, but not required.

I've gathered up most of the bits and pieces to provide a minimal (to me) amount of lightning protection, and that part of the station will be installed when I set the 4x4 posts for the permanent antennas. Each antenna will have an 8' ground rod at it's base, with a PolyPhaser Lightning Surge Protector mounted on the rod. The coax will come from the feedpoint, through the PolyPhaser, and on to the entrance panel mounted on the house wall. This should provide some protection from nearby strikes and induced surges, and the antennas will be disconnected and grounded when thunderstorm activity is in the area.

Like this, but with only a single Surge Protector per ground rod:


This probably wouldn't last more than a few tens of microseconds if it took a direct hit, but I have several 60'~70' trees in the immediate vicinity, and according to the "Cone of Protection" method, they should get hit first, and these will be for protection from induced surges.......I just hope they never "get used".

So even though I have some precautions taken, it would be nice to know if/when lightning is in the area. We had high-end lightning detection equipment at Boeing, so I knew equipment was available, but at what cost? Investigating further, I found there were several lightning detection methods in use, with the most common one being a glorified "Crystal Set" very broadly tuned in the 300kHz~500kHz range. There's a burst of wide-band radio energy during a lightning event, and the little "crystal radio" detects it, and then blinks a light or sounds a buzzer. Well, it turns out that there's now a complete lightning detection system on a chip, made by ams AG of Austria. It includes the circuitry for a 500kHz radio receiver, and some fancy Digital Signal Processing to discriminate real lightning from man-made noise. Pretty spiffy, and SwitchDocLabs sells a "kit" (here we go again.....) with a lightning sensor module, a display, a preprogrammed Arduino module, a piezo tweeter, a WiFi module, an "I2C-to-USB" module to commincate with and program the Arduino, and all the cables you need to plug it together.

Here it is up and running on the radio desk:


The three boards in front of the Arduino module are the lightning sensor, the tweeter, and the display.

This is the complete lightning sensor. The chip is about in the middle of the board, and the itty-bitty ferrite bar antenna is at the board edge, with a white sticker on it.



This is the Arduino board with the interface module plugged in.


Most of the time it just sits here displaying "Waiting For Lightning". When it detects a strike, it changes to "LIGHTNING!!", the backlight turns red, and a range estimate in kilometers is displayed.

So far, every time I heard thunder, the board had alerted a few seconds earlier, and when it's alerted and I didn't hear anything, the NWS radar indicated rain activity.

Looks good so far, but I want to read the datasheet 'between the lines', and see what other information I can get from the sensor other than "Event Detected" and "Estimated Range = xx km". At the very least, I need to be able to record and timestamp whatever it triggers on so I can merge that data with the data from the weather station.

Time to crack open the "Arduino for Dummies" book!

2 comments:

  1. Yeah, that's gonna be fun! :-)

    ReplyDelete
  2. Yeah, I'm not much of a coder, at least when it comes to writing code from scratch. At least all the code for this thing is Open Source, and usually well commented, so at least I have a valid starting point.

    ReplyDelete

Keep it civil, please....