What is a voltage reference, and why does the LM317 require one? - Page 1
Forum section: electronics / beginners

author: musashibaka
author_rank: Newbie
timestamp: February 21, 2012, 03:43:11 pm
content: Question:What is a voltage reference, and why does the LM317 require one?Backstory:I am currently building my first variable power supply using an LM317 (http://www.mouser.com/Search/ProductDetail.aspx?R=LM317Tvirtualkey51120000virtualkey511-LM317T). The schematics I am using to build it are from the LM317 spec sheetand a Sparkfun variable power supply. I could very well build the power supply without understandinghow to LM317 works, but my goal, aside from building it, is to really to understand how the components work.Thanks in advance.Musashi

author: IanB
author_rank: Super Contributor
timestamp: February 21, 2012, 04:16:33 pm
content: The LM317 is going to maintain a constant output voltage. How do you think it is going to do that? Don't worry about electronics, just think in simple terms, how would it work?

author: musashibaka
author_rank: Newbie
timestamp: February 21, 2012, 04:30:54 pm
content: From what I understand the LM317 is akin to a voltage divider where the power from the voltage being dropped is transformedinto heat. Yet I still don't quite get what the voltage reference is, or why it is required.

author: Bored@Work
author_rank: Super Contributor
timestamp: February 21, 2012, 04:40:31 pm
content: The LM317 has a build-in voltage reference.How else should it determine if the output voltage is to high or to low if not with a voltage reference? It compares the output voltage to its reference voltage. Depending on the outcome it decreases or increases the output voltage.

author: musashibaka
author_rank: Newbie
timestamp: February 21, 2012, 05:08:45 pm
content: Thanks for your response BoredAtWork.QuoteWhy?QuoteI am not sure exactly what a voltage reference is nor why exactly a LM317 requires one, hence the question.QuoteWhy is the voltage difference between Vout and Adjust pin approximately 1.25V? In other words why is the constant voltage reference 1.25V, andwhy is required?Thanks.

author: Bored@Work
author_rank: Super Contributor
timestamp: February 21, 2012, 05:17:15 pm
content: There is a point where the only sensible advice to give is to suggest to pick up another hobby, for example, knitting.

author: Torrentula
author_rank: Regular Contributor
timestamp: February 21, 2012, 05:26:14 pm
content: This helped me a lot:

author: olsenn
author_rank: Frequent Contributor
timestamp: February 21, 2012, 05:33:18 pm
content: Think about a diode; why does it require a fixed voltage across it's terminals in order to operate? You are correct: idealy that 1.25V drop would not exist, you would simply connect its negative/ground terminal to the negative/ground of your source and the positive voltage terminal to the source of power and the pin in between (Vout) would act like a slider on a potentiometer and allow you select ANY voltage as high as the positive rail and as low as ground; however, no semiconductor is 100% efficient, including this one, and there will be a 1.25V drop on this device. That means that if you connect the IC to a 9V battery, you will only be able to select your voltage between 1.25V - 9V, and not 0V - 9V. Also keep in mind that I*V = P = HEAT; this should be taken into consideration to decide whether or not you need a heatsync or if the device is even suitable for your needs.Don't worry about the terminology, the 1.25V is not a reference for anything, it is simply the MINIMUM voltage that must appear across those terminals.

author: olsenn
author_rank: Frequent Contributor
timestamp: February 21, 2012, 05:40:07 pm
content: Alternatively, instead of using a LM317, consider this circuit, the voltage buffer:If you use a high current op-amp (without that resistor in series with the output) that goes rail-to-rail, you can technically achieve better performance than the LM317.

author: musashibaka
author_rank: Newbie
timestamp: February 21, 2012, 05:42:02 pm
content: Awesome!Thanks Olsenn, that clarifies things a great deal!Best,Musashi

author: SgtRock
author_rank: Unknown
timestamp: February 21, 2012, 06:22:24 pm
content: Dear Musasibaka:--I commend you for hanging in there. When you said; "...but my goal... is to really to understand how the components work.", and then got for answers things like; "Don't worry about electronics" and "The LM317 has a build-in  voltage reference.", I had the feeling that if you did not immediately shut up you were going to get the old kiss off, and I was right.--Now, clearly you asked: "Yet I still don't quite get what the voltage reference is, or why it is required.". And the answer you got: "How else should it determine if the output voltage..." seemed to indicate that you were being argumentative, rather than seeking a rather more full explanation. Finally you were told to take up knitting.--Please do not let the rude comments dissuade you from continuing to come to our wonderful forum. While DJ is busy trying to get people to join the forum, others are busy trying to run them off. There are lots of people here, who will help you and do not mind if a beginner is a tad ignorant (as I am), so please stay, You are indeed welcome.--I found Olsenn's explanation, quite helpful as well. Please see below a link to download a PDF of the TI LM317 Data Sheet which has even more schematics, circuits, and explanations, you might find helpful.http://ebookbrowse.com/lm317-pdf-d136180503--Also, If you would care for a laugh, check the below link, where an inquisitive poster is seeking help, and is advised to turn his design completely upside down, and then is, berated for not saying; "Thank you, Sir, may I have another"https://www.eevblog.com/forum/projects-designs-and-technical-stuff/creative-ideas-for-fuse-blown-indicator/--In any case, stick around, take your shoes off."Does not squirrel crack nuts on bough of oak tree."Lao Fu 1410 1620Best RegardsClear Ether

author: Balaur
author_rank: Unknown
timestamp: February 21, 2012, 06:50:23 pm
content: Quote from: SgtRock on February 21, 2012, 06:22:24 pmDear Sarge, to be fair, this kind of questions could be perfectly solved by the interested party with just a little bit of self learning. While it's perfectly admirable of this forum's members to kindly provide help and assistance in these rather basic matters, one must encourage excellence in all things, including autodidacticism.Also, if you please note, IanB's question is fundamental: how such device could work? And if you think in terms of basic building blocks (such as the comparator, etc), electronic knowledge is not even required, the theory could be applied to all kind of systems.Also BaW response "The LM317 has a build-in voltage reference" answers perfectly a poorly formed question: "What is a voltage reference, and why does the LM317 require one?". LM317 doesn't require one (i.e. as an external component), it has his own or you can even look at it as a high-power voltage reference.Cheers,Dan

author: Bored@Work
author_rank: Super Contributor
timestamp: February 21, 2012, 07:12:04 pm
content: If you don't even read the answers you get, but instead continue to childishly respond to every explanation with a stupid "Why?" you should really consider picking up knitting as a hobby.And that my internet stalker can't keep his piehole shut, well, how surprising.

author: olsenn
author_rank: Frequent Contributor
timestamp: February 21, 2012, 07:14:01 pm
content: Honestly, I am ashames at the people on this forum! Musashibaka asked a good question for the right reason; because he didn't know the answer and wanted to. There is no need to be assholes and either purposely try to confuse him or insult him for asking electronics questions on an electronics forum.Secondly, he is actually SMARTER than the bunch of you... when he didn't know the answer he asked, when you didn't know the answer, you guessed... and were WRONG. The LM317 doesn't compensate and it doesn't have any idea of what voltage it is spitting out; it operates on Ohm's Law, and that's it! It has NO VOLTAGE REFERENCE. If you want 5V, you have to hook it up to a multimeter and tune the resistors until you get 5V and hope it never changes! A voltage reference would be used for something like an analog-to-digital converted which needs to compare TWO voltage DIFFERENCES ([Vin - Vref] is five times larger than [Vref - 0], and I know Vref is 1.25V, thus Vin = 5*1.25= 6.25V). The only time you would need to consider the 1.25V in the LM317 as a "Reference" would be to pass it to the Vref of an AtoD converter (if it doesn't already have a built in reference) along with the output, so that it can determine and display what voltage that is being output instead of you having to connect the damn thing to a multimeter to see how much more you need to adjust the damn pot.musashibaka... please don't let these assholes upset you or persuade you to stop asking questions; I can assure you they will be the ones who end up failing school and panhandling for money!

