xDSL lightning defeat device

Make a device that automatically properly disconnects my line from the DSL modem when a thunderstorm approaches.

Similar projects worth following
Living in the countryside with a 4+ km DSL line thunderstorms kill about 1 modem, 1 firewall and some of my network every year. From the damage I have seen the spikes are at least 1kV.

I am going to ask you guys to help me out here because most of the hardware and the software i can cover myself, but I am struggling with finding the right kind of (cheap) relay that preferably would handle 5-10kV and still be friendly to the DSL signals.

The basic workings would be using a radio receiver and a microcontroller to detect near by ligthningstrikes, then disconnect the line from the DSL modem for a preset amount of time and possibly connect it to a sparkgap/exchangable varistor or maybe shorting it to ground even (input welcome).

I have found some interesting designs for relays online ( ie. see links) But I am suspecting the pricetag will scare me off anyways. An alternative would be some kind of mechanical disconnect driven by a motor or actuator of some kind.

Project contributors wanted and bright ideas as welcome, throw a comment!

I also do own a 3D-printer so if no viable relay options emerge I might build one from scratch.


Current running firmware. Might be final...

ino - 24.40 kB - 08/07/2016 at 15:12


Portable Network Graphics (PNG) - 1.50 kB - 05/23/2016 at 16:27


JPEG Image - 4.17 MB - 04/15/2016 at 16:35


JPEG Image - 4.25 MB - 04/15/2016 at 16:35


JPEG Image - 4.24 MB - 04/15/2016 at 16:35


