I am designing a prototype 5VDC fan speed control unit. I am using an LM317 as a voltage regulator. This will step the voltage from a LiPo battery or arbitrary wall adapter down to 5V. Pulse width modulation is used for actually controlling the fan speed.
As an alternative means of powering the device, I have been asked to install a female USB port which will interface with a solar powered USB charger being developed by a third party. I was hesitant to install the USB port for several reasons. The first is that the fan can draw about half an amp, much more than most USB ports can safely supply, so if it were plugged into a computer, for example, frying electronics is a possibility. The second is that I have no way of isolating the jack/battery power supply from the USB power supply and if both are connected at the same time, the results could be bad.
I was assured that this is a demonstration and testing prototype only, not a manufacturing prototype, so care will be taken not to misuse the USB port. Now my problem is that I don't want to run the 5V USB supply through the LM317, since the LM317 requires a voltage drop across its input and output pins to function properly.
My questions are:
- What would happen if I connected the 5V USB in parallel with the output of the LM317 voltage regulator circuit?
- What happens when I supply a voltage to the output and leave the input an open circuit?
- Also, does this potentially solve or mitigate the dangers of erroneously connecting both jack/battery and USB power supplies simultaneously?
I have inserted the proposed schematic here.