Why does it spark when I push a plug in the electrical socket?

When I slowly push a plug into the electrical socket I can often see sparks. Can anybody explain why? Can this be possibly harmful for the devices I plug in?

-
I remember talking about this in my electromagnetics class. The professor also showed how/why you are much more likely to see a spark when you unplug something than when you plug it in. – AdamRedwine May 10 '12 at 11:38

First of all, an electric spark is moving of the electric charge through the air. This is somehow curious, as air itself is an electric insulator and does not conduct charges. However, when the electric field in air exceeds certain value, air gets ionized and highly conductive, enabling the movement of the charge.

The next step to understand is why we get high electric fields. This is obvious from the expression for the electric field, which is

$$E = \frac{\Delta V}{d},$$

where $\Delta V$ is potential difference, and $d$ is distance. In Europe, you have typically 220 V potential difference in socket, and as you closing those two different potentials, thus reducing distance between them, you are getting larger and larger fields, until at some time air gets ionized and conductive.

In principle, every time you plug in a device, you bring these two different potentials close together, so I think every time you plug in a device, you create a spark. However, for purely resisitive devices, if the resistance of the device is large enough, the current will be small enough, so you won't see or hear the spark. If you however have a powerful device like boiler (these have small internal resistance), the current of the spark shall be large, and you shall observe the effect.

Most devices have capacitors and inductors and that too influence the spark currents. In case when capacitor with large capacitance is directly linked to plug connectors, you expect huge currents trying to fill capacitor as fast as possible and due to large charge required, this can mean large spark. On the other hand, inductors with large inductance inhibit large currents by creating back-voltage.

The only thing that can pose danger to your device is currents through it being too high, which creates huge Joule heating, which can destroy components. However, internal resistance and inductance of the device limit those currents to an acceptable value.

The exception to the rule are electric motors. A rule of the thumb is that when at rest, electric motor has a very small internal resistance. For example, if you block the motor movement while making a connection, the huge currents can simply destroy it by melting the wires within it. However, in normal usage the motor is not blocked and starts moving moving very soon, so all he gets is a short Joule heating shock. There is all science of how to make this short but possibly dangerous shock as small as possible for large powerful electric motors, which however I am not very knowledgeable at.

-
you must mean "if you block the motor movement while making a connection". I would edit after "that can.." "the sparking can simply destroy...". and after "However" insert " in normal usage the motor is not blocked and starts moving..." – anna v May 10 '12 at 6:25
Thanks for this great explanation! – Martin Thoma May 10 '12 at 6:26
@annav Thanks for pointing up improvements to the text. – Pygmalion May 10 '12 at 6:29
Instead of resistance, think capacitance and inductance. If the front end of the device is inductive, the current is initially zero and ramps up linearly, so no spark. However, if there's a capacitor across the input terminals, a spike of current flows to charge the cap, and you get a spark. – Art Brown May 10 '12 at 7:33
@ArtBrown I am aware of the fact that the detailed answer requires considering impendance instead of pure resistance. However, I think in principle spark is inevitable, even for pure resistance. Also, capacitors are much more imporant than inductors as for most real inductors $\omega L \ll R$. I shall expand my answer to attend this details. – Pygmalion May 10 '12 at 7:53