A current source with op amp leverages the massive open-loop gain of an operational amplifier to drive a pass transistor, forcing a precise, constant current through a load regardless of supply or load voltage fluctuations. For a reliable, low-cost bench build capable of 0-5A, the safest default is pairing an LM358 dual op-amp with an IRLZ44N N-channel MOSFET and a 0.1Ω 5W sense resistor. Unlike linear regulators like the LM317 that waste headroom and drift thermally, an op-amp topology lets you set the exact current via a low-side reference voltage, achieving sub-1% accuracy for LED driving, battery charging, and electronic loads.

Terminology Note: Placing the pass transistor on the low side (between the load and ground) technically creates a current sink. However, because the load is typically tied to the positive rail, this topology functions as the constant-current driver for the circuit and is universally referred to as a current source in bench practice. If your load must be grounded on the positive side, you need a high-side P-MOSFET source, which requires an op-amp with high common-mode input range or a dedicated current-sense amplifier.

Anatomy and Pinout of the Op-Amp Current Source

To build this circuit, you need to understand the exact pinout and signal flow of your core components. The Texas Instruments LM358 is the industry-standard workhorse for this because it operates on a single supply and its common-mode input range includes ground (0V), which is critical when measuring the millivolt drop across a low-side sense resistor.

LM358 Pinout (Single Op-Amp Half)

  • Pin 3 (Non-Inverting Input +): Receives the reference voltage (V_ref) that dictates your target current.
  • Pin 2 (Inverting Input -): Connects to the high side of the sense resistor. This is the feedback node.
  • Pin 1 (Output): Drives the gate of the MOSFET. It will swing to whatever voltage is necessary to make Pin 2 equal Pin 3.
  • Pin 4 (GND / V-): Circuit ground.
  • Pin 8 (VCC / V+): Positive supply for the op-amp (typically 5V to 12V, independent of the high-power load supply).

IRLZ44N N-Channel MOSFET Pinout

  • Gate (G): Driven by the op-amp output. Voltage here controls the channel resistance.
  • Drain (D): Connects to the negative terminal of your load.
  • Source (S): Connects to the high side of the sense resistor. The voltage here is the feedback signal.

Operation Regions and Safe Default Part Numbers

Selecting the right components requires understanding the operation regions of the MOSFET. In a switching application, you toggle between Cutoff and Ohmic. In a linear current source, the MOSFET must operate in the Saturation (Active) region, where it acts as a voltage-controlled current valve. This generates significant heat.

Component State Region / Mode Typical Voltage / Current Purpose in Circuit
MOSFET Saturation (Active) V_DS = 2V to 15V, I_D = Target Current Dissipates excess voltage as heat to maintain constant current.
Op-Amp Linear (Closed-Loop) V_out = V_GS(th) + I*R_sense, I_out < 20mA Compares V_ref to V_sense and adjusts Gate voltage to eliminate error.
Sense Resistor Ohmic (Linear) V_drop = 0.1V to 1.0V, I = Target Current Converts load current into a measurable feedback voltage.

Safe Default Part Numbers for the Bench

When selecting parts, avoid high-speed op-amps (like the NE5532) as they are prone to oscillation in high-gain DC loops. Stick to slow, stable, single-supply op-amps.

  • Op-Amps: LM358 (cheap, single-supply, ground-sensing), TLV2372 (rail-to-rail, better precision), OPA54 (if you need the op-amp to source high gate currents directly).
  • N-Channel MOSFETs: IRLZ44N (logic-level gate, great for 12V/5V op-amp drives, TO-220 package for easy heatsinking), IRF540N (requires >10V gate drive, use only if op-amp is powered by 12V+).
  • Sense Resistors: 0.1Ω 5W wirewound (e.g., Ohmite 5W series) or a 0.05Ω 10W chassis-mount resistor for higher currents to minimize thermal drift.

Bench Scenario: Driving a 3A COB LED (And What Went Wrong)

Theory is clean; the workbench is not. Here is a real-world walkthrough of building a current source with op amp to drive a 12V, 3A COB LED array for a photography rig.

The Setup and Numbers

We used a 24V bench power supply, an LM358 powered by a separate 12V rail, an IRLZ44N MOSFET on a medium finned heatsink, and a 0.1Ω 5W sense resistor. To get exactly 3.0A, we needed a reference voltage (V_ref) of 0.300V, generated by a simple 10kΩ/1kΩ voltage divider from a 5V precision reference, buffered by the second half of the LM358.

Math: I_load = V_ref / R_sense3.0A = 0.300V / 0.1Ω.

The Outcome and The Failure

Upon powering up, the LED lit up, but the bench supply's current meter flickered. Probing the sense resistor with an oscilloscope revealed a 40kHz oscillation with the current swinging wildly between 2.6A and 3.4A. The LM358 was running hot.

