Basic question, usb cable, relay, and 5v fan

Sorry, it depends on the Arduino you use. I was thinking of a Nano, where Vin = USB 5V. On e.g. an UNO I wouldn't use Vin to connect 5V peripherals to. I shouldn't have said anything about this anyway since you didn't specify the Arduino to be used; as you noticed, it depends a bit on what you choose.

Just google 'mosfet low side switch' and lots of stuff pops up.
A relay isn't necessarily wrong to use here, but it's just massive overkill for the job. It's like using a crowbar to open a jar of marmelade. It'll work, but it's just awkward.

1 Like