Setup
I am running 4 meters of 12V LED strip lights off of a USB-C power bank using a HUSB238. This results in ~24 W (2 A @ 12 V) and works fine for my use case. To modulate the intensity, I have an ATtiny85 with a voltage regulator (currently prototyped via a DigiSpark) powered via the same 12 V rail. The ATtiny85 produces a PWM signal paired with a logic-level MOSFET. The schematic is roughly:
Question
How can I add an on/off switch to this setup? Specifically, I am looking to take advantage of USB-C's cold-plugging, such that when in the off position, all current draw is effectively eliminated (as if the UFP is disconnected). The use case being to preserve power bank capacity, to make it last as long as possible.
I would like the solution to be agnostic to the power bank (DFP/source).
My background on USB-C / PD spec is as deep as: TI's "A Primer on USB Type-C® and USB Power Delivery Applications and Requirements".
I have seen cables like below when working with various Raspberry Pi kits. However, I haven't found anything that appears to be PD compatible. (A modified cable could be an option - open to others).
EDIT: I reached out to CanaKit and asked if they were planning a PiSwitch that will be compatible with the Raspberry Pi 5 (which takes 5 V/5 A via USB-C PD) - they said a new version is forthcoming which would "be PD compatible" in the following weeks. This "device"/cable would be one example of a solution to the problem.
Original cable example: