LM7812 Power Supply

Discussion in 'The Projects Forum' started by tracecom, Apr 17, 2010.

  1. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I have built several simple power supplies using the LM7812 and schematics snagged from various sources, however the sources are very inconsistent in the values of the electrolytic capacitors both on the input and output sides of the 7812. Is there a simple calculation for these values or perhaps a reference table? Secondly, many do not use bypass capacitors on the input and outputs of the 7812 even though some datasheets recommend them; under what circumstances can/should they be omitted? And finally, how do I determine if a heat sink is required on the 7812 and what size it should be? As you can tell, I'm not an engineer, so help is appreciated; thanks in advance.
     
  2. ifixit

    Distinguished Member

    Nov 20, 2008
    638
    108
    Welcome,

    First; use the spec from Fairchild Semiconductor. It is complete and has application data included. Some other spec sheets don't.

    www.fairchildsemi.com/ds/LM%2FLM7805.pdf


    The input filter requirements are not a concern for the regulator, but it does required some stabilizing caps on the in and out. Refer to the spec.

    Filtering the supply is your concern. If it is a rectified 50/60Hz source then you will need sufficient capacitive filtering to ensure the DC does not drop too low and go into the regulator dropout voltage requirements. The cap value is also dependant on the load requirements and supply impedances.


    The regulator is also the output filter. Filtering on the output side is often not required, but you'll see it done because the designer doesn't know any better, or is using a "rule of thumb". It should be done only;
    • as required by the various loads to control noise
    • to prevent interference amoung devices. e.g. Decoupling caps on switching logic devices.
    • to improve the transient load response of the regulator.
    To help with the input filter design we need to know more details.

    Regards,
    Ifixit
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    As you can read in the datasheet that Ifixit posted, the minimum requirement is an 0.33uF cap on the input, and an 0.1uF cap on the output of the regulator. These should be located as close to the regulator as physically possible.

    If the caps are omitted, the regulator may not be stable. In tests of random samples of 78xx regulators, I have observed some oscillating at several MHz without the stabilizing capacitors. Adding caps of the recommended values stopped the oscillations.

    If you have these two capacitors on the input and output terminals, it won't oscillate. You can add more as required.

    Every IC used in your circuit should have a 0.1uF "bypass" cap across it's power/ground pins. This is standard, and goes without saying. Many schematics don't show them, but it is understood that they are required.

    As far as heat sinks, you need to first decide what your maximum power dissipation (Pd) is going to be.

    Pd = (Vin-Vout) * Iin. Basically, Iin = Iout+~6mA. The 6mA current flows through the GND terminal.

    A TO220 package has roughly a 4°C/Watt thermal resistance.
    Thermal coupling to ambient air without a heat sink is rather pathetic.
    Even with a large heat sink, you're pretty limited as to the power dissipation.
    If the package gets up to about 120°C, the regulator will shut down to protect itself.
     
  4. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Thanks for the responses.


    The power supply that I need will power a small comparator circuit (LM358) that is on continuously. In addition, users may choose to connect additional loads as needed (e.g., a computer fan, an LED light source, and/or a small 12 vdc motor) up to a total load of 1 to 1.5 amps. The load on the ps will vary according to the needs of the user.

    The input to the LM7812 will be from a 5a transformer with a 117vac primary and a 12.6v ct secondary; the rectification will use full wave bridge consisting of 4 6A diodes. (Note that most of this power will not pass through the LM7812, but will be used to power a large resistive load; this unregulated power will be switched by a MOSFET controlled by the comparator circuit.)
     
    Last edited: Apr 18, 2010
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, you'll have over 16v on the filter capacitor at full load. It'll be higher if there is no load at the filter; maybe 19-22v.

    You'll need around 30,000uF for your filter caps to get less than 2v ripple on the filter at peak current.

    So let's say worst case - you have no load on the filter other than the regulator, and someone puts an 8 Ohm load on it for 1.5A current.

    Let's also say that the average filter cap voltage is around 21v with a 1.5A load.

    So, 21v - 12v = 9v, multiplied by the 1.5A current is 13.5 Watts.

    Let's say your lab is 25°C, or 77°F.
    With the TO-220 packaged 7812, you'll get 5°/Watt thermal resistance between the internal circuit and the heat tab. So, that's 67.5°C even if you have a perfect coupling to ambient air. 25°C + 67.5°C = 92.5°C, and the regulator will go into thermal shutdown at around 120°C. You will need a very good heat sink, most preferably copper, with forced air cooling.

    With no heat sink, thermal resistance to ambient air is 65°C/Watt. If ambient air is 25°C, you will run into thermal shutdown at about 1.54 Watts, or a load of about 171mA - that's based on the filter cap average still being 21V.
     
  6. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    SgtWookie,

    Thanks for the explanation.

    I was naive enough to think that the power supply would be the simple part of this project, but apparently not. (As I stated in my first post, I have had no formal engineering training.) When I first started tinkering with my comparator circuit, I used a 9v battery to power it which works but besides the obvious battery life issue also seems to cause the MOSFET to switch a little slowly.

    So I bought a 12v power supply off the web. It uses a .5a 12.6v ct transformer, a full wave bridge package, an LM7812 (no heat sink), no bypass capacitors, 1000uf on the input to the 7812, and 220uf on the output of the 7812. It powers my circuit just fine and I thought that I could just scale it up to handle the fan, light, and/or motor mentioned in my original post. I knew that the 7812 would not handle the entire 5a, but I thought that powering my resistive main load with non-regulated output from the supply would solve the problem. I see that I was wrong.

    Could you please explain the math of how you came to the 30000uf capacitor on the input to the 7812? I have never seen a circuit that included a capacitor larger than 4700uf on the input. I am not contradicting you, but I don't know how to make such a calculation.

    Is there a better way to economically achieve my goal? Can I power the fan, light, and/or motor with unregulated power? What are the risks there?

    I am not wedded to the 7812 circuit; is there a better (but economical) way to power this project?

    Thanks again.

    P.S. Comments and advice are welcome from anyone. :)
     
    Last edited: Apr 18, 2010
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Vr=Io/(F x C)
    where:
    Vr = peak-peak ripple voltage
    Io = current being drawn from the filter; in your case 5A
    F = ripple frequency; for a full-wave bridge connected to a 60Hz secondary that's 120.
    C = Capacitance in Farads.
    A 5,000uF filter cap would give you 8.3v peak-peak ripple with 5A current.
    20,000uF would get you to about 2.1v p-p, which actually should be adequate for a 5A total load (from the filter cap and your 7812 regulator).
    However, the formula does not take into account the ESR of the capacitors (ESR=Equivalent Series Resistance). It's a very simplified formula.

    The 7812 has a dropout of 2v at around 1.5A out. So, if the input ever drops below 14v, you'll see the ripple in the output of the regulator.

    You don't have much "headroom" to start with. The 12.6v @ 5A transformer output will be roughly 17.82 p-p voltage. You're going to lose about 1.5v total across your full-wave bridge, so that brings the peak voltage down to about 16.3. Since your regulator outputs 12v, and has a 2v dropout, you need "smooth" 14v input - so, 16.3v-14v=2.3v maximum P-P ripple.

    I didn't calculate the original 30,000uF; it was a "ballpark" estimate that took into account the fact that large capacitors have a fair amount of internal resistance. The internal resistance will increase the ripple.

    To get below 2v P-P ripple, you will need 21,000uF capacitance with low-ESR caps.
     
    Last edited: Apr 18, 2010
    tracecom likes this.
  8. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Thanks SgtWookie for your input; I can see that calculating all the design parameters is over my head.

    To all:

    I am still left with the following questions.

    "Is there a better way to economically achieve my goal? Can I power the fan, light, and/or motor with unregulated power? What are the risks there?

    I am not wedded to the 7812 circuit; is there a better (but economical) way to power this project?"

    My objective doesn't seem all that rare. Surely it is a problem that someone has solved. Thanks in advance for any help.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
  10. ifixit

    Distinguished Member

    Nov 20, 2008
    638
    108
    Perhapes you could rectify, filter, and regulate for only the loads that need this (1.5Amps). This would reduce the size of the filter caps and diodes. The other loads that don't require filtering can be run from the secondary winding via a second set of larger diodes. Just an idea.
     
  11. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393

    I will test the fan, lights, and motor to see if there is a problem with unregulated DC. Thanks.
     
  12. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    SgtWookie,

    I have tried three times to respond to your last post, but none have shown up on the thread. I don't know what to make of that, but nonethless, I thank you for the links to MJPA.
     
Loading...