Adjustable power supply using LM317 (30v, 1.5amps) (also LM338, 5amp version; the LM78XX's can also be used) ___ |_O_| <-- tab is connected to center pin | | |___| TO-220 Standard Pin Diagram ||| 123 LM317 1: adjust 2: output 3: input tab: output LM317 has V[fixed] at 1.25V (this is also called V[reference]). V[out] = V[fixed] * ( 1 + R2/R1 ) + (I[adjust]*R2) R2 = ((V[out]/1.25) - 1) * R1 R2 = 240ohm for 2.5v out * The R2 assembly (R2a and R2b) help control the output voltage. One or the other or both may be used. Typically it is better to use a fixed resister just under the desired capacity and use a 200ohm or so variable resister below it for fine tuning. Since variable resisters are usually lower wattage, "below" is the preferred placement. Multi-turn variable resisters are preferred for easier and more accurate voltage setting. Since there are a lot of different pieces in this regulator circuit, use the equation to get close to the desired value. If a variable resister is unwanted, meter out R2a and R2b and replace them with the desired value (with that new resister being pre-metered before install, of course). * V[out] is in volts and must be at between 1.2V and 30V. * V[in] should be at least 2.5V greater than V[out]. Select a wall adapter with a voltage at least 2.5V greater than your regulated output at full load. * Maximum output current is 1.5A. Use proper heatsink for LM317 if it has to dissipate more than 1W. Lower voltages should need bigger sinks if there is a high voltage difference between input and output. * Use at least a heat sink 3x larger than the chip. * The tab of the LM317 is connected to the center pin. * LM317 is short and thermal protected (very ideal for small apps) * D1 and D2 help prevent damage if the C2 and C3 short out and for discharge. Bypass diodes prevent caps from discharging into the LM317 causing damage. Most 25uF caps don't pose much of a threat, but anything higher can cause damage if the cap is shorted. Also mentioned: No protection is needed for output voltages of 25V or less and 10µF capacitance. * D3 and D4 are mainly paranoia and really aren't needed for general supply usage. These diodes protect from something like a battery charge circuit. When the power is removed from the regulator, instead of absorbing energy, the battery is suddenly pushing it "backwards" through the circuit and may cause damage. * C1 improves transient response and helps with voltage stabilization. A smaller value for C1 may be used if this has already been done earlier in the circuit (like right after the diode bridge). * C2 is the input bypass capacitor. C2 is needed if device is more than 6 inches from filter capacitors. It also helps filter out impedance and inductance problems from larger capacitors. * C3 is the ripple rejection capacitor. It is really only needed when R2 is adjustable but helps stability regardless. * C4 is for stabilizing and ring rejection. * C5 is optional for transient voltage rejection. This is mainly for heavy loads and should be the same size or smaller as C1. * C6 is usually tantalum or film and is used to filter out inductance and resistance problems of larger capacitors. It helps keep impedance low as total inductance rises. This is good for audio applications. * A slow blow fuse will help prevent damage in a short or run away situation. * The LED+R3 across the fuse will light if the fuse has been blown. The LED should be red for a warning color. * The LED+R4 are optional but convenient to see if the circuit is live. R4 is around 500ohm for ~5v, 1000ohm for ~12v. * Remember that before the voltage regulator, the voltage is whatever that is supplied and may fluctuate radically. When choosing parts, account for this. After the voltage regulator should be consistent at the set voltage and typically lesser voltage rated parts may be safely used. ---- Although the LM117 is stable with no output capacitors, like any feedback circuit, certain values of external capacitance can cause excessive ringing. This occurs with values between 500 pF and 5000 pF. A 1µF solid tantalum (or 25µF aluminum electrolytic) on the output swamps this effect and insures stability. Any increase of the load capacitance larger than 10µF will merely improve the loop stability and output impedance. For non-standard resister values in series just add them up. Same value resitors connected in parallel (side-by-side) yield R[resistance]/total_number. Once the regulator's input voltage drops below the dropout voltage, regulation will naturally fail, and ripple will appear at the output. In audio applications this will eventually find its way to our ears, causing much muttering and complaining, and rude words surely cannot be far behind! The capacitor on the output side should be rated at least 3 times the intended output voltage. This is generally true when rating all capacitors for safety. Best caps: Solid tantalum capacitors have low impedance even at high frequencies. Depending upon capacitor construction, it takes about 25µF in aluminum electrolytic to equal 1µF solid tantalum at high frequencies. Ceramic capacitors are also good at high frequencies; but some types have a large decrease in capacitance at frequencies around 0.5MHz. For this reason, 0.01µF disc may seem to work better than a 0.1µF disc as a bypass.