author: SgtRock
author_rank: Unknown
timestamp: February 21, 2012, 07:28:54 pm
content: Dear Dave.S:--You stated:"So you are saying Dave Jones is wrong ? He was talking about LM317's Vref in his power supply video ."--If you happen to remember exactly which power supply video you are referring to, could you please point to it. In the mean while, I will be trying to isolate the correct one, from a number of power supply videos all. Thanks.--Someone, bring me some popcorn, this is getting good.“Horse sense is the thing a horse has which keeps it from betting on people."W. C. Fields (William Claude Dunkenfield) 1880 - 1946Best RegardsClear Ether

author: olsenn
author_rank: Frequent Contributor
timestamp: February 21, 2012, 07:31:29 pm
content: This is directly from the LM317 datasheet from Texas Instruments:"In operation, the LM117 develops a nominal 1.25V referencevoltage, VREF, between the output and adjustment terminal.The reference voltage is impressed across program resistorR1 and, since the voltage is constant, a constant current I1then flows through the output set resistor R2, giving an outputvoltage of..."Hence Ohm's Law! That's honestly all there is too it. Below is a quote from YOU, and if I was the person asking what the reference terminology means, I wouldn't understand either."Without a voltage reference for most linear regulators , they would be essentially useless .A voltage reference is a feedback loop .It has to know what voltages you want , how else is it "adjustable" ?"

