Lightning activated shutter trigger using Thunder click
An extreme heat wave has taken reign over Europe. With day temperatures over 39 degrees Celsius, and nights over 20 degrees, in many cities all-time weather records were shattered. Now, the weather service has no good news: it’s gonna cool down, but violent thunderstorms are expected.
Time to start working on my next project: a lightning activated shutter trigger. I already have all the needed hardware from previous projects: one Arduino Uno, one Click shield, one Thunder click board and one Relay click board. The thunder click is configured for 5V operation and is set in socket #1, while the relay click is is socket #2 of the click shield.
As for the software, the project is in many ways similar to the AS3935 Lightning detection using Arduino Uno project, so most explanations given there apply on this project too. Also, don’t forget to install the AS3935 Arduino library as a prerequisite.
The major change is in the interrupt service routine: now, when an interrupt is detected, we disable first any other incoming AS3935 interrupts. We then read the content of register REG0x03[3:0] to determine if there is lightning. Noise and disturbers are ignored. In case of lightning, we read the distance to the lightning event from register REG0x07[5:0]. If the storm is too close, the code turns on relay #2 and enters an infinite loop. This is set as a reminder for the photographer to take shelter.
If the distance is too great, there is no point to take pictures.
If we are in the good distance range, we issue a 250 ms pulse for the trigger, then we wait for the post_trigger delay.
After all this, we re-enable the AS3935 interrupt. If there were any events during the time we were busy taking pictures, the INT pin will remain high. As the AS3935 is triggered on the rising edge, we need to reset the INT pin to 0. This is done by issuing the AS3935.interruptSource() command.
The chance to be hit by lightning is normally very low. According to this post, the odds of being struck by lightning over your entire life is 1/15,300. However, this applies to the average person. Staying in an exposed area, with the camera on a tripod waiting to capture the perfect thunderbolt, it’s like asking for trouble. Take appropriate measures to protect yourself during thunderstorms. Some nature photographers I spoke don’t even think to expose themselves while taking storm pictures. Instead, they prefer the safety of their cars, and they move away when the storm is too close. Digital-photography-school.com gives a few good advice on how to make good lightning photos: link1 and link2.
While I designed this project as a lightning trigger, with some minor changes in the code this can work as a lightning alarm too. One can use relay #1 to give an early warning, and relay #2 to issue a second proximity alarm.
[Update December 16, 2019] In the meantime I stopped using this trigger and I switched to Pluto Trigger, which is able to act as lightning activated shutter trigger and has many other functions, such as noise trigger and laser trigger.