I'm trying to connect an led light strip in my car. The light strip is powered via USB, however, just connecting it to the 12 socket with an adapter or a USB port would leave the lights on all the time. So, I was wondering if it was possible to splice the USB cable and put a mosfet in to be able to automatically turn the leds off. The source and drain be in between the 5 V USB power or ground and then connect the gate to a 12 V accessory wire that is only hot when the key is in the ignition, thus turning the LED strip on and off with the key being in the ignition.
Wondering if this is feasible or if anyone has any other suggestions for how to do this.