Hey, if you’re diving into electronics and need a reliable way to control current for projects like LED lighting, battery charging, or component testing, an adjustable constant current source is a game-changer. The schematic you shared features the LM317 regulator set up to deliver 125-400mA, adjustable with a potentiometer. As an experienced electronics engineer, I’ve analyzed this simple yet effective circuit and will walk you through how it works, the parts you need, a step-by-step build guide, and tips to customize it. Perfect for hobbyists, this setup is affordable and practical. Let’s get building!
What Is a Constant Current Source and Why Choose LM317?
A constant current source maintains a steady current through your load, regardless of resistance changes or slight voltage shifts. This is crucial for LEDs (to prevent burnout), batteries (for safe charging), or testing circuits. Unlike voltage regulators, it adapts the output voltage to keep the current stable.
The LM317, typically a voltage regulator, doubles as a current source with ease. It supports up to 1.5A, includes thermal and short-circuit protection, and requires minimal components. This circuit uses its 1.25V internal reference with a resistor and potentiometer to adjust current from 125mA to 400mA—ideal for many applications. For higher currents, you can add a transistor, but this keeps it simple.
Compared to specialized chips, the LM317 costs under $1 and is widely available. It’s less efficient than switch-mode designs but handles low to medium currents well with a small heatsink.
Breaking Down the Circuit Design
The schematic is clean and minimal. The LM317 (TO-220 package) has three pins: In, Out, and Adj. Here’s the layout:
- Input voltage (5-40V, at least 3V above the load) connects to the In pin.
- The Out pin links to R1 (10.5Ω, 3W resistor), the current sense resistor.
- R1’s other end goes to the Output, where the load’s positive terminal attaches (load negative to ground).
- The Adj pin connects to one end of R2 (220Ω).
- R2’s other end ties to the wiper of R3 (500Ω potentiometer).
- R3’s outer pins connect across the feedback loop: one to the Output (after R1), the other to ground (upside-down wiring for linear control).
This uses R2 and R3 as a voltage divider to scale the 1.25V reference across R1. The LM317 adjusts to maintain this voltage, modulating current based on the divider ratio. Max pot resistance gives 125mA; min gives 400mA. If the pot fails, it defaults to low current, adding safety.

How It Works: Simple Explanation
The LM317 keeps 1.25V between Out and Adj. Normally, current I = 1.25V / R1, but the R2-R3 divider multiplies this range. Calculations:
- Minimum current (pot max): I_min = 1.25 / 10.5 ≈ 119mA (near 125mA)
- Maximum current (pot min): I_max = [1 + (R3 / R2)] * I_min ≈ [1 + 500 / 220] * 0.119 ≈ 389mA (close to 400mA)
Turning the pot adjusts the feedback, letting the LM317 vary the current. Input voltage must cover the load voltage plus a 3V dropout (1.25V reference + 1.7V internal). For a 3V LED at 200mA, use at least 6V.
Heat matters: At max current, the LM317 drops (Vin – Vload – I*R1). A heatsink helps if Vin is high.
Parts You’ll Need
Gather these affordable components from Digi-Key or Amazon:
- LM317 regulator (TO-220 package)
- R1: 10.5Ω (or 10Ω) 3W resistor
- R2: 220Ω 0.25W resistor
- R3: 500Ω linear potentiometer
- Heatsink for LM317
- Optional: 0.1µF ceramic input cap, 1µF electrolytic output cap
- Power supply: 5-40V DC, current capacity + overhead
- Protoboard, wires, multimeter
Cost: Under $5 with basic tools. Use 1% tolerance resistors for precision.
Step-by-Step Build Guide
Start on a breadboard, then solder for durability. Here’s how:
- Attach the LM317 to a heatsink. Pin order: In (left, tab back), Adj (middle), Out (right).
- Connect the input positive to In, negative to ground.
- Solder R1 from Out to the Output terminal.
- Link Adj to one end of R2.
- Connect R2’s other end to R3’s wiper (middle pin).
- Wire R3’s outer pins: one to Output (after R1), the other to ground (test for increasing current).
- Add optional caps: 0.1µF across input, 1µF across output.
- Power on without load—Output should be near 0V. Add a 10Ω resistor (for ~125mA) and measure current.
- Turn the pot to check the 125-400mA range.
If the current is off, reverse the pot ends or check R1.
Customize Your Current Range
Want a different range? Adjust the values:
- Set R1 for I_min: R1 = 1.25 / I_min
- For I_max, use R3 / R2 = (I_max / I_min) – 1; pick R2, then R3 = R2 * [(I_max / I_min) – 1]
Example: For 50-200mA, R1 = 1.25 / 0.05 = 25Ω. Ratio = 200 / 50 = 4, so (4-1) = 3. With R2 = 100Ω, R3 = 300Ω.
Check power: P_max = (I_max)² * R1. Stay under the resistor’s rating.
Test with a multimeter for stability.
Real-World Applications
This circuit shines in:
- LED driving: Set 350mA for high-power LEDs.
- Battery charging: Adjust for NiMH or Li-ion (add voltage limit if needed).
- Component testing: Test diodes or transistors.
- Electroplating: Control current for small projects.
- Bench supply: Combine with voltage regulation.
I’ve used it for laser diodes to avoid current spikes. For higher power, add a PNP transistor.
Safety Tips
Start with no load or high resistance. The LM317 heats up—add a heatsink if over 60°C. Limit input to 20V to reduce heat (max 40V). Test short-circuit protection briefly.
For batteries, monitor voltage to prevent overcharge. Calibrate with a meter for accuracy.
Troubleshooting Guide
No current? Check wiring—ensure 1.25V between Out and Adj.
Pot not adjusting? Reverse the ends.
Overheating? Lower Vin or add cooling. Current sags? Input too low or load too high (needs up to 37V compliance).
Noise? Add caps or a ferrite bead.
Range off? Verify R1—use 10Ω if 10.5Ω isn’t exact.
Conclusion
This DIY LM317 adjustable current source is a fantastic, budget-friendly project for controlling 125-400mA. With just a regulator, three resistors, and a pot, you get a versatile tool for LEDs, batteries, and more. Tweak the values to suit your needs and enjoy the hands-on learning. Share your mods—I’d love to hear how it turns out!