Every project needs a power supply. As 3.3volt logic replaces 5volt systems, we’re reaching for the LM317 adjustable voltage regulator, rather than the classic 7805. We’ve found four different hobbyist-friendly packages for different situations.
A simple voltage divider (R1,R2) sets the LM317 output between 1.25volts and 37volts; use this handy LM317 calculator to find resistor values. The regulator does its best to maintain 1.25volts on the adjust pin (ADJ), and converts any excess voltage to heat. Not all packages are the same. Choose a part that can supply enough current for your project, but make sure the package has sufficient heat dissipation properties to burn off the difference between the input and output voltages.
Here is a breakdown of the voltage regulators illustrated above:
IC1 LM317LZ 200mA, TO-92 ($0.59) – This is the smallest common LM317 voltage regulator. The part linked can supply 200mA, but 100mA is more common. The TO-92 package can get searing hot because it doesn’t dissipate much heat.
IC2 LM317T 1.5amps, TO-220 ($0.64) – At 1.5amps, this regulator supplies enough power for most digital circuits. We prefer the surface-mount D2Pack version (IC4) because we don’t like to drill holes. The TO-220 package dissipates a ton of heat, and the metal tab will accommodate a heat sink if you want even more cooling. Use this package if you need maximum heat dissipation.
IC3 LM317MDCYR 500mA, SOT-223 ($0.80) – This is our favorite LM317 package. 500mA is plenty of power for many projects, and the small SOT-223 package fits about anywhere.
IC4 LM317D2T 1.5amps, D2Pack ($0.83) – We design with the D2Pack regulator when a circuit uses more than 400mA of current. D2Pack is a surface-mount version of TO-220 that’s easy to solder.
Footprints for all LM317 packages are included in the default Cadsoft Eagle v-reg (voltage regulators) part library.