View all 34 files

  • 1 × Attiny 84
  • 1 × ULN2803APG Discrete Semiconductors / Power Transistors and MOSFETs
  • 1 × Stepper motor

  • Device saved my modem yesterday too :D

    Non-ICE09/24/2016 at 16:02 0 comments

    A massive nasty thunderstorm blew by yesterday.
    Sparks were observed comingout of the mains wall outlets.
    All breakers with surgeprotection connected to them were tripped. Including the ground fault breaker.

    All in all a storm that guaranteed would have cost me at least a dead DSL-modem and probably parts of my network.

    Yesterdays damage report: zero damage.

  • More thunder == more project opportunities

    Non-ICE08/27/2016 at 20:58 0 comments

    So since the last log I've had another thunderstorm.

    It was 04:20 at night when I woke up to an amazing thunderstorm. After calibrating my biological sensory I finally got up
    and opened my DSL-saver locker. Only to discover indeed it had already disconnected. But I got alarmed by the fact that it appearantly had counted 0 (zero) strikes. I thought my firmware was broken. Waited a few more minutes. Next strike:
    Over a 160 pulses on the strike interrupt counter! ( read the source code) Now this kind of data can be used for something!
    This kind of data can be used to separate real strikes from static discharges and other electrical noise. All I need is more data. I feel I would really need to move to a really loaded part of the world to gather more data to use for a better firmware. Doing the same thing at my current location would just take too much time. I'm going to have to leave this post hanging just in the cause of not having enough data to rely on for a properly working firmware.

  • Progress

    Non-ICE08/06/2016 at 10:21 0 comments

    After the last blow I was kind of disappointed and almost about to give up. The modems ethernet ports all decided to die a few weeks later too. Luckily I had a new modem readily configured on standby.

    I'm not really sure how to put this.

    Today a slowly approaching thunderstorm came and I have positive identification on strikes about 10 miles (15km) out.
    I also recorded several disconnects that strikes might have been as far away as 40km.

    The reason this now suddenly works(better?) is that the other day I changed out my 40cm antenna with a 2m long antenna (0.75 mm2 single coppwerwire).
    Today it detected more than 24 strikes all more than 10km away.

    This now appears to be a bit too sensitive for its task, but since this is just my home line its better to be safe than sorry.
    This now being confirmed working will save me hundreds of $$$'s in modems and network gear in the coming years.
    Not to mention the grief of beeing without a DSL-line for days due to damage and modems in the snailmail.
    There might be an issue with the software where the reconnect timer is not being reset when new strikes are detected.
    I will have to do a code review on that.

    Finally one big thanks to the author of this detection circuit:
    also check out more of his awesome work at /

    Thank you so much!

  • First thunderstorm of the season.

    Non-ICE06/15/2016 at 19:25 0 comments

    ESD issues still haunting me.
    Box did disconnect like it should , but a little bit too late. (I lost one ethernet port on my DSL modem, but i have 3 left ;)
    That is probably because I should have attached a longer(better) antenna.

    Since I made this a modular design I can take the radio receiver board out of the box, and place it somewhere more appropriate for avoiding unintended ESD reception and attach a better antenna.

    updates will follow...

  • Murphys Law still valid.

    Non-ICE05/23/2016 at 16:26 0 comments

    I once read that if you finish a windmillbuild it will be no wind for 3 weeks.
    I am guessing the same thing goes for lightning detection devices.
    Last night it was forecasted a thunderstorm and at 9pm things were looking very promising.
    It was even heading in the right direction!
    Skip forward one hour and the ligtningstorm stops dead in the water 90 miles out...

    I'm throwing a small picture in the files from the lightningtracker at 10pm last night.

  • ESD issues

    Non-ICE05/01/2016 at 10:12 0 comments

    Over the past day or so I've had more unintended disconnects and every time someone either got off or sat down in my office chair. I will gladly accept comments on how to wire my chair to avoid ESD's that trigger my "borrowed" lightningdetector radio circuit ;)

  • some weeks of live testing results

    Non-ICE04/30/2016 at 13:32 0 comments

    I've been running this device live now for a few weeks, there has been no thunderstorms but I have had a few false positives.
    The DSL Modem Saver is wallmounted right next to my officechair. I am pretty sure I have nailed the false positives to being static discharges from my office chair. Every time a disconnect has happened someone have been sitting in the chair.

  • Live testing phase entered.

    Non-ICE04/15/2016 at 18:17 0 comments

    I put together the last few missing bits and pieces the other night and mounted it all in its place.
    I added some photos of the finished cabinet to the files.

    Now, the live testing phase have started i basically just wait for the next thunderstorm. The thunderstorm season is probably about 3 months away so this is going to be one long phase.

  • Stress and a dead phone

    Non-ICE04/09/2016 at 01:25 0 comments

    Last post i listed 3 tasks remaining..

    1. Build a PSU.
    2. Make casing and/or mounts for all the circuits.
    3. Software.

    Then project updates went silent, the good news now is, these 3 tasks have been accomplished. I built the PSU, connected all PCB's together. Debugged the software and hardware. Lots of testing of the hardware and software have been done, hit a few roadblocks but managed to get around them. And learned a few things along the way. Kinda buzzed out right now, but I will try and make a complete list of my major learning experiences:

    1. Somewhere along the line I decided to drop the ICSP. Fail!
    2. Make sure your battery is disconnected from Vcc when you try to charge it. (RIP one attiny84)
    3. 4xAA Ni-MH through a diode driving a big 4 Volt stepper is not enough. Next time this thing runs off a 12 Volts backupsourcebattery.
    4. Interrupt pins are not messing around a lot. They do stuff when stuff happens. Have total control over what happens.
    5. Don't start out a project with a maxed out I/O pincount, you will probably need more pins for stuff that shows up along the way(and you might want to add an LCD). If I were to choose a chip now I would have used an Atmega8.
    6. Make sure your mechanics are sturdy. In this project I ended up mounting stuff vertically and some flimsy parts did not like that. (then again I'm too lazy to make a new part :P). This problem however is a combination of mechanics and too low voltage battery backup.

    Anyways, a few weeks back my phone died, hence no photos and I'm too lazy to go downstairs and grabbing my DSLR.

    Status quo right now is the project is pretty damn near done. Almost everything is mounted in the box and tested working, with a few software modifications. The transformer rectified and capped with a 10kµF puts out about 8 volts which is perfect. Running the stepper off bad batteries is a bit iffy(missing steps). but solved through software.

    Anyway, stay tuned for more photos, videos and updated.

  • 3 tasks left on the project

    Non-ICE03/10/2016 at 16:39 0 comments

    First i want to share with you the source of the lightning detection circuit:

    There is three major tasks left to stitch project into a working unit.

    1. Build a PSU.
    2. Make casing and/or mounts for all the circuits.
    3. Software.

View all 21 project logs

Enjoy this project?



Peter James Davidowicz wrote 06/25/2016 at 16:59 point

You might wish to look into online lightning strike databases. There are free and paid-for commercial strike data providers used by insurance companies etc. Here's a free one

  Are you sure? yes | no

Non-ICE wrote 12/23/2017 at 01:47 point

Blitzortung has a pretty strict policy about using their data for commercial purposes, sadly...

  Are you sure? yes | no

Georgy wrote 02/20/2016 at 08:20 point

in 2000 worked with many stations that used modems and the main problem is that the station (PC, monitor, internal modem etc..) all were grounded. putting transformer on the mains give great results. also there is many existing products.. if you want to build something by yourself the main guidelines is to work the lightning down by putting elements that lower the voltage every time.. gas tubes, spark gaps.. and so on till the voltage in the range the modem or the outlet protector can handle it..  

  Are you sure? yes | no

Chris Thames wrote 02/15/2016 at 03:38 point

There are dozens of gadgets that can suppress transients on a DSL line and still permit the xDSL signal to pass. MOVs, avalanche diodes, gas tubes, etc. Inventing a device to detect thunderstorms and mechanically disconnect a line and reconnect it seems like over-engineering to fix an already-fixed problem.

  Are you sure? yes | no

modder_mike wrote 02/13/2016 at 14:46 point

You may want to look into Bourns TBU series transient suppressors.  When combined with gas discharge tubes and MOVs, you have a very high-speed, high-surge capable solution.  They even have a suggested application note for VDSL: .  I design devices protected to IEC 61000-4-5 surge at work, and we've used these devices to harden Ethernet with great success.

  Are you sure? yes | no

John Stockton wrote 02/11/2016 at 16:50 point

Plenty of examples around - I did a quick search for "transient protector circuit dsl" and came across many links.  One of them looked pretty maker-friendly - have a look.  Link:  The gas discharge tube is the first line of defense and is usually followed by MOV or other transient protector devices.

  Are you sure? yes | no

Non-ICE wrote 02/13/2016 at 00:55 point

I might very possibly build something like that to add an additional layer of safety.

  Are you sure? yes | no

John Stockton wrote 02/11/2016 at 13:19 point

There are a variety of arc tubes and even neon light bulbs that can absorb transients above 50 or 60V.  Evidently those living in some parts of Australia commonly have issues with lightning and have developed protective electronic modules to get around it.  It's less fun than building an electrostatic detection system and switch, but probably something that you can install and forget.  This problem has been solved already.

  Are you sure? yes | no

Non-ICE wrote 02/11/2016 at 15:49 point

I would really like to see the schematics for devices that can handle loads like that and do not degrade each strike.

  Are you sure? yes | no

Joe wrote 02/11/2016 at 11:07 point

have a look at they are mapping thunderstorms by a self designed hardware. 

  Are you sure? yes | no

Non-ICE wrote 02/11/2016 at 12:40 point

blitzortung is fine and all, but how will my device know when the storm has passed if its disconnected itself? I also have to mention that cell-coverage where I currently live is total crap.

  Are you sure? yes | no

Joe wrote 02/11/2016 at 16:40 point

At least you know when to disconnect. As you mentioned before. It would be helpfull if others had the same units so you could triangulate the strikes. But without knowing how to get the data things get stuck at this point.

Even while you are offline the device itsself is capable of telling if there was a strike - so perhaps looking for strikes per time means you could tell when trying to reconnect your line is fine.

Another thing to think about is: Would you even like it to reconnect automatically? First thing is saving your pricy equipment. This job ist done. If your router and firewall are dead the downtime compared to a downtime by intentional disconnect is bigger and costs a lot more. 

Also you could perhaps calculate the risk of upcoming strikes by using their network.

  Are you sure? yes | no

FrankenPC wrote 02/11/2016 at 10:56 point

You could also use two ball bearings and a solenoid to push the assembly up and roll the bearings away from the contact.  Additionally, another solenoid would  push a ground plane metal shield in between the bearings and the contacts.  

  Are you sure? yes | no

Non-ICE wrote 02/11/2016 at 12:46 point

I am adding ground close to the inlet contacts.

  Are you sure? yes | no

KingOfKYA(Travis K. ) wrote 02/11/2016 at 01:59 point

The part you really want to look for is called a VARISTOR. Put about 2+ of them on the line and they should absorb the spikes.

I woudl put  them connected between the phone lines as well as a few between earth and each phone wire(if your house or dsl has poor earth connection)

As far as relays your lookign for the spec Dielectric strength most standard ones can handel 1kv ish.

  Are you sure? yes | no

Non-ICE wrote 02/11/2016 at 12:53 point

Sounds like a good idea, however after very much error and money wasted on dead modems and firewalls this project is in the state of "Overkill is never wrong."

  Are you sure? yes | no

Non-ICE wrote 02/11/2016 at 12:56 point

"Overkill might still not be enough?"-state?

  Are you sure? yes | no

KingOfKYA(Travis K. ) wrote 02/12/2016 at 03:23 point

Yeah coudl be there cheap enofe $0.50. Gas discharge tube would also be a good idea in parelel with a mov due to its speed, its faster than a mov.

Also as a side note on your broken modems check to see if the MOVs on it are shorted as that is often the failure conditon. And they genewraly save the rest of the modem. blue disks near the rj11 (you can just remove them to test).

  Are you sure? yes | no

DeepSOIC wrote 10/27/2015 at 16:48 point


AFAIK dsl is pretty tolerant to poor wiring, so you probably will have little trouble installing any type of relay.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates