7

I am making a programming adapter that will deliver 5V or 3,3V to the target board. I want to use a simple DIP switch to select voltage (I know that an SPDT is the canonical way).

Is it safe to short the input and output of an LDO like LD1117. Internal schematic is on page 3 of the datasheet.

filo
  • 8,801
  • 1
  • 25
  • 46
  • 1
    It does not look safe. – jonk May 26 '17 at 19:29
  • 2
    @filo: there has got to be a better way ... never good to short input to output, especially of a power device – jbord39 May 26 '17 at 19:29
  • 1
    ??? why would you want to? – Trevor_G May 26 '17 at 19:35
  • 2
    To select the voltage with a single DIP switch. – filo May 26 '17 at 19:38
  • 4
    figure out how to use the LD1117A in adjustable mode and switch out the resistor. – Trevor_G May 26 '17 at 19:39
  • Just like applying voltage to the output of the regulator, which is quite risky. – Rohat Kılıç May 26 '17 at 19:49
  • The LM 1117 looks like it is based on the LM337 series .The 317 /337 are similiar internaly despite having oppositte polarities.The LM1117 is not a low drop reg by modern standards .The LM337/317 reg is featured in www.badbeetles.com .I have not used the lm1117 because there are much better regs for low input voltages.I suspect that the LM1117 still has some of the bad traits of the old series. – Autistic May 26 '17 at 23:17

2 Answers2

7

As far as I know this is actually a fairly common solution. I know I've used this setup in the past without any problems.

This application note from LT even shows how to do this automatically, using a FET as the bridge: 5V to 3.3V Regulator with Fail-Safe Switchover – Design Note 82.

Greenonline
  • 2,064
  • 7
  • 23
  • 38
Cees Meijer
  • 290
  • 1
  • 5
  • 1
    Kind of a waste of power though... – Trevor_G May 26 '17 at 20:06
  • As trevor mentions... it is at least a waste of power. Just focus on the circuitry near the ADJ pin. These BJTs will be forward biased and active and probably not in a way consistent with intended design, either. It's also possible that the metalization design layout inside the IC are themselves inadequate for the likely currents and that migration may take place, as well. I just don't think it's a good idea. – jonk May 26 '17 at 20:09
  • 4
    Also note that the dsign note from Linear applies to a different regulator. What works with that regulator might not be a good idea with the LD1117A. – JRE May 26 '17 at 20:26
  • 4
    @jre table 1 shows multiple different regulators, and the second page has a much more complex regulator and bypass method. This is pretty standard for any regulator. I fail to see something that would suggest any regulator would have an issue with bypassing it. – Passerby May 26 '17 at 20:47
5

Not a good idea bypassing, it will just sit there and eat power.

Instead, use a single LD1117A in adjustable mode, and switch out the resistor.

schematic

simulate this circuit – Schematic created using CircuitLab

Trevor_G
  • 46,364
  • 8
  • 68
  • 151
  • How much power do you think it will eat? And how does your solution deal with the drop out? – Passerby May 26 '17 at 20:15
  • @Passerby what dropout? OP did not mention drop-out requirements? – Trevor_G May 26 '17 at 20:17
  • OP says short input to output. That means input is likely the 5V, so he is bypassing it completely. The LD has a drop out. So how does your solution deal with that. And more importantly, how much power do you think it eats. – Passerby May 26 '17 at 20:19
  • @Passerby I guess you COULD read it that way.. or you could read it he is regulating 5V then stepping it down to 3.3...which is how I read it... But you are right, it he is feeding the circuit from a pre-regulated 5V the above won't help. Re power.. it's only 5mA, but if this is running off a battery it all counts. – Trevor_G May 26 '17 at 20:24
  • 2
    He's making a programming adapter. So I don't think battery power is a concern here. – Passerby May 26 '17 at 20:28
  • @Passerby u may be right.... – Trevor_G May 26 '17 at 20:33
  • If he's making a programming adapter, then he's almost certainly using USB voltage, meaning this solution definitely isn't workable. – Sneftel May 27 '17 at 07:48