author: Balaur
author_rank: Unknown
timestamp: February 21, 2012, 07:46:25 pm
content: Quote from: olsenn on February 21, 2012, 07:14:01 pmQuote from: olsenn on February 21, 2012, 07:31:29 pmThis is highly amusing.Please forgive my crass ignorance and impertinence, but I would like to ask you kind sir, to get a better look at the theory behind all this.The 1.25V reference voltage means exactly that: a bandgap temperature-independent voltage reference, indifferent (within limits) to whatever supply voltage the device receives.Please have a look at various documents available online:ECE 237WikiCheers,Dan

author: Unknown
author_rank: Unknown
timestamp: February 21, 2012, 08:21:07 pm
content: Quote from: olsenn on February 21, 2012, 07:14:01 pmIn general I think questions like 'what's a voltage reference' are better looked up in a text book (or Wikipedia) than asked on a forum. Asking such questions on a forum will result in some incorrect answers and some self-proclaimed experts arguing about some irrelevant detail.Quote from: olsenn on February 21, 2012, 07:14:01 pmYou seem to have a strange concept of voltage reference. A voltage reference is commonly considered a component that provides a constant voltage, to be used as reference for something. How would your "just Ohm's law" regulator if Vref (which of course doesn't refer to reference voltage) was a variable voltage, eg. just 20% of the input voltage? Would there be any regulation at all? How is this internal thing which provides 1.25V but is not a voltage reference connected to the internal error amplifier? If it just operates on Ohm's law, what happens if you connect the adjust terminal to ground without any resistors between the output terminal and ground? I assume it just stops working?

