7805 Based Power Supply Capacitor Selection and Protection Diode

Thread Starter

KeeganPren

Joined Jan 21, 2019
8
I have some basic questions about 7805 based power supply circuits. The circuit design is very simple, and not terribly difficult to understand. Looking at the datasheets, there are decoupling capacitors on both the input and output side of the regulator...and that's about it. What I do not totally understand is how to select those capacitors, not the values but the type. In TI's data sheet, for example, they explicitly specify a 0.1uF ceramic capacitor should be used on the output. However for the input side they only specify that it should be .22uF, but not any particular type. I have also seen data sheets that do not specify the type to be used for either the input nor the output.

How do you determine the right type of capacitor for the application? Does it matter at all? I'm mostly confused by this because in photos of boards people have made I have seen electrolytic capacitors used almost universally and I assume there is a reason for this. Those types of caps are also used on the output which is the only place I have seen a datasheet specific specifically what type to use. Even then, they called for the use of a ceramic capacitor, so why does everyone seem to use an electrolytic?

I also have a question regarding the use of the protection diode called in the application notes. Again, it is not difficult to see how this works, but when to apply it is not obvious to me. They talk about usage in instances when the load on the other side is capacitive, but I'm not sure how to determine this. In my current application I'm looking at using the supply to drive a small MCU like an ATTiny85 and maybe a small two line LCD display. Is that a capacitive load? How do you determine this?

Full disclosure, if my questions seem exceedingly basic, I'm a software engineer by training and whatever EE material I learned is now 20 years old and unpracticed. I'm approaching this completely as a hobbyist at this point with maybe a slightly stronger background in some of the fundamentals ;)

Thanks in advance.
 

wayneh

Joined Sep 9, 2010
17,496
Those loads are not capacitive. I usually have a larger electrolytic capacitor on the output, maybe 100 microfarad or more, and I’ve always followed the recommendations in the datasheet and included the protection diode. After a few years here I’ve learned I’m in the minority on this issue. The 7805 is amazingly robust and a lot of people get away with not using that protective diode. If the longevity of your 7805 is critical, use it. If not, don’t, and you’ll probably never regret it.
 
Never use .22uF, use 0.22, the 0 is significant. I read it as 22 uF.

De-coupling caps are an art. Generally best to use the manufacturer's suggestion. They are usually ceramic. If it is indeed a 0.22, tantalum is probably best. The importance of de-coupling caps is that they have to be close to the device.

In some cases, decoupling can be a parallel combination of multiple types of capacitors.
 

Thread Starter

KeeganPren

Joined Jan 21, 2019
8
De-coupling caps are an art. Generally best to use the manufacturer's suggestion. They are usually ceramic. If it is indeed a 0.22, tantalum is probably best. The importance of de-coupling caps is that they have to be close to the device.

In some cases, decoupling can be a parallel combination of multiple types of capacitors.
Hmm, my skill level definitely does not qualify me to practice electronics as an art form, but this is good to know. If in fact the decoupling capacitors are most commonly ceramic, why does it appear that in 7805 power supplies that the vast majority of the ones I've seen use electorlytic? Even @wayneh states that he uses something around 100uF electrolytic on the output side. Why do you suggest tantalum?

I usually have a larger electrolytic capacitor on the output, maybe 100 microfarad or more
Would I be correct in assuming the "art" is about understanding the more subtle differences in the specific characteristics of of various types of capacitors and the parameters of your application? For example the decoupling required between the 7805 and a ATTiny85 microcontroller is not going to be as sensitive to line noise or things like that as say, an audiophile grade analog signal processor.

Never use .22uF, use 0.22, the 0 is significant. I read it as 22 uF.
Also, thanks for the tip on nomenclature, this was super obvious once you pointed it out.
 
Here are two articles:

https://www.google.com/url?sa=t&rct...emId=4422750&usg=AOvVaw0ckUUnotkMDq73NyiIrTMx

Searching for EDN decoupling lm317 will find the article.

https://en.wikipedia.org/wiki/Decoupling_capacitor

