# The use of capacitors in voltage regulator schematic using 7805 and 7812?

I'm a newbie in electronics so I lack a lot of basic electronic knowledge.

I found this schematic about making regulated power supply 5 V and 12 V DC from AC. The diagram is below:

This is what I know about the schematic:

• J1 can transform the AC voltage using a voltage transformer
• The diode bridge converts AC to DC, but the converted DC is undulated
• C1 (electrolytic capacitor) and C2 (ceramic capacitor) are used to smooth out the undulated DC
• LM7805 and 7812 are regulators used to make the DC voltage constant 5 V/12 V for the J2/J3 output
• R1/R2 resistors are used to restrict current for D1/D2 LEDs. If both the LEDs lit up, we know there is current in the whole circuit.

I have some questions:

1. Are the things I say above right or wrong?
2. What is the use of capacitors C3, C4, C5, C6? Are they used to smooth out the DC, make the output DC more stabilized? What is the difference in the use of electrolytic capacitors and ceramic capacitors in this schematic?
• J1 can transform the AC voltage using a voltage transformer More accurate: J1 i a connector that connects to an AC transformer. This transformer takes 240 V AC (dangerous!) and transforms it into a low voltage AC (for example 15 V AC) which is safe to touch. Nov 11 at 15:14
• If both the LEDs lit up, we know there is current in the whole circuit. More accurate: If both the LEDs lit up, we know there are voltages present at the outputs of the circuit. Nov 11 at 15:15
• C2, C3, C4, C5 and C6: this circuit will very likely work without them but these capacitors are recommended to have in place to make the LM7805 and LM7812 more stable so they behave "better". It is just "good practice" to have these capacitors there. Nov 11 at 15:18
• Regarding electrolytes vs ceramic: they don't make ceramics with such high values as 1mF. As for the rest of the caps with polarity - they could as well be ceramic if you find one with the right voltage rating. 10uF in ceramic 0603/0805 etc is somewhat new technology. Some decade ago you had to use another chemistry like tantalum or aluminium electrolyte. LM78 regulators is very old technology. Nov 11 at 15:20
• LEDs: Do they both lit up when nothing connects with J2 and J3? In normal operation, the LEDs will always be on. The LEDs do not respond to the current flowing through J2, J3. That's why I wrote: " If both the LEDs lit up, we know there are voltages present at the outputs of the circuit." Only if you draw too much current (abnormal operation!) from J2, J3 causing the voltage to drop, then the LEDs will go off. Then the LM78xx devices can get VERY HOT so don't do this. The LM78xx devices do protect themselves so they will not be damaged. Nov 11 at 18:36

Mostly correct except J1 is a connector as jwh said.

What is the use of capacitors C3, C4, C5, C6?

As usual you can think about it in the time domain or in the frequency domain:

Time domain: voltage regulators don't react instantly to a change in load current. So if load current increases quickly, output voltage will sag for a short time, until the regulator catches up. The output capacitors provide short-term storage to minimize this.

Frequency domain: the output impedance of a voltage regulator looks inductive because it rises with increasing frequency. To get a low output impedance (to minimize change in Vout with changes in load current) across a wide band of frequency, capacitors are added, which offer low impedance at high frequency.

These capacitors are also important for stability: always check the datasheet, some regulators will oscillate with the wrong caps. 78xx series regulators aren't picky though.

If there are long wires between the regulator and the load, that will increase inductance, so the supply voltage at the load will be more dependent on load current. Thus we add decoupling capacitors close to the load. In this case, these decoupling caps are the ones in charge of keeping the supply impedance low and storing some energy for quick changes in load current, and the caps close to the regulator are more in charge of keeping it stable.

Are the things I say above right or wrong?

Mostly except for the statement about J1. J usually designates a connector and this is neither a transformer or other device that changes the AC mains input voltage. That part of the circuit is not shown and it's likely this circuit requires some AC input voltage like 15 VAC.

What is the use of capacitors C3, C4, C5, C6? Are they used to smooth out the DC, make the output DC more stabilized? What is the difference in the use of electrolytic capacitors and ceramic capacitors in this schematic?

These output side capacitors help maintain the output voltage under varying load conditions. So just like the input side caps, they provide filtering.

The electrolytic caps perform better at low frequencies while the ceramic caps perform better at higher frequencies. So by combining both you get a reasonable coverage of different loads, some of which may include switching devices that make higher frequency demands on the supply.

• The capacitors also make the voltage regulator stable--many linear regulators (low-dropout ones are particularly prone to this, but the 78xx series can too) can end up oscillating without an appropriate amount of capacitance on their output, and some require input capacitance too. Some of them even require capacitors with a minimum amount of ESR, even! This is distinct from merely passing input noise to the output; the oscillation still happens even with a perfectly stable, noise-free input. Nov 11 at 15:33

Apart from preventing oscillation as mentioned in other answers, the output capacitors also significantly suppress noise on the supply lines: voltage references in circuits like 7805 and 7812 are noisy and this noise gets amplified along with the reference voltage for reaching the output voltage. The chip area does not provide significant room for adding smoothing capacitors for quieting the reference source. So instead you put a capacitor on the output. This works reasonably well because the linear regulator acts as current source but not actively as sink, so it doesn't pump current back and forth in line with the noise on the reference voltage source.

For motors and other loads and logic circuits, that kind of noise on the supply lines is not overly relevant. For audio and measuring circuits, it can be rather detrimental.