What Went Wrong (and The Fix)

The IRLZ44N has a high input capacitance (C_iss ≈ 1400pF). This capacitance, combined with the op-amp's output impedance, introduced a low-frequency pole in the feedback loop, destroying the phase margin and causing high-frequency oscillation. The op-amp was essentially acting as a high-frequency AC oscillator, not a DC regulator.

The Fix: We added a 100Ω gate stopper resistor in series with the op-amp output and the MOSFET gate to isolate the capacitive load. We also added a 10nF Miller compensation capacitor between the op-amp's output (Pin 1) and its inverting input (Pin 2). This rolled off the high-frequency gain, restored phase margin, and resulted in a rock-solid 3.01A DC current.

Complete Application Circuit: 0-5A Low-Side Source

Follow these numbered steps to build a robust, oscillation-free constant current driver. Ensure your load's positive terminal is tied to the main positive supply, and the negative terminal goes to the MOSFET drain.

  1. Power the Op-Amp: Connect LM358 Pin 8 to a clean 12V supply and Pin 4 to system ground. Do not power the op-amp from the same noisy rail as the high-power load if possible.
  2. Set the Reference: Use a 10-turn 10kΩ trimpot between 5V and GND. Connect the wiper to LM358 Pin 3 (Non-Inverting). This allows you to dial V_ref from 0V to 5V (yielding 0A to 50A theoretically, but practically limited by your MOSFET and sense resistor).
  3. Wire the Sense Resistor: Solder the 0.1Ω 5W resistor directly between the MOSFET Source pin and system ground. Keep the traces short and thick.
  4. Connect the Feedback: Route a dedicated sense wire from the top of the sense resistor (the MOSFET Source side) directly to LM358 Pin 2 (Inverting). Do not share this ground path with high-current return traces to avoid ground bounce errors.
  5. Install Gate Protection: Solder a 100Ω resistor between LM358 Pin 1 (Output) and the MOSFET Gate. Solder a 10nF ceramic capacitor between Pin 1 and Pin 2.
  6. Add a Gate Pulldown: Connect a 10kΩ resistor from the MOSFET Gate to Ground. This ensures the MOSFET stays off if the op-amp loses power or is unpowered during startup.
  7. Mount the Heatsink: Bolt the IRLZ44N to a heatsink with thermal paste. At 5A with a 10V drop across the MOSFET, it will dissipate 50W. Calculate your thermal resistance accordingly.
Safety Warning: A 24V supply at 5A delivers 120W of power. A short circuit or component failure can cause the sense resistor to explode or the MOSFET to fail short, dumping full supply voltage into your load. Always use a fast-acting fuse (e.g., 6A automotive blade fuse) on the main positive supply line, and verify the circuit is de-energized before probing with a multimeter.

Failure Modes and Multimeter Diagnostics

When your current source fails to regulate, don't just swap parts. Use a digital multimeter (DMM) to trace the control loop. According to voltage-to-current conversion principles, the op-amp will do whatever it takes to make its two inputs equal. If they aren't equal, you've found your fault.

Diagnostic Decision Path

Step 1: Measure V_ref (Pin 3) and V_sense (Pin 2).

  • If V_sense is significantly lower than V_ref, and Pin 1 is pegged near VCC (11.5V): The op-amp is railing. It's trying to turn the MOSFET on harder but can't. Cause: The load resistance is too high, or the main supply voltage is too low to push the target current. (e.g., trying to push 3A through a 10Ω load with only a 12V supply).
  • If V_sense is higher than V_ref, and Pin 1 is near 0V: The op-amp is trying to shut the MOSFET off, but current is still flowing. Cause: The MOSFET has failed short (Drain-to-Source), or there is a solder bridge bypassing the MOSFET.

Step 2: Measure V_GS (Gate to Source voltage).

  • If V_GS is around 2.5V to 4.5V but no current flows: The MOSFET gate might be floating or the pulldown resistor is missing, leaving the gate in an undefined state. Check for a broken gate stopper resistor.

Common Edge Cases and Thermal Drift

The most insidious failure mode in DIY current sources is sense resistor thermal drift. A standard wirewound 0.1Ω resistor might have a temperature coefficient of ±300 ppm/°C. As it heats up from 3A of current (dissipating 0.9W), its resistance drops. If it drops to 0.095Ω, your 3.0A source will silently creep up to 3.15A. For precision battery charging where overcurrent can trigger a BMS fault or cause lithium venting, always use a Kelvin-connected 4-terminal sense resistor (like the Bourns CSS series) with a low TCR (±50 ppm/°C) and ensure your feedback traces connect directly to the sense pads, not the high-current pads.

By understanding the feedback loop, respecting the MOSFET's capacitive load, and managing thermal dissipation, an op-amp current source becomes one of the most reliable and versatile tools on your workbench.