ToolSphere
All perfboard layouts

LM317 3.3V Regulator Perfboard Layout

The LM317 is an adjustable regulator: two resistors set its output anywhere from 1.25 V up. This board sets it to 3.3 V for ESP32, sensors and other 3.3 V parts.

LM317 3.3 V supply perfboard layoutU1 LM317R1 240RR2 390RC1 100nC2 1uJ1 DC INJ2 3V3 OUT
Open this layout in the simulator Connection check: no shorts, 4 named nets

Red wires carry power, white is ground, yellow and blue are signals. Every hole is an isolated pad; connections are the wires shown. In the simulator you can move parts, add your own and re-run the check.

Parts list

As an Amazon Associate, ToolSphere earns from qualifying purchases.

How it works

The LM317 keeps 1.25 V between its OUT and ADJ pins, so the two resistors set the output:

VOUT = 1.25 V × (1 + R2 ÷ R1)
     = 1.25 × (1 + 390 ÷ 240) = 3.28 V

Other common settings with R1 = 240 Ω: R2 = 720 Ω gives 5.0 V, R2 = 1.2 kΩ gives 7.5 V. Keep R1 at 240 Ω so the regulator's minimum load current flows through it.

Pin order on the TO-220 package, looking at the front with the legs down, is ADJ, OUT, IN, different from the 7805's IN, GND, OUT. That is the most common wiring mistake with an LM317.

Like any linear regulator it needs headroom (feed it at least about 2 V more than the output) and turns the difference into heat: (VIN − 3.3 V) × current.

Building it, step by step

  1. Run VIN along the top right, +3V3 along the top left and GND along the bottom.
  2. Fit the LM317 with ADJ, OUT, IN from left to right (check your part's datasheet).
  3. Fit the 240 Ω resistor from OUT to ADJ and the 390 Ω from ADJ to GND, close to the regulator.
  4. Fit the 100 nF input capacitor and 1 µF output capacitor to GND.
  5. Add the input and output connectors and measure 3.3 V with no load before connecting anything.

Tools for this build

Frequently asked questions

How do I set the LM317 output voltage?

VOUT = 1.25 × (1 + R2 ÷ R1), with R1 between OUT and ADJ and R2 from ADJ to ground. With R1 = 240 Ω, R2 = 390 Ω gives 3.3 V and 720 Ω gives 5 V.

What is the LM317 pinout?

Facing the front of the TO-220 package with the legs down: ADJ, OUT, IN. Always confirm with your part's datasheet.

LM317 or a buck converter?

The LM317 is simple and quiet but wastes (VIN − VOUT) × current as heat. From a battery or at more than a few hundred mA, a buck converter is far more efficient.