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?

  • \$\begingroup\$ By replacing it with LM317, should be pin compatible for most packages. \$\endgroup\$
    – Lundin
    Aug 9 '19 at 6:25
  • \$\begingroup\$ 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? \$\endgroup\$ 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.

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.

  • 1
    \$\begingroup\$ Can you be more specific with regard to newer regulators? E.g. a particular part number? \$\endgroup\$ Aug 8 '19 at 23:52
  • 1
    \$\begingroup\$ @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). \$\endgroup\$ Aug 9 '19 at 6:46
  • \$\begingroup\$ 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. \$\endgroup\$
    – Graham
    Aug 9 '19 at 21:38
  • \$\begingroup\$ @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) \$\endgroup\$ 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).

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


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.

  • \$\begingroup\$ 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 \$\endgroup\$
    – carloc
    Aug 9 '19 at 7:04
  • 1
    \$\begingroup\$ 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?! \$\endgroup\$ Aug 9 '19 at 11:08
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Voltage Spike
    Aug 9 '19 at 15:22
  • \$\begingroup\$ 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. \$\endgroup\$
    – spuck
    Aug 9 '19 at 16:32
  • \$\begingroup\$ 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 \$\endgroup\$
    – Voltage Spike
    Aug 9 '19 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.