Arduino PC LED strip controller

arduinoled strippower supplyusb

I have an LED strip being controlled by an Arduino and powered by a molex connector within my PC. I'd like to have my Arduino connected to my computer via USB 24/7, however when I do this, the molex grounds itself through the USB connection when I toggle the switch to the off position, so the LED strip does not turn off when I want it to. Also, I don't feel comfortable grounding molex through USB. Is there any way around this? I have a reasonable background with electronics, but I'm just not sure what to do in this case, and I couldn't find anything on the internet. Thanks.

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

I can see why you'd wand this since it'd be really nice to be able to reprogram the arduino at every time although having separate grounds while still connected to the same PC is going to get a little hairy.

The USB and the Molex connector share a ground internal to the computer so if you wanted to separate that, you'd have to modify the USB board to use a different ground. This gets into heavy PC modding and can get pretty hairy quickly.