Each type of cap has certain characteristics. Large capacitance values at the output, I think, defeat regulation. the axiom "The voltage across a capacitor can't change instantaneously" can mean a number of things. The "current through an inductor can't change instantaneously" is another
One purpose of the bypass cap is to compensate for the "inductance" of the PC trace which is small.

Tantalum capacitors are expensive. They also used to short easily with overvoltage. Early versions leaked.

here https://www.analog.com/en/analog-dialogue/articles/why-bypass-capacitor-choice-matters.html is a more broader article.
 

crutschow

Joined Mar 14, 2008
34,280
I also have a question regarding the use of the protection diode called in the application notes. Again, it is not difficult to see how this works, but when to apply it is not obvious to me.
The diode is usually only needed if there is something besides the 7805 that will discharge its input capacitor before the output capacitor is discharged.
That would put a reverse voltage across the 7805 that can damage it.
If the 7805 is the only load on the input, then you don't generally need the diode.
 

dl324

Joined Mar 30, 2015
16,839
In TI's data sheet, for example, they explicitly specify a 0.1uF ceramic capacitor should be used on the output. However for the input side they only specify that it should be .22uF, but not any particular type.
It would be helpful if you cite your reference. This from TI says no external components required:
upload_2019-1-24_16-41-15.png

And this from a footnote:
upload_2019-1-24_16-41-43.png

This assumes that the input isn't rectified AC. In that case, 0.22uF will unlikely be sufficient on the input.
 

Thread Starter

KeeganPren

Joined Jan 21, 2019
8
@KeepItSimpleStupid Thanks or the links to the articles, I haven't made it through all of them yet, but the first one was interesting, and the Wikipedia article on decoupling capacitors provided a little more insight than my previous readings. Good stuff, I certainly learned something.

@dl324 I was specifically looking at this datasheet http://www.ti.com/lit/ds/symlink/lm340.pdf which stated nothing about the input stage, and only mentioned that the output capacitor was not required for stability. However, when I went to double check, I also came across this datasheet http://www.ti.com/lit/ds/symlink/ua78.pdf. I was not aware there were so many subtle variations in component offerings. I will obviously need to pay very close attention to the datasheet for the specific component I get. Silly me thinking 7805 just meant 7805 :p For additional context too, I was planning on using 12V or 9V input from a wall wort. That would just be rectified, not regulated, so the input cap seems totally necessary. (right? I'm still learning here)

I think I have enough to go on now to at least develop my "final" design. I may follow-up with a post of my schematic and BOM so you can let me know what I did wrong and how to fix it.

Appreciate everyone's help. Thanks!
 

dl324

