# short circuit with two power supplies

I have a radio controlled power switch (one that you plug in between the wall and a lamp to switch it on and off with a remote), that has an atmel microcontroller on it. I connected the radio switch to an atmel programmer (Gnd, Vcc(3.3v), Miso, Mosi, Clk, Rst). The atmel programmer is connected and powered via USB.

I accidentally left the programmer connected when I plugged in the radio switch and both the switch and the programmer blew up.

Now I wonder why.

The radio switch's power supply is a resistor followed by a 4 diodes (rectifier?) followed by a capacitor (filter?) followed by a VIPer12A switcher (provides lower voltage?).

I assume that somehow there was a voltage difference between Gnd of my USB port and Gnd of the radio switch, but how can that be?

So if $V_1$ and $V_2$ are not precisely the same, a nonzero difference voltage $V_1-V_2$ is applied across $R_1 + R_2$. Since $R_1$ and $R_2$ are very small (ideally zero), even a small $V_1-V_2$ can cause a large current to flow.
If $V_1 \neq V_2$ and $R_1 = R_2 = 0$, then there is a pure short circuit: the circuit cannot be solved for current flow due to division by zero in $I = V/R$.