author: westfw
author_rank: Super Contributor
timestamp: February 22, 2012, 02:07:42 am
content: The goal of a voltage regulator is to output some constant voltage output, regardless of load.I order to do this, the regulator has to have some "reference" to a know voltage that it can compare against; the 'reference voltage.' The regulator circuit could say "I want my output voltage to equal this reference" In the 317 case, the circuit will adjust the "resistance" of a power transistor element in ways that will make the difference between the output voltage and the "adjust" input match an internal 1.25V reference. By putting a resistor divider between the output and the "adjust", you can achieve any output voltage greater than 1.25V (if you wanted 5V, you'd use a voltage divider that divided by 4.) 1.25V is presumably a compromise between what it is easy to fabricate, and what a reasonable "low" output voltage would be...

author: Wartex
author_rank: Frequent Contributor
timestamp: February 22, 2012, 04:18:08 am
content: Quote from: BoredAtWork on February 21, 2012, 05:17:15 pmCould someone please take this arrogant dick down a notch, he's fucking personally insulting everyone in 30% of his posts. I would have been crucified by mods for shit like this, yet he gets a free pass.

author: SgtRock
author_rank: Unknown
timestamp: February 22, 2012, 04:39:41 am
content: Dear Wartex:--While I have not always agreed with you in the past, I do have to say that, usually you saved your wrath for a very few people, with whom you have had disagreements. This guy hates everybody. All he does is chime in, give advice (often not very well thought out advice) and then, when everyone does not say "Jawohl Mein Herr", he starts with the gibbering, slobbering and cursing, and oft times using the most lurid disgusting profanity in personalized attacks, though lately he has improved somewhat, causing some to guess that perhaps he had been issued the yellow card."There once was a worker, so bored.That when his posts were ignored.He'd strive on inanely,And most times profanely.But seldom, if ever he scored."Gator Dundee 1948 -Best RegardsClear Ether

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 22, 2012, 04:55:09 am
content: Quote from: Wartex on February 22, 2012, 04:18:08 ami'll take it positively. he just wanted to save some space in this world by avoiding useless arguments such as why V=IR not I=RV, this is not a voltage reference, that is etc etc and what not. someone suggested... read it up in text book, i agree, and internet is vast, thanks to google for managerial effort to collect them. without him i believe the OP will continue to ask why and why indefenitely until why V=IR until this thread will take up space similar to one textbook. BaW did give some advice on what is the Vref (and some others), if the OP still unable to understand and dont make any effort to further investigate it, then there's a problem. you want to help explaining what a votage reference is? then go ahead. we will be glad you are willing to spoonfeed this chap. the OP and the viewer may choose to skip which posts they dont like. but instead of knitting (which i did long time ago and becaming good at) i will suggest for lawn bowl.

author: musashibaka
author_rank: Newbie
timestamp: February 22, 2012, 12:42:07 pm
content: I really appreciate all of the helpful responses I have received.I would like to address some of the assumptions made bya few negative posters.1. I actually do know how to use wikipedia and google.2. Anyone who has tried either of the above would know that thequality of information found on topics vary, and sometimes the rightdescription required to get an intuitive understanding varies per individual.Not only that, if everything in the world could be explained well by agoogle search, this forums sole purpose would be for entertainment.3. I have read wikipedia page on voltage reference and the lm317.I have also searched through the three electronics booksPractical Electronics for Inventors, Fundamentals of Analog Circuits, and BeginningElectronics to name a few. So I sought further advice.4. I am not an electrical engineer, but I would gather that throughout an engineerscareer one must ask questions in order to learn. Excusing rude behaviorunder the auspices of abating "spoon feeding" is a weak minded response tohuman curiosity.To those individuals who chose to be rude, or because of their own insecuritychose to respond with a weak attempt at belittle me, I offer to you the gift of wisdom:"Any intelligent fool can make things bigger and more complex...It takes a touch of genius - and a lot of courage to move in the opposite direction."-- Albert Einstein

author: The_Penguin
author_rank: Regular Contributor
timestamp: February 22, 2012, 04:30:59 pm
content: Quote from: musashibaka on February 22, 2012, 12:42:07 pmWell said, sir!

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 22, 2012, 05:03:41 pm
content: know what? my wife will never wrong, always defend herself no matter what.Quotedo you? talk somemore. well said.http://en.wikipedia.org/wiki/Voltage_referencehttp://www.ko4bb.com/e102/e102-4.phphttp://www.edaboard.com/thread215325.htmlhttp://lmgtfy.com/?q=why+we+need+voltage+referencehttp://lmgtfy.com/?q=why+use+voltage+referencehttp://lmgtfy.com/?q=what+is+voltage+referencehttp://lmgtfy.com/?q=what+the+fuck+is+a+voltage+reference%3Fhttp://lmgtfy.com/?q=why+a+voltage+reference+fucked+up%3Ftook me some time to meditate whether to reduce my post count or not. decided to leave as is for entertainment.valid question? many valid answers but still not answering. what is valid? or just a simply junk question?

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2012, 05:24:41 pm
content: Check out the following links:http://www.ti.com/lit/an/snva558/snva558.pdfhttp://www.ti.com/lit/an/snva020a/snva020a.pdf

author: MarkS
author_rank: Unknown
timestamp: February 22, 2012, 05:52:29 pm
content: Quote from: musashibaka on February 22, 2012, 12:42:07 pmI do not want to be considered one of the "negative posters", but break down "voltage reference". It is a voltage that can be referred to. What it is is basic common sense. You should be able to extrapolate what it is, and thusly, WHY it is from the two words that make up the description. That is why people have been negative. That and the fact that you seem to skip over the answer and ask why again while quoting the answer.Now, there are questions that deserve asking, like how is it constructed and why is it only 1.25 volts when the output is going to be greater.

author: ciccio
author_rank: Frequent Contributor
timestamp: February 22, 2012, 06:20:25 pm
content: This thread is very interesting::1) a "newbie" post a simple question, in clear and plain English. From it's later post we understand that he is not illiterate, and owns and can read engineering books.2) 30 replies in two days: it's a lot.3) more than 1/4 of the replies could be avoided: they did not gave an answer to the original poster, but were (I'll try to be "diplomatic") a little on the "unpolite" side, revealing a selfish and "arrogant" (sorry, I did not find a less crude synonym) position.3) another 1/4 of the replies is used to question some other's response.3) another 1/4 were not giving a correct answer (I mean an answer that is both technically correct and that can be understood by the original poster).4) the lat 1/4 tries to give, with various success, a response to the original question.I really appreciated some of the posts in this last group, and could write here my appreciation to the posters, but I want to avoid other conflicts, so I end here.Fortunately I knew before what a Voltage Reference was, or my ignorance could only increase, being obliged to mediate all these informations.Best regards

