Projects / Op-amp constant current sink

Op-amp constant current sink

Intermediate1.5 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. Wire the reference

    Fit the three 100 kΩ resistors above the pot and set the pot to its lowest end.

  2. LM358IRLZ4428.8°C

    Wire the op-amp and MOSFET

    Follow the table, with the sense resistor from source to ground.

  3. 18.5 mA

    Power up

    The LED should be off with the pot at zero.

  4. 18.5 mA

    Raise the pot

    The LED brightens and the meter shows the current, about Vref divided by 10.

  5. 18.5 mA

    Change the load

    Replace the LED with a 220 Ω resistor and then a 100 Ω resistor and note the current stays the same.

  6. Measure the sense voltage

    With a meter across the 10 Ω resistor, check it matches the pot voltage.

  7. Find the limit

    Note that at a very high resistance the current falls because the supply cannot supply the load voltage.

In short

How do you build an op-amp constant current sink?

An op-amp and MOSFET hold a set current through a load, the basis of electronic loads and LED drivers. You need LM358 Op-Amp, MOSFET IRLZ44N, Resistor 10 Ω, Potentiometer 10 kΩ, Resistor 100 kΩ × 3, LED 5 mm red, Resistor 220 Ω, Resistor 100 Ω × 2, Digital multimeter, 5 V 2 A USB adapter, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 7 steps and about 90 minutes.

Level
Intermediate
Time
About 90 min
Parts
12

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
5 V supply ++ railSupply from a regulated 5 V adapter
5 V supply -- railGround
LM358 pin 8+ railPower
LM358 pin 4- railGround
Three 100 kΩ resistors in series+ rail and potentiometer topReference top, about 300 kΩ
Potentiometer bottom- railReference bottom
Potentiometer wiperLM358 pin 3 (IN+A)Reference voltage, 0 to about 0.16 V
LM358 pin 1 (OUT-A)100 Ω resistor then IRLZ44N gateGate drive, resistor helps stability
IRLZ44N source10 Ω resistor then - railCurrent sense resistor
IRLZ44N sourceLM358 pin 2 (IN-A)Feedback from the sense resistor
Load (red LED, anode to + rail)+ rail and IRLZ44N drainLED cathode to the drain, no series resistor needed
Multimeter in mA rangeBetween the LED cathode and the drain, for the first testRead the current

No code needed

No code. The op-amp drives the gate until the voltage across the 10 Ω sense resistor equals the reference at pin 3, so the current is I = Vref ÷ 10 Ω whatever the load, as long as the supply can provide the load voltage. The reference runs from 0 to about 0.16 V so the maximum current is about 16 mA, safe for a red LED with no series resistor. Check the pot is at its lowest setting before the first power-up and raise it slowly. Do not use a mains-powered load. Because the current is only set by the loop, an LED without any resistor is safe here; it would not be safe if the loop failed, so keep the current low.

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Pot at the lowest endCurrent near zero
Pot at the top endAbout 16 mA
LED, 220 Ω and 100 Ω loads at the same pot settingCurrent within a few percent
Sense resistor voltageMatches the pin 3 voltage

If it does not work

Current too high or unstable

Add the gate resistor and keep leads short; check pin 2 goes to the source side of the 10 Ω.

LED does not light

Check the LED direction and the drain wiring.

Current is zero

Check the reference reaches pin 3.

MOSFET warms

Lower the current; it should be barely warm at this setting.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the op-amp constant current sink?

LM358 Op-Amp, MOSFET IRLZ44N, Resistor 10 Ω, Potentiometer 10 kΩ, Resistor 100 kΩ × 3, LED 5 mm red, Resistor 220 Ω, Resistor 100 Ω × 2, Digital multimeter, 5 V 2 A USB adapter, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

How long does the op-amp constant current sink take to build?

About 90 minutes for a intermediate maker, in 7 steps.

How do I know the op-amp constant current sink works?

Pot at the lowest end: Current near zero. Pot at the top end: About 16 mA. LED, 220 Ω and 100 Ω loads at the same pot setting: Current within a few percent.

Current too high or unstable: what should I check?

Add the gate resistor and keep leads short; check pin 2 goes to the source side of the 10 Ω.

LED does not light: what should I check?

Check the LED direction and the drain wiring.

Current is zero: what should I check?

Check the reference reaches pin 3.

MOSFET warms: what should I check?

Lower the current; it should be barely warm at this setting.