# LM317, supply connected to output

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:

1. What would happen if I connected the 5V USB in parallel with the output of the LM317 voltage regulator circuit?
2. What happens when I supply a voltage to the output and leave the input an open circuit?
3. 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.

• – Nick Alexeev Jun 17 '14 at 0:37
• If you read carefully, this isn't the same problem. – Void Star Jun 17 '14 at 1:08
• Why don't you just want to put the USB 5V before the regulator? That's a good practice since you don't know where the 5V is coming from on that USB connector. Its not like you'll be connecting the barrel jack and the USB at the same time...right? – Funkyguy Jun 17 '14 at 3:21
• The LM317 will cause there to be a voltage drop, am I not correct? If 5V goes in, I could end up with less, not much less, but still significantly less than 5V powering my fan. – Void Star Jun 17 '14 at 4:38
• You should take a look at the Arduino Uno schematics. That does exactly what you want - isolation of the two supplies from each other, zero loss on the USB, etc. – Majenko Jun 17 '14 at 9:13

• It depends on the LM317 you have. The TI LM317 datasheet indicates Input-Output Voltage Differential +40V, −0.3V so a diode with a 0.3V drop or lower would be required. – Adam Davis Jun 18 '14 at 11:46