How do I change the output voltage of the LM7805?

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:

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

• By replacing it with LM317, should be pin compatible for most packages. Aug 9 '19 at 6: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? Aug 12 '19 at 5:50

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.

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.

• Can you be more specific with regard to newer regulators? E.g. a particular part number? Aug 8 '19 at 23:52
• @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). Aug 9 '19 at 6: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. Aug 9 '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) Aug 10 '19 at 13:04

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).

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).

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.

• 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 Aug 9 '19 at 7:04
• 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?! Aug 9 '19 at 11:08
• 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. Aug 9 '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. Aug 9 '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 Aug 9 '19 at 16:41