To strictly regulate circuit current against supply voltage fluctuations or load variations, use a Bipolar Junction Transistor (BJT) constant current sink rather than a simple series resistor. By leveraging emitter degeneration and a fixed base voltage reference, a BJT sink maintains a stable current flow—typically within 2% to 5% tolerance—even if your power rail sags or your load resistance shifts. This topology is the backbone of 4-20mA industrial control loops, precision LED drivers, and optocoupler biasing networks.
Why a Constant Current Sink Beats a Series Resistor
The most common mistake hobbyists make when driving a load like an LED or an optocoupler (e.g., the Sharp PC817) is relying on a simple series resistor. According to Ohm's Law, the circuit current in a series resistor topology is entirely dependent on the delta between the supply voltage and the load's forward voltage. If your 12V nominal wall adapter actually outputs 13.5V under light load, your circuit current spikes. If the supply sags to 10V under heavy load, your current drops, potentially causing an optocoupler to fail to trigger or an LED to visibly dim.
A constant current sink solves this by making the circuit current dependent only on a fixed reference voltage and a sense resistor, completely ignoring the supply voltage (within the transistor's compliance range). As detailed in standard bipolar transistor theory, the BJT acts as a variable resistor that automatically adjusts its collector-emitter resistance to maintain the exact voltage drop across the emitter sense resistor.
Topology Breakdown: Node Labels and Current Path
Before picking components, we need to define the topology and its critical nodes. We are building an NPN current sink, meaning the load is placed on the high side (between VCC and the collector), and the transistor sinks current to ground.
- V_CC: The positive supply rail (e.g., 12V DC). Powers the load and the base bias network.
- V_LOAD: The node between the load's cathode and the BJT collector. The voltage here fluctuates based on the load's resistance.
- V_BASE: The base node of the BJT. Held at a rigid voltage by a reference element (a Zener diode or a forward-biased LED).
- V_EMITTER: The node between the BJT emitter and the sense resistor. This voltage is always exactly one base-emitter diode drop (Vbe) below V_BASE.
The current path flows from V_CC, through the load, into the collector, out the emitter, through the sense resistor, and finally to ground. The base current is a separate, much smaller path that simply biases the transistor into its active region.
Design Walkthrough: Sizing for a 20mA Circuit Current
Let's design a sink to drive a standard indicator LED or an optocoupler at exactly 20mA, powered from a 12V nominal supply. We will use a ubiquitous 2N3904 NPN transistor.
1. Select the Base Reference and Calculate V_EMITTER
Instead of a Zener diode, we will use a standard 5mm red LED as our V_BASE reference. It is cheap, provides a visual power indicator, and has a stable forward voltage (Vf) of roughly 1.8V at low bias currents. The base-emitter junction of the 2N3904 drops approximately 0.65V. Therefore, the voltage at V_EMITTER is:
V_EMITTER = V_BASE - Vbe = 1.8V - 0.65V = 1.15V
2. Size the Emitter Sense Resistor (Re)
To achieve a 20mA (0.020A) circuit current, we use Ohm's law on the emitter resistor:
Re = V_EMITTER / I_target = 1.15V / 0.020A = 57.5Ω
Since 57.5Ω is not a standard E24 value, we select a 56Ω 1% metal film resistor. This yields a slightly higher circuit current of 20.5mA, which is perfectly safe for standard 5mm LEDs and optocouplers. Power dissipation in this resistor is P = I²R = (0.0205)² × 56 = 0.023W, so a standard 1/4W (0.25W) resistor is more than adequate.
3. Size the Base Bias Resistor (Rb)
The base needs enough current to keep the transistor saturated, but not so much that it wastes power. The 2N3904 has a minimum DC current gain (hFE) of 100 at 20mA. Required base current (Ib) = 20.5mA / 100 = 0.205mA. To ensure a stiff bias that ignores hFE variations, we design for 10× Ib, or roughly 2mA.
Rb = (V_CC - V_BASE) / I_bias = (12V - 1.8V) / 0.002A = 5,100Ω
We select a standard 5.1kΩ resistor.
Behavior Matrix and Extreme Failure Modes
Understanding how the circuit reacts to component changes and faults is critical for bench debugging. The following matrix outlines the behavior of the circuit current under various conditions, contrasting it with a simple series resistor alternative.
| Parameter Changed | Effect on BJT Sink Circuit Current | Effect on Series Resistor Alternative |
|---|---|---|
| V_CC increases from 12V to 15V | Remains constant at ~20.5mA | Increases proportionally (risks burning load) |
| Load resistance doubles | Remains constant at ~20.5mA (V_LOAD drops) | Decreases significantly (load dims/fails) |
| Ambient temperature rises 30°C | Increases slightly (~1-2mA) due to Vbe drop | No significant change |
| Re (56Ω) drifts +5% (tolerance) | Decreases proportionally to ~19.5mA | N/A (Not part of topology) |
Extreme Failure Modes: What Breaks?
Short Circuit on the Load (R_LOAD = 0Ω): The circuit current remains safely clamped at 20.5mA. However, the transistor must now drop the entire V_CC minus V_EMITTER. Vce = 12V - 1.15V = 10.85V. Power dissipation in the 2N3904 becomes Pd = 10.85V × 0.0205A = 0.222W. The TO-92 package can handle up to 0.625W at 25°C, so the transistor survives but will feel warm to the touch. If V_CC were 24V, Pd would exceed 0.47W, pushing the transistor dangerously close to its thermal derating limits.
Open Circuit on Re: The emitter path to ground is broken. Base current ceases, the transistor cuts off, and circuit current drops instantly to 0mA. V_LOAD rises to equal V_CC.
Short Circuit on Re: V_EMITTER is forced to 0V. The base-emitter junction becomes heavily forward-biased, acting as a dead short through the base bias resistor. Circuit current spikes massively, likely destroying the 2N3904 and the load instantly. This is why 1% metal film resistors are preferred over cheap carbon composition types that can fail short.
Step-by-Step Breadboard Verification
Do not trust your math until you verify it on the bench. Follow these steps to test the circuit safely without blowing your multimeter's internal fuse.
- Wire the Bias Network First: Connect the 5.1kΩ resistor from the positive rail to the anode of the red LED. Connect the LED cathode to ground. Power the rail at 12V. The LED should illuminate dimly. Measure V_BASE with your DMM; it should read between 1.75V and 1.85V.
- Insert the BJT and Sense Resistor: Power down. Connect the 2N3904 base to V_BASE. Connect the emitter to one leg of the 56Ω resistor, and the other leg of the 56Ω resistor to ground. Leave the collector floating for now.
- Verify V_EMITTER: Power up. Measure the voltage across the 56Ω resistor. It should read exactly 1.15V (±0.05V). If it reads 0V, your transistor is dead or wired backward (check the flat side of the TO-92 package for the E-B-C pinout).
- Configure the DMM for Current: Move your multimeter's red probe to the mA or µA jack (never the 10A jack for precision 20mA readings, as the shunt resolution is too poor). Set the dial to DC mA.
- Break the Circuit to Measure: Power down. Connect your load (e.g., an optocoupler anode) to V_CC. Connect the load's cathode to your DMM's red probe. Connect the DMM's black probe to the 2N3904 collector. Never place a DMM in current mode directly across V_CC and ground; it will act as a short and blow the internal fuse.
- Final Reading: Power up. The DMM should display a circuit current between 19.5mA and 21.0mA. Slowly vary your bench supply from 10V to 14V; the DMM reading should barely flicker.
Circuit Current FAQ
How do you measure circuit current without breaking the connection?
Breaking the circuit to insert a multimeter is tedious and risks interrupting sensitive microcontroller states. To measure circuit current non-invasively, use a low-side shunt resistor (e.g., a 1Ω precision resistor in series with the ground path) and measure the voltage drop across it with an oscilloscope or DMM. For higher currents or AC mains, use a Hall-effect clamp meter or an INA219 I2C current shunt monitor IC, which amplifies the microvolt-level shunt drop and outputs it via digital bus without breaking the primary load path.
Why does my circuit current drop when the transistor gets hot?
This is caused by the negative temperature coefficient of the BJT's base-emitter junction. As the 2N3904 heats up, its Vbe drop decreases by approximately -2mV per degree Celsius. If V_BASE is fixed at 1.8V, a drop in Vbe means V_EMITTER actually increases, which should theoretically increase current. However, if your V_BASE reference (the red LED) is also heating up and its Vf drops faster than the Vbe, or if the transistor enters secondary breakdown due to poor thermal coupling, the current will destabilize. For high-precision applications where thermal drift is unacceptable, replace the LED with a temperature-compensated Zener diode or use an op-amp feedback loop as detailed in advanced current mirror designs.
What limits the maximum circuit current in a BJT constant current sink?
The absolute maximum circuit current is limited by two factors: the transistor's maximum continuous collector current rating (100mA for a 2N3904, but practically limited to ~50mA for reliable hFE), and the Safe Operating Area (SOA) dictated by power dissipation. Even if you drop the sense resistor to 1Ω to target 1.15A, the 2N3904 will physically melt if the voltage drop across the collector-emitter junction multiplied by the current exceeds its 0.625W thermal limit. For circuit currents above 100mA, switch to a power BJT (like the TIP31C) or a power MOSFET mounted to a heatsink.
Can I use a MOSFET instead of a BJT to regulate circuit current?
Yes, but a simple resistor-biased MOSFET current sink is much harder to design than a BJT sink. Unlike the highly predictable 0.65V Vbe of a silicon BJT, a MOSFET's gate-source threshold voltage (Vgs_th) varies wildly between individual parts—even from the same manufacturing batch (e.g., an IRF520 might have a Vgs_th anywhere from 2.0V to 4.0V). To build a reliable MOSFET current sink, you generally must add an op-amp to actively measure the shunt voltage and drive the gate, creating a closed-loop feedback system. For simple, low-cost, sub-100mA constant current needs, the BJT topology remains vastly superior.






