I found this design on internet:

enter image description here

It is said to be a regulated power supply with variable DC output 5-15 V, 400 mA. My first question: Is this design around 7805 correct? I am asking because it doesn't correspond to the the 7805 datasheet:

enter image description here

What I miss there is R1. I expect there actually is some resistor inside 7805, so R1 is not required to let it work. But we don't know its value so we are unable to say what will be the exact output voltage when using the design on the first image. Am I right?

Then I am confused about voltages. The transformer's output on the above picture is 12V, then 2 diodes take 0.7V each, then 7805 takes another 2V. So we've got only 8.6V left for the output. My second question goes here: How can this give 15 Volt output? (15V 400mA is said to be maximum output of this design by the author.) Is it normally legal and working, does it mean that we can have any output voltage from any legal input voltage using these IC regulators?

And my third question: Isn't LM317 generally more suitable for adjustable voltage supplies of this kind than 7805? The 7805 seems to me like a LM317 with those R1 and R2 added inside. Also, LM317 has got a lower dropout voltage than 7805 and can give a higher current.


I found the following information in National Semiconductor's LM340/LM78XX datasheet:

RAISING THE OUTPUT VOLTAGE ABOVE THE INPUT VOLTAGE Since the output of the device does not sink current, forcing the output high can cause damage to internal low current paths in a manner similar to that just described in the “Shorting the Regulator Input” section.

  • \$\begingroup\$ I think you answered part of your own question: "What I miss there is R1" is explained by what you said later: "The 7805 seems to me like a LM317 with those R1 and R2 added inside." \$\endgroup\$
    – The Photon
    Commented Jan 21, 2012 at 16:57
  • 6
    \$\begingroup\$ Notice that this circuit is not isolated from the AC line! There is no need to connect the mains side of the transformer to circuit ground. \$\endgroup\$
    – markrages
    Commented Jan 21, 2012 at 17:29
  • 2
    \$\begingroup\$ markrages +1 Interestingly no one pointed out yet this connection is a lethal mistake. \$\endgroup\$
    – Al Kepp
    Commented Jan 21, 2012 at 17:48

2 Answers 2


The circuit is wrong.

A 7805 can be used in an adjustable mode as per the diagram you provided - using R1 and R2, BUT it is not a good regulator to use this way as it draws substantial and variable current via its adj (ground usually) pin which leads to poor regulation. Using an LM317 in this manner is much better - it is designed to be used like this.

The DC voltage will be ~= the peak voltage = 1.414 x VRMS_AC.
(1.414 = sqrt(2))

So 12 VAC x 1.414 =~ 17V
17 - 2*x 0.7 = 15.3 volts.
The 7805 or LM317 can have 2+ volts internal drop leaving about 12.5 to 13 volts possible at the output.

Use an LM317 if possible - datasheet here.
Fig 5 in the datasheet is the same effectively as above but the reference voltage is 1.25V.

To protect against the back polarity problem that you mentioned, connect a diode from output to input (usually non conducting). If Vo > Vin then the diode will conduct and protect the regulator.


First some shocking news: the LM7805 from TI (née National Semiconductor) is obsolete! That's right, the standard linear regulator since many moons.

There are some problems with the design.

  1. Ground is connected to your mains! Possibly lethal, but you may survive it

  2. The variable resistor to regulate the output voltage. Don't! The ground current may vary by as much as 1mA, which will cause a variation in output voltage of 1V for a 1k\$\Omega\$ resistor setting.

  3. As you noted you can't go all the way to 15V, though your calculation contains an error: you don't start with 12V after the rectifier. Rectifying and smoothing will give you 12V \$\times\$ \$\sqrt{2}\$ = 17V. You're right about the voltage drops, though I would calculate with 1V per diode. And then there's a 10% variation in mains voltage. So \$V_{IN}\$ for the LM7805 is, worst case, 12V \$\times\$ \$\sqrt{2}\$ \$\times\$ 90% - (2 \$\times\$ 1V) = 13.3V, while the datasheet says you need 2.5V higher than the output voltage. This means your regulator won't go higher than 10.8V. You'll also have to account for the ripple across the smoothing capacitor. Here you can calculate ripple as a function of input voltage , capacitance, and load.

Now since the TI's LM7805 is obsolete(*) you'll have to go with another regulator anyway, and since the LM317 is made for a variable output I would take that one (as long as it isn't obsolete). You'll be able to regulate from 1.2V and have 1.5A instead of 1A available. In the datasheet for the LM7805 the LM317 is recommended as a variable output alternative. The LM317 will need 3V difference between in and out, so for output voltages to 15V you'll need an 18V transformer.

The 1N4003 for the rectifier is overkill. It can withstand a reverse voltage of 200V, while the 50V of the 1N4001 will do nicely.
Like Russell says, you can protect the output against overvoltage by placing a power diode between output and input, cathode to the input.

(*) OK, the 7805 is not really dead. Since TI acquired NatSemi they have some duplicates in their offering, like ThePhoton points out, so either the LM7805 or the UA7805 had to go.

  • \$\begingroup\$ Wow, when did LM7805 become obsolete? Good news for China btw :) \$\endgroup\$ Commented Apr 7, 2012 at 9:58
  • 3
    \$\begingroup\$ @abdullah - I only found out this morning when I made the link to the datasheet. My life will never be the same again :-) \$\endgroup\$
    – stevenvh
    Commented Apr 7, 2012 at 10:05
  • 2
    \$\begingroup\$ Reports of the death of the 7805 may be premature: It's obsolete as the LM7805(National Semi part number), but still "active" as the UA7805 (TI part number). Also still active from On Semi (MC7805) and ST (L7805) and probably others (Fairchild, etc.). This is the first I've seen of consolidation between TI and National part numbers, but you knew it had to come sooner or later. \$\endgroup\$
    – The Photon
    Commented Apr 7, 2012 at 15:20
  • 3
    \$\begingroup\$ After human innihilate the planet in a nuclear fireball, the only thing left will be cockroaches and 7805 regulators. \$\endgroup\$ Commented Apr 8, 2012 at 14:17
  • 1
    \$\begingroup\$ @OlinLathrop don't forget 741s and 555s... \$\endgroup\$
    – Trevor_G
    Commented May 4, 2017 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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