Protect your electronics from lightning strikes


Adding the lighting detector to the solar-powered WeatherPi turned out to be quite straightforward in terms of software and wiring, but the real key to making it work was placing the sensor away from all the other electronics.

My next project, a solar-powered semi-autonomous robot called SunRover, will also use this sensor. I will mount it in a pylon that is far away from the three computers and especially away from the Raspberry Pi 2 that is the main brain of the robot.

* * * SwitchDoc Note

Not surprisingly, the AS3935 IC is very sensitive to radio frequency interference (RFI) sources. If you have your device next to a monitor, it will not work well. If you have it next to a cell phone, it will not work well. As you will see, I had to mount the detector well away from the Raspberry Pi and Solar Power Controller to get it to work well.


  1. MOD-1016 lightning sensor:
  2. WeatherPiArduino:
  3. Project Curacao:
  4. SunAirPlus:
  5. "SwitchDoc Labs: Watchdog Timer" by John Shovic, Raspberry Pi Geek, issue 09, 2015, pg. 86
  6. WeatherRack weather sensors:
  7. BUD NEMA box:
  8. Solar panels:
  9. USB PowerControl:
  10. Mux breakout board:
  11. WatchDog timer:
  12. WeatherPiArduino:
  13. Real-time clock module:
  14. Temperature and humidity module:
  15. Eight-pin plug:
  16. Screw terminal block strip:
  17. RasPiConnect:
  18. "WeatherArduino" by John C. Shovic, Raspberry Pi Geek, issue 07, 2014, pg. 62
  19. "Design/Build Process" by John C. Shovic, Raspberry Pi Geek, issue 11, 2015, pg. 64
  20. Mux board test program:
  21. INA3221 test program:
  22. "Solar Power Management" by John C. Shovic, Raspberry Pi Geek, issue 10, 2015, pg. 32
  23. OpenSCAD files for bracket and sun cover:
  24. OpenSCAD files for pylon:
  25. WeatherPi software:
  26. Installing MySQL:
  27. Graphing subsystem:
  28. AS3935 software:
  29. Franklin lightning sensor demo kit by ams:

Buy this article as PDF

Express-Checkout as PDF

Pages: 8

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content