# Sourcing and sinking current

Occasionally you see terms such as sourcing and sinking current and you keep wondering what they mean. So to make this clear, let’s look at sourcing and sinking current to light up LEDs:

Say you hook up an LED with a serial resistor and between an arduino output pin and gnd. If you direct the output to HIGH, you put 5V over the LED and resistor so current flows from the arduino pin to ground through the LED and resistor. In this case, you are sourcing current from the output, meaning flowing current from the pin through the LED, like turning a faucet on and flowing water out of the faucet. If you direct the output to LOW, the potential on both sides of the LED and resistor is zero so no current flows.

Say now you connect the LED and resistor between an arduino output pin and 5V. When you set the output pin to gnd, you are sinking current to the output, meaning flowing current from 5V to the output pin through the LED and resistor. It is like the arduino pin is a sink in a kitchen. Your 5V source will flow water via the LED and resistor to the sink.

Arduino pins can both source and sink when they are outputting while some other output devices such as a TLC5940, can only sink current, while others can only source current. In case only one-way conduction is allowed, you need to set up the circuit correctly to source or sink otherwise the circuit will not work or get damaged.

### 4 Responses to Sourcing and sinking current

1. michael_x says:

Sorry, but the interesting part is missing: Source is clear and intuitive, Sink raises those questions for me:
– Can you supply a different high voltage or just Arduino’s 5V? What happens with Vin = 9V and Arduino pin being high? Is it just switched off ( no current ) or is there 4V between Vin and Arduino pin and a reverse current running into Arduino ?
– Even if I stay at 5V. Do the same current limitations (around 40 mA ???) apply?
If it’s an external regulated 5V instead of Arduino’s provided 5V ?

Has this something to do with the terms “open drain” or “open collector” ( which I’m not sure to fully understand )

• liudr says:

That’s a good question. I’m not sure if you should use the arduino pin in output mode as a current sink. The 40mA max still applies. You will probably burn up something if you try that with a 9V battery.

2. Jojo Joson says:

LED will get reverse biased. If the potential difference exceeds, peak inverse voltage of LED, it will get burned. Current will flow into arduino pins. If the current exceeds max limit (40mA), then as liudr said, you will end up burning something!

3. Pingback: Current sourcing | Jlaura

This site uses Akismet to reduce spam. Learn how your comment data is processed.