Idea: Lightning dection and power/rj45/rj11 disconnection


6 posts
by RiccardoMoretti » Sun Aug 11, 2013 7:37 am
Ok, so here's the idea,

I live in Johannesburg, during the summer months we get quite hectic lightning strikes,
Every day I physically disconnect my equipment, (out the wall socket) and RJ45/RJ11 (adsl) in an attempt to protect my equipment from lightning damage.
Simply disconnecting the wall switch I don't think is good enough as the distance between the contacts is so small that a nearby lightning strike would simply arc across, this would also apply to the contacts within a relay.

Enter the PI, so the "cheap Pi" could be my sacrificial lamb :-(, and here's what I though...

Firstly I could get the Pi to disconnect a relay that acts as a generic off switch for the equipment,
then I could get the Pi to drive a stepper motor that moves a tray where one side of the connectors are, Power network and phone,
the stepper motor would drive the tray and connectors physically from one another giving a much larger gap than a relay or switch could ever give. In the event of a nearby lightning strike, hopefully this gap would be big enough and allow the lightning to find another path to earth than via my equipment.
If I got hit, the Pi would die, but my equipment would stay safe.. a cheap replacement rather than my equipment.

Next I'd build a lightning detector circuit to detect nearby lightning activity, so that the process can happen automatically, in addition I'd have the Pi run off a battery so that if the power was off I'd still be safe...

What's your thoughts?

My one problem that I have thought of is that when the Pi re-connects the power via the stepper motor and re-connects the relay, if my equipment was previously on there would be a power surge going to the equipment, and I have no idea how to smooth that power. for instance if i insert the plug in the wall socket whilst everything is on I see a blue flash... dont know how I'd protect my equipment from that??
User avatar
Posts: 56
Joined: Fri May 25, 2012 5:33 am
by Burngate » Sun Aug 11, 2013 9:50 am
Interesting.

Not sure about the last bit - lightning detector and so-on. By the time you've detected a strike, it's probably too late.

That blue flash you (sometimes) see when you insert plug into socket. Partly, it's the speed at which you push in the plug - at first contact, there's high resistance which slowly reduces as you push it in, so (relatively) large power in a small space.
Also, it depends on the load. If it's essentially a discharged capacitor (and that's what a switch-mode power supply looks like) and you happen to connect at the peak of the mains waveform, then you've got a short circuit across the mains, so a large current flows, limited by the impedance of the mains.
For a motor, such as a fan or a fridge, or a transformer, such as a linear power supply, things are slightly weird. Since the load is essentially an inductor, the current is 90° out of phase with the voltage, so at 0v the current is maximum. If you happen to connect at the 0v point of the mains waveform, then you've got 0v and 0A at that point. Without going too deeply, you end up with a large DC current superimposed on the AC, which will saturate the transformer core and blow things up.
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 3051
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by Burngate » Sun Aug 11, 2013 9:58 am
One way to deal with the scenario where everything's already switched on when you apply power is to do what is done in places I've worked.

There's a box between the mains input and the sockets feeding the equipment, with a set of relays one for each socket, and a time delay that switches the sockets on one at a time, with a second or so delay between them.
No idea where to get one from.
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 3051
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by RiccardoMoretti » Sun Aug 11, 2013 11:55 am
Burngate wrote:One way to deal with the scenario where everything's already switched on when you apply power is to do what is done in places I've worked.

There's a box between the mains input and the sockets feeding the equipment, with a set of relays one for each socket, and a time delay that switches the sockets on one at a time, with a second or so delay between them.
No idea where to get one from.


:) Thanks!, that makes sense,
User avatar
Posts: 56
Joined: Fri May 25, 2012 5:33 am
by RiccardoMoretti » Thu Aug 29, 2013 8:19 pm
as for the lightning detection I found this break out kit which uses I2c
http://www.embeddedadventures.com/datasheets/MOD-1016_hw_v4_doc_v2.pdf
User avatar
Posts: 56
Joined: Fri May 25, 2012 5:33 am
by RiccardoMoretti » Thu Aug 29, 2013 8:34 pm
and someone was kind enough to put this on Git Hub
https://github.com/pcfens/RaspberryPi-AS3935/blob/master/lightning.py
User avatar
Posts: 56
Joined: Fri May 25, 2012 5:33 am