Published in


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.

Arduino, ESP8266, PIC, PIC32 projects and other electronics stuff

Recommended from Medium

Using native library inside dynamic feature module: Part 3

How to Loop Backwards in Python

Using Feature Flags and Externalized configuration .NET Core app with Flagsmith

The Space Revolution You’ve Never Heard of but Should

AI Object Detection the Hard Way

DeepBrain Chain Progress Report #104 01.16–02.15(2022)

Android Notes 69 : How to place cursor position at the EditText?

My Journey to Programming

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Teodor Costăchioiu

Teodor Costăchioiu

More from Medium

“Ask App Not to Track”: Apple and User Privacy in the Era of Big Data

Copenhagen Postcards.

The Limits Of Medicine — Part 2 — Homogeneity Assumptions

Running week in review, Jan 24–30, 2022