|LM317/337 voltage regulators|
The LM317/337 series voltage regulators can be used as an upgrade for the standard 78xx/79xx ones that are often found in CD-players. The specifications are certainly not as good as those of a specially designed low-noise regulator, but they offer good ripple rejection, are easy to build and dirt cheap! They can be used to improve the supply of the analog output stage, which often uses opamps that are supplied with a symmetrical +/-12V or +/-15V voltage. Usually, a 7812 and 7912 can be found here. They can be replaced by an LM317 and LM337 regulator, set for 12V. The 5V digital supply section of a player is often fitted with one or two 7805 type regulators, which can be replaced by an LM317 set for 5V.
How difficult is that?
The LM317/337 regulators are very easy to use. They are adjustable regulators, and they can be set to any desired output voltage between and 1.2 and 37V. The LM317 and LM337 are not pin compatible with the 78xx/79xx regulators: two external resistors are needed to set the output voltage. The 78xx/79xx types are fixed voltage regulators and they have these resistors fitted internally, on the regulator's silicon chip. Instead of the 78xx/79xx GND (ground) pin, the LM317/337 type regulators have an ADJ (adjust) pin to which these resistors have to be connected. An extra advantage of this is that this pin can now be decoupled externally. An extra capacitor connected between this pin and ground is all that's needed to improve things like the ripple rejection by 15dB.
LM317 DIY regulator LM337 DIY regulator
A small PCB can be used to accommodate the regulator and the extra components. If it's fitted with a three pin connector that matches the 78xx/79xx pinning, the small LM317/337 regulator PCB's will be a drop-in replacement for these regulators.
The basic operation of the LM317 is as follows: the regulator adjusts it's output voltage (Vout) in such a way, that a voltage equal to the internal reference voltage (Vref) drops across R1. The reference voltage can be found in the datasheet: it's 1.25V ±4%. It is a constant, and because of this, the current I1 that flows through R1, and via R2 to GND is also a constant. R1 sets this current by:
The output voltage is equal to the total voltage drop across R1 and R2, so:
With I1 filled in:
This leads to:
There is a small amount of current flowing out of the ADJ-pin, about 50...100µA. This current also creates a small voltage drop across R2 and this can be included in the output voltage by adding the term Iadj * R2 to the formula:
This is the formula shown in the picture. The output voltage will have a tolerance of maximum 5%, caused by the tolerance of the reference voltage and resistor tolerance. If a more accurate voltage is needed, R2 can be substituted by a trimmer, or an LM317A can be used. The A-version has less reference voltage tolerance.
Output voltage calculation
Setting the output voltage is done by filling in the variables: choose the values of R1 and R2 and fill in Vref to calculate Vout. The term Iadj*R2 is usually omitted because it only adds a tiny amount to the output voltage. But in most cases, the desired output voltage is already a known value. The formula can be rewritten as shown below, to simplify resistor calculation:
R1 sets the current that flows through both resistors, so it is chosen first. The regulator requires a minimum output current load of about 10mA (worst case), so it has to be sure there is at least this amount of current running. In most cases this is done by choosing R1 somewhere between 100...150Ω. As shown above, there is a fixed reference voltage of 1.25V across R1, so this will insure between 12.5 and 8.3mA is running if R1 is chosen in this value range. Together with the external load, the required 10mA is easily met.
It is possible to use a higher value resistor for R1, but then it has to be sure that the external load draws at least 10mA of current. For example, let's say a few extra LM317's are used to create a dedicated supply for the DAC chip in a CD-player, like the SM5872 DAC. The current-draw of the various supply voltages can be looked up in the datasheet, see the image below. The digital supply (DVdd) draws 15mA typical, so no problems are to be expected here. But the other supplies, AVdd and XVdd, draw only a few mA. So an LM317 may become unstable here, with R1 = 220Ω. This can be solved by simply putting an extra 470Ω load resistor across the output terminals that will draw some extra current. But a more elegant solution is to lower R1 to 120Ω and use a 360Ω resistor for R2. This calculates nicely for 5V, and will comply with the 10mA rule. With these values, these regulators can safely be used in any circuit, without having to worry about the minimum current requirement.
The extra parts around the regulator
The extra capacitor C2 that's connected across R2 improves the regulator's ripple rejection, output impedance and transiënt response. Therefore, it's highly recommended. A tantalum or good quality electrolytic cap will do fine here. The value of this capacitor depends on that of R2, because it forms a high-pass filter with this resistor. For example: use 100...220µF if R2 is 360Ω (@ R1 = 120Ω, 5V output) and a 22...47µF capacitor if R2 is 1k3 (@ R1 = 150Ω, 12V output). An even larger value doesn't improve things further.
Extra input and output caps will further improve stability. If the regulator is close to the buffer capacitor, an input capacitor is not required theoretically, but it does no harm to use one. This way, it's always sure the stability requirements are met (see datasheets for more info). The LM317 and 337 don't mind large output capacitors, but avoid the ones with an extremely low-ESR types, like Rubycon ZA or Sanyo OsCon, as a general rule.
The extra diodes D1 and D2 protect the regulator from large discharge currents of C1 and C2, that occur in case of a short-circuit on the input or output terminals. They provide a safe external discharge path, so the regulator is not damaged. A generic type, like the 1N4000 series, is fine here.
The LM337 regulator can be used if a negative output voltage is needed. Together with an LM317, a symmetrical supply can be constructed. The formula is the same, apart from a minus sign here and there. Another difference is that the adjust-current flows into the ADJ-pin instead of out of it. Also, with the LM337 a 1µF output capacitor is mandatory, where with the LM317 it's optional. Mind the polarity of the capacitors! For the negative version, these have to be connected with the + to ground (GND).
Lots of information can be found on the internet about these regulators.
Voltage regulators in practice