8

I read in the LM7805 datasheet that I can change the output voltage to not only 5 V, but to another value by changing the circuit resistance. How do I do that?

From what I understand, to change the output voltage I saw this picture:

Enter image description here

However, I can't find the values of R1 and R2 in the datasheet. How do I calculate them?

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
TOM
  • 81
  • 1
  • 3
  • By replacing it with LM317, should be pin compatible for most packages. – Lundin Aug 09 '19 at 06:25
  • hey, you've asked this 4 days ago, have gotten three good answers, but haven't had the chance to accept one yet. Is everything alright with the answers for you? – Marcus Müller Aug 12 '19 at 05:50
  • I found little information about this, but see this link https://www.engineersgarage.com/voltage-boost-using-a-resistor-with-78xx/ – Aram Alvarez May 18 '23 at 22:21
  • And this one https://www.eleccircuit.com/adjustable-dc-voltage-regulator-circuit-using-ic-7805/ – Aram Alvarez May 18 '23 at 22:30

3 Answers3

18

I want to use the LM7805. However, I read in the datasheet that I can change the output voltage not only 5, but by changing the circuit resistance.

Principally, the LM7805 is a fixed voltage regulator.

The 78xx series does have adjustable versions, but the LM7805 is not one of these: the 05 stands for a fixed output voltage of 5V.

What the circuit does is build a virtual ground. That does work, but it's very undesirable from a regulation quality point of view. (The LM7805 is not symmetrical in what it can quickly adjust if the load changes. This together with a load-dependent virtual ground is a bad situation.)

If you need a different output voltage than 5V, you definitely should use a different regulator. Get a better one – the 7805 is ancient (the datasheet you linked to is literally from 1976), and there's way better-regulating chips out there.


to answer

However, I can't find the values of R1 and R2 in the datasheet. How do I calculate them?

You just pick an R2 and then calculate a R1 that fulfills the formula like you'd like it to. Again, this is not a good idea, even if the datasheet suggests it is. It's both not a great regulation that you'll get, and it wastes a lot of power if you want temperature-dependency to not take too much of an effect due to the \$I_Q\$ in the formula.

In the mid-1970s, there weren't many better ways of regulating an output voltage. 43 years later, there are.

Marcus Müller
  • 88,280
  • 5
  • 131
  • 237
  • 1
    Can you be more specific with regard to newer regulators? E.g. a particular part number? – Peter Mortensen Aug 08 '19 at 23:52
  • 1
    @PeterMortensen Well, it's hard to recommend anything specific if I know literally nothing about the problem you're solving (In, and desired output voltage, current, acceptable ripple/noise). But very often I find myself just throwing some SOT-23 Buck converter with but a single external inductor on a board and moderate output capacitor, followed by an LDO. You'll probably like TI's "TLV×××" series, for example the TLV703. The "cheap as hell general purpose adjustable LDO" is the TLV1117-adj, and you'll find clones of that by many companies (it's not *that* modern, just not from 1976). – Marcus Müller Aug 09 '19 at 06:46
  • We used an LM2940 on automotive projects about 10 years back. It's probably still a reasonable choice for a +5V linear regulator. I believe there are adjustable versions available. – Graham Aug 09 '19 at 21:38
  • @Graham it is! It really depends on your application; 5V isn't all that common a voltage in systems these days, so the pressure to develop better regulators hasn't been so high. But people are trying to bring down 12 V to 5 V and draw 1.5 A from that – and wonder why their LM doesn't stay cool, and why regulation of a rapidly PWM/H-bridged load is so bad. (also, cost is a factor, especially for mass-produced products; but for hobbyists like OP? spending money on a good switch-mode regulator would probably pay,unless the voltage drop is too small to justify that,in which case they'd use an LDO) – Marcus Müller Aug 10 '19 at 13:04
8

As Marcus already pointed out, it is a terrible idea to depend on the quiescent current. It will vary with the load and give you a bad load regulation.

Just to give a better alternative, if you don't have an LM317 (or better) around but have a zener that just happens to be what you want to add to the output voltage, you can connect it to the common pin, for better results that the ones you get with the resistor (but worse than a proper solution with user defined feedback).

enter image description here

The following plots show the behavior for the solution with the resistor feedback and for the zener. The "sine wave" component is due to the variation of the input voltage from 16 to 20 V. The two curves in each plot show the load regulation (RL = 10k and 10 Ohm).

enter image description here enter image description here

devnull
  • 8,447
  • 2
  • 15
  • 38
6

However, I can't find the values of R1 and R2 in the datasheet. How do I calculate them?

When faced with two unknowns in an equation, picking a value and then using that value to find the other unknown is the best approach.

So lets look at that equation:

\$ V_O = V_{xx} + (\frac{V_{xx}}{R1}+I_Q)*R2 \$

\$I_Q = 500mA\$

\$ V_{xx} =\$ the fixed value of the regulator

So if I had a 7805 and I wanted 7V -- I would pick r1 to be something that I have, like a 1K resistor :

\$ 7V = 5V + (\frac{5V}{1000Ω}+0.5)*R2 \$

Solving for R2 yields 3.9604Ω

R2 is very 'sensitive to large changes in R1, so it might be best to keep R1 relatively low like in the 500Ω to 5kΩ range (that's probably why they used a potentiometer). This also means that R2 will burn up a lot of heat, and the tempco of R2 will affect the regulation so its probably best to go with a real adjustable regulator.

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
  • Is IQ supposed to be thecurrent from ground pin? If so I believe its value to be off by two decades at least. I'd rather try to make its contribution to output voltage negligible though – carloc Aug 09 '19 at 07:04
  • 1
    Talking about that: I don't even think this specific version of the LM7805 datasheet even specifies what \$I_Q\$ means, leave alone give numbers. WTF, TI?! – Marcus Müller Aug 09 '19 at 11:08
  • 1
    TI sucks, I've been burned by them before, and there is no way to get a hold of the company or engineers to resolve a problem with their parts (their community forum is a joke). You also see a lack of quality in some of their datasheets. I looked through the datasheet and determined that Iq means Io. You also see it in the resistor bridge equation as R2 needs to be very low. Don't use TI parts unless there isn't an alternative for price or function. – Voltage Spike Aug 09 '19 at 15:22
  • The LM7805 is a commodity part. Everybody makes them and there is no money to be made on them. That's why nobody cares about the datasheets. – spuck Aug 09 '19 at 16:32
  • So everybody is TI and ON semi? ON semi's datasheet is much better than TI's. In fact, it looks like TI copied ON semi's. No confusion on Iq there – Voltage Spike Aug 09 '19 at 16:41
  • @VoltageSpike everyone also includes Diodes inc, Rohm, Analog, Microchip, Maxim, ST, Renesas if you believe this [list you get when you look for 5V regulators with "78" in their name](https://www.digikey.com/products/en/integrated-circuits-ics/pmic-voltage-regulators-linear/699?FV=1bcc0038%2Cffe002bb&quantity=0&ColumnSort=1000011&page=1&nstock=1&k=78&pageSize=25) – Marcus Müller Aug 12 '19 at 05:52
  • @VoltageSpike and seriously, as the successors of the original inventors, I'd guess TI's 1976 datasheet *used* to be better, probably before some intern was assigned to clean them up. – Marcus Müller Aug 12 '19 at 05:54
  • @marcusmuller I thought the LM7805 had sightly different construction from the original but then again I did not compare them – Voltage Spike Aug 12 '19 at 13:41