author: MarkS
author_rank: Unknown
timestamp: February 22, 2012, 07:13:34 pm
content: Quote from: ciccio on February 22, 2012, 06:20:25 pmI think that most people here have the best intentions. He asked a question and received an answer. He then proceeded to ask the question again, while quoting the answer he just received, as though the answer in front of him wasn't there.While I hate it when someone is outright told to do a search first, I did a quick search on Google and this was the first reply:Voltage Reference. That leads to a rather useful article here:Understanding Voltage-Reference Topologies and SpecificationsI don't think BoredAtWork, for instance, was being rude. This isn't the hobby for everyone. I was able to pick this up from a very early age and am entirely self taught. However, many people will look at what I would consider mundane and their eyes will glaze over. The topic in question is a very simple EE topic. If the OP doesn't understand after the answers that have been given, which were entirely on point, then maybe this isn't the hobby for the OP.

author: SgtRock
author_rank: Unknown
timestamp: February 22, 2012, 07:51:00 pm
content: Greetings EEVBees:--I hope some of you will consider being more tolerant of beginners. They are important to this blog, that is why it seeks them. Now, when someone asks; "just exactly what is a voltage reference, and what does it do", I rather think he is looking for an explanation of some length, and not just, "its a voltage, reference, you fool, how else would you do it." Or "take up knitting".--I can remember taking courses (Calculus comes to mind) where I just could not get a particular concept. I would search and search and question and question, till finally someone would push the bingo button. So when somebody asks a question and you give a short answer, and he still does not get it, try explaining more fully or reccommending a particular "at length" article. You will have a much better chance of not seeming like arrogant bastards."Does not squirrel crack nuts on bough of oak tree."Lao Fu 1410 1620Best RegardsClear Ether

author: Unknown
author_rank: Unknown
timestamp: February 22, 2012, 08:54:39 pm
content: Showing that you already put a lot of effort into it would help getting more constructive responses. Something like:QuoteThis saves people from tracking down resources you have already read, and also cuts down on the number of people annoyed by the basic question that should be easy to look up in any EE text book.

author: IanB
author_rank: Super Contributor
timestamp: February 22, 2012, 10:06:59 pm
content: I'm honestly still not sure if the correct answer has been understood. It is all about basic concepts of the things around us, nothing specially to do with electronics.For instance if you want to make a piece of cloth exactly 3 feet long, you need to measure it before you cut it. If you are going to measure it, you need something to measure it against, such as a ruler. It is easy to see that you cannot cut something exactly to length without some way to measure it. In this case your measure, your ruler, is your reference for length. Without a ruler for reference you have no way to know where 3 ft is.It is the same with everything. If you want to measure and establish exactly 5 volts, say, you need some reference to measure 5 volts against. Without a reference you have no way to know where 5 volts lies. You might say your multimeter is a reference, or "ruler". And it is, in a way. But inside the meter, the meter has to know where 5 volts lies too. The meter does that itself by having some voltage reference, some "ruler" to compare against. Likewise the LM317. It has to have a "ruler" or "measure" to compare voltages against or it cannot function.

