The objective of this project is to allow my contextual smart home to know if there is lightning in proximity. This is then additional useful context that might be useful in the event of a power cut. It also allows my Home Control System to send me notifications, to warn me of approaching lightning. Knowing this I may bring things in from outside in the garden, that I wouldn't want to get wet in the rain.
A few things to note about my PCB design:
The use of a 4-way Molex connector means I can simply plug this board into a Smartisant 8-channel IO Board IO1. This provides the required 5V power and connects the board output to an Arduino input pin.
The Smartisant 8-channel IO Board IO1 connects to either my Smartisant Arduino Shield SHLD1 or the Smartisant Arduino header board via the 10-Way DIL connector (both smart home building blocks) but, I'm using the 10-Way shrouded header on the Smartisant Arduino Shield SHLD1 because this exposes Arduino pins 2 to 9. I need to use either pin 2 or pin 3 as they can be used with interrupts.
The output pulse from the lightning circuit are fairly long and if all the Arduino was doing was checking this pin, then I'm sure it would be fine. But most of the Arduinos I'm using are doing many things and this includes the Arduino in my 'Weather Station', so using interrupts ensures that no pulses will be missed.
I basically used the above circuit and put it into Autodesk Eagle, to design a PCB that would easily connect to my smart home using a 4-way Molex connector.
I had to order a minimum of 5 of these PCBs, so I have a few spares. I then built one up using the right components, so that I could test it.
The first thing to say about lightning sensor testing is that it is difficult! You obviously need lightning to be sure it is working correctly. There are some good real-time maps of lightning strike around the world and I used this one to validate that I wasn't getting false readings.
Initial testing worked really well using a battery and white LED, with a 1 metre aerial lead. Sensitivity was really quite good and it would pick up strikes over 20 miles away. There were no false triggers. I also tried a small 5V buzzer, which 'beeps' on each strike.
The use of a buzzer is really handy because I can hear the infrequent lightning strikes and then check the live lightning map to see how far away they are. I had one example that was a single strike 27.3 miles away.
Lightning can occur quite frequently and there are often several strikes (and associated pulses) in close succession. I wouldn't want to report every single one back to my Home Control System but I am interested in how many strikes have occurred in (for example) a 60 second window. I'm currently investigating the best way for the Arduino to capture this information and report it back to my contextual smart home.
My current thinking is something along these lines:
I see that Techlib now have a new lightning circuit design.
My @smartest_home has a lightning detection sensor and will tweet when it is detected after a while.
It will also track the frequency of lightning strikes and tweet about the frequency occasionally.