Joined Mar 30, 2015
16,839
For additional context too, I was planning on using 12V or 9V input from a wall wort. That would just be rectified, not regulated, so the input cap seems totally necessary. (right? I'm still learning here)
It depends. Some inexpensive DC wall warts are actually unregulated DC, possibly with no filter/smoothing cap.
 

Thread Starter

KeeganPren

Joined Jan 21, 2019
8
That's what I said right, *not* regulated, and therefore I would need to ensure I put a filter cap on the input to the regulator?
 

wayneh

Joined Sep 9, 2010
17,496
That's what I said right, *not* regulated, and therefore I would need to ensure I put a filter cap on the input to the regulator?
Yes, the regulator cannot store energy to coast thru the troughs in the input waveform. Any time the input voltage falls below about 2 volts more than the output, that output will sag along with the input.
 

dl324

Joined Mar 30, 2015
16,839
That's what I said right, *not* regulated, and therefore I would need to ensure I put a filter cap on the input to the regulator?
Only the inexpensive ones would likely be unregulated. Better units would be regulated.

If you're going with an inexpensive one, don't be surprised if it doesn't perform to it's specs.
 

Thread Starter

KeeganPren

Joined Jan 21, 2019
8
I always assumed that your typical, i.e. cheap, AC adapter was only rectifying the wave form to provide a DC output that should not be assumed to be constant voltage. Point taken though, some adapters may provide both rectification and regulation, but your typical cheap adapter is just a step down transformer with a bridge rectifier in it.

I'm assuming a cheap adapter for my input. In that case the input capacitor provides a buffer of sorts to provide a more linear input voltage to the regulator.

So going back to my specific application, assuming a cheap AC adapter, I need an input capacitor that provides enough of a buffer? filter? (help me out with the correct terminology here) such that the input on the voltage regulator is smoother; and not bouncing between 0-9V (assuming a 9V adapter) at 120Hz (taking the 60Hz AC coming out of my wall and rectifying it basically gives me DC at 2x the frequency).
 

dl324

Joined Mar 30, 2015
16,839
So going back to my specific application, assuming a cheap AC adapter, I need an input capacitor that provides enough of a buffer? filter? (help me out with the correct terminology here)
Filter cap.
such that the input on the voltage regulator is smoother; and not bouncing between 0-9V (assuming a 9V adapter) at 120Hz (taking the 60Hz AC coming out of my wall and rectifying it basically gives me DC at 2x the frequency).
  1. Is 9V the peak voltage? You can't measure peak voltage with a DVM, you need an oscilloscope. A DVM will give you some average reading that won't give much information about the actual waveform.
  2. Is there any filtering being done in the adapter?
  3. What is the maximum load current on the 7805?
  4. What is the current capability of the wall wart?
  5. Does the voltage drop significantly at the rated load current? Is the voltage significantly higher with no load?
 
Although, you can "calculate" the capacitor value required for a linear line frequency input regulator, a "rule of thumb" is 1000 uF/Amp.

The linear regulator needs to have it's input higher than the output. LDO's or low drop out regulators keep that number smaller.
The regulator has to dissipate (Vin-Vout)*I . A transformer has a regulation number associated with it. e.g. The load affects it's output.
The AC line has a min and max associated with it too. Usually +-10%.

Robustness of your "system" might include paying attention to transient suppression, thermal effects, RFI and EMI hardness.

There is a "cute" wall-wart replacement that I used. http://www.minute-man.com/acatalog/Multi_Voltage_Economical_Power_Supply.html
It basically selects an appropriate secondary for the DC voltage selected. It used a linear regulator. Mom's bedside radio picked up too much AC interference when listening to AM radio. This fixed it. Batteries, of course, worked fine.
 

ian field

Joined Oct 27, 2012
6,536
I have some basic questions about 7805 based power supply circuits. The circuit design is very simple, and not terribly difficult to understand. Looking at the datasheets, there are decoupling capacitors on both the input and output side of the regulator...and that's about it. What I do not totally understand is how to select those capacitors, not the values but the type. In TI's data sheet, for example, they explicitly specify a 0.1uF ceramic capacitor should be used on the output. However for the input side they only specify that it should be .22uF, but not any particular type. I have also seen data sheets that do not specify the type to be used for either the input nor the output.

How do you determine the right type of capacitor for the application? Does it matter at all? I'm mostly confused by this because in photos of boards people have made I have seen electrolytic capacitors used almost universally and I assume there is a reason for this. Those types of caps are also used on the output which is the only place I have seen a datasheet specific specifically what type to use. Even then, they called for the use of a ceramic capacitor, so why does everyone seem to use an electrolytic?

I also have a question regarding the use of the protection diode called in the application notes. Again, it is not difficult to see how this works, but when to apply it is not obvious to me. They talk about usage in instances when the load on the other side is capacitive, but I'm not sure how to determine this. In my current application I'm looking at using the supply to drive a small MCU like an ATTiny85 and maybe a small two line LCD display. Is that a capacitive load? How do you determine this?

Full disclosure, if my questions seem exceedingly basic, I'm a software engineer by training and whatever EE material I learned is now 20 years old and unpracticed. I'm approaching this completely as a hobbyist at this point with maybe a slightly stronger background in some of the fundamentals ;)

the electrolytic capacitor on the input side is mostly reservoir, you can make it as big as you like as long as the cold start charging current doesn't stress the rectifier and power source. The output cap is mostly filter, to much capacitance or too low ESR can make the 3T regulator burst into song, You can usually get away with about 22 - 47uF.

The most important protection diode is connected reverse bias from input to output. current flowing back into the 3T reg will kill it.
Thanks in advance.
 
Top