author: electrode
author_rank: Regular Contributor
timestamp: February 22, 2012, 10:16:39 pm
content: musashibaka,- The answer is very simple. They way you are thinking of it, is that you have (say) 15V in, and want 5V out, so why can't you just use a resistive voltage divider so that the output is 1/3 of the input, right?- The answer to "why is a voltage reference needed?" is that your input voltage will change. It may not always be 15V. If it rose to 18V, you would get 6V at the output. So you cannot divide your input voltage to set your output voltage. This is where a voltage reference comes in; it's designed toalwaysgive some fixed voltage (eg. 1.25V), so you always set your output to some ratio of that and everything will be stable.

author: amspire
author_rank: Super Contributor
timestamp: February 22, 2012, 10:58:11 pm
content: I suppose there is room for confusion here because some regulator IC's provide a constant current instead of a constant voltage as the reference.For example, the LT3080 that Dave is using in his power supply can be run in one of two modes. It regulates the output to be equal to the voltage on the set pin, so if you use an external voltage reference to provide 5V to the Set pin, the output will be 5V. Using it in this way, the LT3080 acts as a regulator without an internal reference.However, if you connect a single resistor from the Set pin to ground, the LT3080 does become a fixed voltage regulator. What is going on? You cannot use the 0V Set to Output differential as a voltage reference (as you can with the LM317) , so how is it possible for the LT3080 to supply a fixed output voltage without an external reference?The answer is instead of providing a fixed voltage (like 1.25V form the LM317), it provides a constant current from the Set pin instead (10uA). Thanks to Ohm's Law a constant current into a resistor gives a constant voltage.This is not the only regulator using a current source output to generate the voltage reference - there are lots of other linear and switching regulators using the same strategy. There is every chance that the LT3080 internally has a voltage reference to generate the constant current out of the Set pin, but it is possible to make constant current devices in silicon without any voltage reference involved.So basically to get a fixed voltage out of a regulator without any external reference voltage, then a regulator IC must provide either a constant voltage reference or a constant current reference, and thanks to Ohm's Law, either one is equally good. With a single resistor a constant voltage can be turned into a precise current, and a constant current can be turned into a precise voltage.As IanB explained so well, without some sort of fixed reference, there is just nothing to measure the output voltage against.Richard.

author: Zero999
author_rank: Super Contributor
timestamp: February 23, 2012, 06:06:28 pm
content: If you look at the LM317 circuit more closely, you'll see that the current flowing though R2 is constant and is only dependant on VREF/R1.

author: Simon
author_rank: Unknown
timestamp: February 27, 2012, 12:24:04 pm
content: hoot hoot what a lot of fuss over something so simple.Why could the first answers not tell the plain and simple. In order for the LM317 to output the correct voltage and know it is correct it compares it to a "known" accurate reference and therefore deduce if the output needs to go down or up ?I mean common guys just answer the question properly and if you think that because it is such a simple question and therefore below you and for you to be able to answer it you have to complicate matter just MOVE ON

author: Balaur
author_rank: Unknown
timestamp: February 27, 2012, 12:33:47 pm
content: Quote from: Simon on February 27, 2012, 12:24:04 pmWhy?

author: Simon
author_rank: Unknown
timestamp: February 27, 2012, 12:35:40 pm
content: Quote from: Balaur on February 27, 2012, 12:33:47 pmdon't you start

author: metalphreak
author_rank: Frequent Contributor
timestamp: February 27, 2012, 06:50:20 pm
content: "but why?"

author: Armin_Balija
author_rank: Regular Contributor
timestamp: March 08, 2012, 10:25:56 am
content: Basically it's using an internal reference as it's startoff point for it's output. That's why you cannot get an output lower than 1.25V on the LM317 unless you start mucking about with it.It's 1.25 internal reference can be looked as the regulator's internal "GND" where it's output is based on it's internal "GND" reference point. I use the term "GND" really really loosely obviously.