Current sourcing and current sinking is often mentioned in relation to electronics, digital systems and microcontrollers, but what is current sourcing and what is current sinking?
Current sourcing and sinking refers to the way that an external load is connected to a circuit, system, microcontroller or other electronic device.
Table of Contents
- Current Sourcing and Current Sinking Circuit Diagram
- Current Sourcing
- Current Sinking
- Arduino Current Sourcing Example
- Arduino Current Sinking Example
- Tips for Understanding Current Sourcing and Sinking
- Did You Know About Current Sourcing and Sinking?
- Frequently Asked Questions About Current Sourcing and Sinking
- Conclusion
Current Sourcing and Current Sinking Circuit Diagram
The circuit diagram below shows the difference between current sourcing and current sinking.

The load in the circuit diagram is shown as a 1k resistor, but can be any load that draws a current such as an LED and series resistor, the coil of a relay, a light bulb, etc.
The device in the circuit diagram can be any electronic circuit or device such as a microcontroller, FPGA, CPLD, logic circuit, etc.
Current Sourcing

When a load is connected to a device so that the device supplies current to the load (sources current) then the configuration is said to be current sourcing.
An example is a series resistor and LED connected between a microcontroller pin and GND. When the microcontroller pin is switched high (logic 1) then the microcontroller will source current to the load. In this configuration a logic 1 will supply power to the load (switch the LED on) and a logic 0 will switch power to the load off (switch the LED off).
Current Sinking

When a load is connected to a device so that current flows from the power supply through the load and into the device, then the configuration is said to be current sinking. When current flows into the device, it is said to be sinking current.
An example of current sinking is when a series resistor and LED is connected between power (e.g. +5V) and a microcontroller pin. When the microcontroller pin is switched high (logic 1) then the current to the load is switched off. When the microcontroller switches the pin low (logic 0), current flows through the load.
Arduino Current Sourcing Example

In the Arduino current sourcing diagram, an LED and series resistor are connected to the schematic symbol of an Arduino Uno.
As can be seen in the circuit diagram, current must be sourced from Arduino pin 2 (D2 in the circuit) in order to flow through the resistor and LED to switch the LED on.
When pin 2 of the Arduino is configured as an output and set HIGH, it provides a voltage (typically +5V) that allows current to flow from the pin, through the resistor and LED, and then to ground—causing the LED to turn on. Setting the pin LOW stops the current flow, and the LED turns off.
Arduino Code to Switch LED ON (Current Sourcing)
void setup() {
pinMode(2, OUTPUT); // Set pin 2 as an output
digitalWrite(2, HIGH); // Output HIGH to turn the LED on
}
void loop() {
// Nothing here; LED remains on
}
Arduino Code to Switch LED OFF (Current Sourcing)
void setup() {
pinMode(2, OUTPUT); // Set pin 2 as an output
digitalWrite(2, LOW); // Output LOW to turn the LED off
}
void loop() {
// Nothing here; LED remains off
}
Arduino Current Sinking Example

In the Arduino current sinking diagram, the LED and series resistor are connected between the +5V supply and Arduino pin 2 (D2 in the diagram). This setup allows current to flow into the Arduino pin when it is set to a low logic level, demonstrating a current sinking configuration.
When pin 2 is configured as an output and set to LOW, it acts as a path to ground. Current flows from the +5V supply, through the LED and resistor, and into the Arduino pin—turning the LED on.
Setting the pin to HIGH removes the low-side path, stopping the current flow and turning the LED off. This is because the LED and resistor series circuit effectively has +5V on each end — +5V from the supply and +5V from pin 2. Current can’t flow from +5V to +5V.
Arduino Code to Switch LED ON (Current Sinking)
void setup() {
pinMode(2, OUTPUT); // Set pin 2 as an output
digitalWrite(2, LOW); // Output LOW to sink current and turn the LED on
}
void loop() {
// Nothing here; LED remains on
}
Arduino Code to Switch LED OFF (Current Sinking)
void setup() {
pinMode(2, OUTPUT); // Set pin 2 as an output
digitalWrite(2, HIGH); // Output HIGH to stop sinking current and turn the LED off
}
void loop() {
// Nothing here; LED remains off
}
Tips for Understanding Current Sourcing and Sinking
- Remember current direction: Current flows from a higher voltage to a lower voltage. In sourcing, the device provides current; in sinking, it receives it.
- Use LEDs for visual learning: Connecting LEDs in sourcing or sinking configurations makes it easy to see the effect of HIGH and LOW output states.
- Check the datasheet: Microcontroller and IC datasheets specify maximum current sourcing and sinking limits—exceeding them may damage the device.
- Know your logic states: In most logic families, a logic HIGH (1) sources current and a logic LOW (0) sinks current—important for correct circuit behavior.
- Use pull-up or pull-down resistors if needed: These help ensure stable logic levels when inputs are floating or connected to open-drain/open-collector outputs.
Did You Know About Current Sourcing and Sinking?
- The terms sourcing and sinking originated with industrial control systems, where sensors and actuators were often designed to either source or sink current to interface properly with controllers.
- In open-collector and open-drain outputs, only current sinking is possible—the device pulls the line LOW but relies on an external resistor or voltage source to go HIGH.
- Many microcontrollers can both source and sink current, but often sink more current than they can source, depending on the I/O pin drive strength.
- NPN transistors are commonly used in sinking configurations, while PNP transistors are more suited to sourcing roles in switching applications.
- Sourcing and sinking is a foundational concept that directly applies to LED control, relay drivers, sensor interfaces, and even digital bus design like I²C or SPI.
Frequently Asked Questions About Current Sourcing and Sinking
What is the difference between current sourcing and current sinking?
Current sourcing means the device provides current to an external load (current flows out of the device), while current sinking means the device receives current from the load (current flows into the device).
Why would you use current sinking instead of sourcing?
Sinking configurations are often used with NPN transistors or open-collector outputs. They are also preferred when the device can sink more current than it can source, or when the logic level required for “on” should be LOW.
Can microcontroller I/O pins both source and sink current?
Yes, most microcontroller digital output pins can source and sink current. However, they usually sink more current than they can source, and you must check the datasheet for limits (e.g., ±20 mA per pin).
Which is more efficient: sourcing or sinking?
Neither is inherently more efficient, but circuit design considerations such as voltage levels, component types, and ground references may favor one over the other.
Are there any safety concerns with sourcing and sinking?
Yes. Exceeding the current handling capacity of a pin or transistor can damage components. Also, in sinking configurations, incorrect grounding can lead to erratic behavior or unintended current paths.
Conclusion
Understanding current sourcing and sinking is essential for building and analyzing electronic circuits, especially when working with microcontrollers, sensors, and digital outputs. Whether you’re designing a simple LED circuit or developing an industrial control interface, knowing when to source or sink current helps ensure reliable and safe operation.
To deepen your understanding of how current behaves in a circuit, you may also find it helpful to read our article What Is Current Flow? It explains the fundamentals of conventional and electron current flow—essential concepts for anyone working with sourcing and sinking current.
You may also be interested in the article How Does a Resistor Work? on the other Starting Electronics website.