{"id":21943279,"url":"https://github.com/pskowronek/lightning-camera-trigger","last_synced_at":"2025-08-14T07:38:54.768Z","repository":{"id":164961747,"uuid":"317015232","full_name":"pskowronek/Lightning-camera-trigger","owner":"pskowronek","description":"Lightning camera trigger","archived":false,"fork":false,"pushed_at":"2025-04-21T22:32:58.000Z","size":11369,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T23:30:04.744Z","etag":null,"topics":["arduino","as3935","camera","canon","lightning","lightning-sensor","trigger"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pskowronek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-29T18:22:14.000Z","updated_at":"2025-04-21T22:33:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"11cd9856-03b4-4414-abb2-dfd497330acd","html_url":"https://github.com/pskowronek/Lightning-camera-trigger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pskowronek/Lightning-camera-trigger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pskowronek%2FLightning-camera-trigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pskowronek%2FLightning-camera-trigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pskowronek%2FLightning-camera-trigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pskowronek%2FLightning-camera-trigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pskowronek","download_url":"https://codeload.github.com/pskowronek/Lightning-camera-trigger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pskowronek%2FLightning-camera-trigger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266241102,"owners_count":23898065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","as3935","camera","canon","lightning","lightning-sensor","trigger"],"created_at":"2024-11-29T03:29:15.824Z","updated_at":"2025-07-21T04:34:30.300Z","avatar_url":"https://github.com/pskowronek.png","language":"JavaScript","readme":"_Language versions:_\\\n[![EN](https://github.com/pskowronek/Lightning-camera-trigger/raw/main/www/flags/lang-US.png)](https://github.com/pskowronek/Lightning-camera-trigger) \n[![PL](https://github.com/pskowronek/Lightning-camera-trigger/raw/main/www/flags/lang-PL.png)](https://translate.googleusercontent.com/translate_c?sl=en\u0026tl=pl\u0026u=https://github.com/pskowronek/Lightning-camera-trigger)\n[![DE](https://github.com/pskowronek/Lightning-camera-trigger/raw/main/www/flags/lang-DE.png)](https://translate.googleusercontent.com/translate_c?sl=en\u0026tl=de\u0026u=https://github.com/pskowronek/Lightning-camera-trigger)\n[![FR](https://github.com/pskowronek/Lightning-camera-trigger/raw/main/www/flags/lang-FR.png)](https://translate.googleusercontent.com/translate_c?sl=en\u0026tl=fr\u0026u=https://github.com/pskowronek/Lightning-camera-trigger)\n[![ES](https://github.com/pskowronek/Lightning-camera-trigger/raw/main/www/flags/lang-ES.png)](https://translate.googleusercontent.com/translate_c?sl=en\u0026tl=es\u0026u=https://github.com/pskowronek/Lightning-camera-trigger)\n\n# Lightning camera trigger\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png)](https://www.buymeacoffee.com/piosko)\n\nThis project is to automagically trigger the camera as soon as lightning occurs, as quick as possible.\nInternet says the average duration of lightning  visibility in the sky lasts for ~100-200ms, so it is enough to sense the lighting and trigger the camera.\nThere are two well known ways to sense the lightning, one is to trigger the camera when light suddenly changes, the other one is to sense for specific radio waves.\nThis project uses the latter one by employing the lightning sensor based on [AS3935](https://datasheetspdf.com/datasheet/AS3935.html) chip\nand [MA5532-AE](https://datasheetspdf.com/pdf/817096/Coilcraft/MA5532-AE/1) antenna - here a module [SEN0290](https://wiki.dfrobot.com/Gravity:%20Lightning%20Sensor%20SKU:%20SEN0290) by DFRobot Gravity\nhas been used, but there are other brands that produce similar modules (can be found on Ali, eBay etc - haven't tested them out, though).\nSince I own Canon DSLR all the camera wiring has been done for this particular manufacturer.\n\n**DISCLAIMER:** The module and the program haven't been tested in the field yet, now it is winter time and no lightnings. It's been tested with piezo lighters\nand other noisy devices, though. The module \u0026 software are able to properly notify about noisy environment etc, the question is how good it will be\ncatching lightnings!\n\nAwaiting spring - keep fingers crossed!\n\n## Functionality\n\nThe main functionality is to trigger the shutter when lightning occurs - this is being done by shortening wires of the camera's remote trigger cable.\nTo shorten the wires, the optocoupler is being used as it isolates the lightning detector from the camera itself (very safe solution).\n\nThe assembled project uses direct power input via Arduino mini USB. One can use Power Bank to power it up, the simpler the power bank the better - it must \nnot have low-current shut off, the power consumption is relatively low and on small power bank it should run more than 12hrs (the power usage could be\nlower by removing LEDs, turning off OLED, bypassing/removing voltage regulator on Nano and connecting 3.3V directly to Vin etc).\nTo display status, OLED screen is being used - to avoid burn-in, a simple counter measures have been employed by moving randomly the displayed text by 0-2 pixels around.\n\nProgram provides support for two tact-switch buttons:\n- Test button - to test the device. It simulates lighting interruption and engages the camera trigger\n(good for testing the whole thing when assembling, and on the field to check whether everything is connected as it should be). \n- In/Out button (that must be pressed first and while it is being pressed, the Test button pressed) - it changes the internal configuration\nof the sensor between indoor and outdoor use (a proper information on screen is displayed which mode is being currently set).\n\n\nThe screen displays the following information:\n- Sensing in progress\n- Disruptors in the vicinity \n- Noisy environment\n- Lightning occurrence along with distance (0-40 in km) and energy (0-100%) approximation\n- Number of lightnings sensed in the session\n- Current mode of operation (indoors/outdoors)\n- Whether Lightning Sensor has been properly initialized, states the error otherwise\n\n\n## Hardware\n\nList of parts you will need:\n- Arduino Nano or similar\n- Lightning Sensor with AS3935 (for example [SEN0290](https://wiki.dfrobot.com/Gravity:%20Lightning%20Sensor%20SKU:%20SEN0290) by DFRobot Gravity)\n- OLED display SSD1306 based (128x32 or similar, resolution can be reconfigured in the code if it sill uses SSD1306 library)\n- Optocoupler 4N24 or 4N26, or similar\n- a resistor (~460ohm)\n- 2x tact switch buttons\n- 3.5mm stereo socket (3 pole)\n- 3.5mm-\u003e2.5mm stereo (3 pole) cable (for Canon - for others manufactures refer to this [site](http://www.doc-diy.net/photo/remote_pinout/))\n- breadboard or proto board, connectors/wires etc\n\n## Software\n\nList of software/libraries you will need:\n- [Arduino IDE](https://www.arduino.cc/en/software)\n- [Lightning Sensor library](https://github.com/DFRobot/DFRobot_AS3935)\n- SSD1306 library (install it thru Arduino IDE as described [here](https://randomnerdtutorials.com/guide-for-oled-display-with-arduino/))\n\n## Schematics (wiring)\n\nThe schematic of wiring is quite simple, take a look here:\n![Schematics](https://github.com/pskowronek/Lightning-camera-trigger/raw/main/www/other/schematics.jpg)\n\n## Screenshots / Photos\n\n### Screenshots\n![Screenshots](https://github.com/pskowronek/Lightning-camera-trigger/raw/main/www/screenshots/lightning-demo.png)\n\n\n### Photos\n[![Assembled](https://github.com/pskowronek/Lightning-camera-trigger/raw/main/www/assembled/05.jpg)](https://pskowronek.github.io/Lightning-camera-trigger/www/assembled/index.html \"Photos of assembled Lightning camera trigger\")\n\nMore photos of the assembled Lightning Camera Trigger enclosed in a paper-clip box are [here](https://pskowronek.github.io/Lightning-camera-trigger/www/assembled/index.html \"Photos of assembled Lightning camera trigger\").\n\n## TODO \u0026 Gotchas\n\n- test it out during stormy seasons\n- the program may require tweaks\n  - proper calibration procedure (now it runs on default settings)\n  \n- the lightning sensor module\n  - must not be too close to Arduino or OLED\n  - far away from connectors/cables\n  - must not have metallic surface underneath\n  - requires stable and nicely filtered power supply, otherwise false alarms may occur, especially if arduino/oled is close by\n\n## License\n\nThe code is licensed under Apache License 2.0, pictures under Creative Commons BY-NC.\n\n## Authors\n\n- [Piotr Skowronek](https://github.com/pskowronek)\n","funding_links":["https://www.buymeacoffee.com/piosko"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpskowronek%2Flightning-camera-trigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpskowronek%2Flightning-camera-trigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpskowronek%2Flightning-camera-trigger/lists"}