I’ve just completed the prototype for my first AVR project. It’s a lightning activity monitor. The idea came from Tim Bitson. I built the sensor unit exactly as Tim describes. For the monitor unit, I used an ATMega8 programmed in C (WINAVR) instead of a Basic Stamp used in Tim’s unit.
The unit lights 1 to 8 LEDs to indicate the number of lightning strikes over the last 60 seconds. The LEDs are updated every 6 seconds. The monitor maintains a “high water mark” and flashes the LED corresponding to the highest strike count since power up.
I also added a 9th LED that is turned on when a strike is detected. This LED is turned off if no strike is detected after 1 second has elapsed.
According to Tim, the unit is capable of detecting lightning strikes greater than 50 miles away. My experience has confirmed this.
Tim’s unit used the Basic Stamp COUNT instruction to count lightning strikes during a 6-second period. I used an ATMega8 external interrupt that is more sensitive to nearby lightning strikes. I’m still in the process of fine tuning the sensitivity. This may take a while since our peak thunderstorm season is past.