I'm currently designing a (fairly easy) circuit, which is powered by an ordinary 12V Power Supply. To flash the embedded µC and/or get debugging output, I use an onboard USB-UART-Interface.
To make the circuit programmable even when not connected to 12v, I want to power the circuit via USB.
Therefore my question is whether it's safe to connect USBVCC to the 12v rail over just a single Diode (e.G. 1N4148)? The voltage drop across the diode is not a problem in my case, since they only feed a LDO which requires about 4V:
Most circuits I saw online (e.G. the Arduino UNO Power Supply) use an OpAmp & FETs to switch between the power sources, but from my understanding, the Circuit shown above should do the job, as long as the Voltage Drop across the Diode is no problem.
If the suggested circuit is ok to use, I'd like to get a few advises on how to make the circuit more safe to use. If the diode ever fails, the circuit would kill the USB Controller of the Computer it's connected to (best case) or even kill a whole x-k$ notebook.
I think an 5V-Varistor and an additional fuse should to the 'additional safety' (see second circuit), but would the varistor & fuse would react fast enough to protect the USB-controller from being damaged?
(P.S.: Yep, i have caps for the LDO, just left them out here for simplicity)