Serial comm loss on switching a neon lights

OK, I have this project

http://arduino.cc/forum/index.php/topic,68283.0.html

and I happen to lose communication PC<->Arduino via serial when I drive (turn on or off) neon lights (2x36W). Check the last post, right part of the picture. My PC is connected to the same outlet like the Arduino and the lights. Seems like there is inductivity spike when I turn on/off the lights and it affects my project. There is optocouplers between, and I use separate power supply adapter for the relays and other for the arduino. The Arduino do not restart but I need to disable/enable the com port in order to reconnect. If I put the PC on another outlet (other phase) it is ok.

Can someone explain me how/why this happens? Using usb hub with external power does not change anything. Where the "trouble" is traveling from??

Where are you getting the 12v supply for the Arduino from?

12V for Arduino is one wall socket adapter and the other is a mobile charger that outputs around 6.8V for relay drivers.

The 4 sockets that I control are from

I hacked it as it's controller sucked. There is a note not to connect inductive elements on it.

Now everything is connected on the inside "protected" side of this strip. PC, both power adapters for the arduino, power for the usb hub is on the uncontrolled+procected two sockets that are always on.

I removed the neon lights and connected them to the wall where the power strip is getting 220V too (outside protected zone). I was pulling it in and out simulating :slight_smile: what was arduino doing and I managed to break the connection manually! So the shock from the lights is passing the protection of the strip and traveling via transformers/power supplies and influencing the USB communication line!

8666:
I hacked it as it's controller sucked. There is a note not to connect inductive elements on it.

Neon lights are driven with series chokes, so they are highly inductive, unless they include an inverter to step up the voltage (in which case the choke is on the inverter output, so it doesn't count).

8666:
I removed the neon lights and connected them to the wall where the power strip is getting 220V too (outside protected zone). I was pulling it in and out simulating :slight_smile: what was arduino doing and I managed to break the connection manually! So the shock from the lights is passing the protection of the strip and traveling via transformers/power supplies and influencing the USB communication line!

You could try plugging the PC + the 12v supply to the Arduino + anything else connected to the PC (e.g. monitor) into a separate surge-resistant multiway trailing socket.

Yea the inductivity is a problem. And probably there is a garbage data traveling back that confuses the USB controller. I hear the "disconnected device" windows sound

Looking at Electrical ballast - Wikipedia
At the beginning I was using starters without suppression capacitor and old style ballast (first two pictures). Then I tried another type (compact fluorescent lamp picture) and it got better but not perfect. Seems like I need to pay for a better electronic ballast. There is a note that the trick is when using two light they cancel the interference but I might not wired them that way as I chopped this ballast from another set of neon lights and cut the wires without marking.