Site Search:

What’s All This Sink and Source Current Stuff?

FacebooktwitterredditlinkedinmailFacebooktwitterredditlinkedinmail

Anyone who has connected to the digital outputs of data acquisition or data logger systems (for example the digital outputs of our DI-2108 and Starter Kits)  has wrestled with  sink and source current specs, and they continue to be a topic of confusion for many. When does sink current matter, and what is it? Same for source current.

References to sink and source current are made relative to the current switching device inside the system. In most cases, that’s a simple transistor. Source current refers to the ability of the digital output port to supply current. Sink current refers to the ability of the port to receive current. The following figure may help.

In the above, our goal is to light a simple light-emitting diode using the switching ability of a digital output port. The top shows a current source application, and the bottom a current sink approach. Notice the direction of current in both cases: Source supplies current and sink receives current.

When the port supplies (or sources) current it’s limited by the current limiting resistor R. You may or may not be able to draw enough current to light the LED depending upon the LED’s current requirements, but in any event you won’t damage the port. Let’s assume that the LED lights very dimly (or not at all) so that sourcing current is not an option. In other words, the digital port cannot provide (or source) enough current. What can you do?

One option is to provide your own power source that can supply adequate current, use the port to control whether or not the current flows, and thus turn the LED on and off. This configuration is shown at the bottom, of the figure. Now the digital port no longer supplies (sources) current but is configured to receive (or sink) it. To prevent damage to the port you need to be cognizant of its maximum sink current spec. Sinking more than this figure will fry transistor switch Q and render the digital port permanently inoperative. Resistor Rsink provides current limiting when the transistor sinks current.

Now let’s put some meat on this application and assume that the maximum current sink spec for a given digital output port is 10 mA. We ignore any LEDs that require more current than 10 mA and locate one that’s rated for 5 mA and has a forward voltage of 2 V. Ignoring the ON resistance of Q (usually very small), we can calculate Rsink to be (5-2)/0.005 = 600 Ohms to ensure that the port doesn’t sink more than 5 mA, well below its 10 mA maximum rating.

A final point is that the control signal at Q’s base for the current source versus the sink application is inverted. A logical 1 applied to Q’s base in the current source application turns the LED off. A logical 1 turns it on for the current sink application.

 

Follow Us
FacebooktwitterlinkedinyoutubeFacebooktwitterlinkedinyoutube

 Categories: Data Acquisition, Data Logger



 Bookmark the permalink

 RSS Feed (comments for this post)

 Post a comment

 Trackback URL

12 Comments

  1. Avatar
    vinoth
    Posted September 26, 2013 at 12:35 am Permalink

    thanks man….very useful….

  2. Avatar
    Werner Wang
    Posted September 10, 2015 at 3:06 am Permalink

    THANKS!

  3. Avatar
    R.M
    Posted November 20, 2015 at 6:22 pm Permalink

    TNX ,it helped me a lot.

  4. Avatar
    Abhilash
    Posted July 17, 2016 at 11:37 pm Permalink

    Thanks a lot man..

  5. Avatar
    Abhilash
    Posted July 17, 2016 at 11:43 pm Permalink

    I do have one question,say that i have a PIC16f886 which by specs has a sinking max output current of 25mA.
    Does it mean the same as u have explained because the word Max output current sunk and sourced seems confusing too?

    • Posted August 4, 2016 at 11:48 am Permalink

      Your use of the phrase “sinking max output current” is contradictory. Sink means how much current the port an absorb, not what it can supply (source.) So I think you need to look at the specs for your device again, or contact the manufacturer. If it really states the spec as you have described, that’s a typo.

  6. Avatar
    MOHAMED EL TRAMSY
    Posted June 29, 2017 at 8:42 am Permalink

    Thanks man….very useful

  7. Avatar
    Paul Land
    Posted September 3, 2018 at 5:57 am Permalink

    Great explanation.

  8. Avatar
    Rick Hunt
    Posted March 5, 2019 at 8:31 am Permalink

    Sorry about coming late to the party. This is all good basic stuff. I would encourage anyone trying to use the output of a microcontroller to drive anything to  use a transistor buffer (2n2222) or a small mosfet to drive the load. If the output specs say 60ma. You need to be well below that. The manufacture’s maximum ratings are the ratings that the device will occur damage. 

  9. Avatar
    Tumisang Kelopang
    Posted June 9, 2019 at 6:13 am Permalink

    great that was helpful

    I have a question

    how do we apply these current sources in a PLC i.e IN I/O’S

    • Posted December 3, 2019 at 4:24 pm Permalink

      Tumisang,

      The concept is the same, but the PLC will have it’s own specifications with regard to source and sink current.

      Consult the datasheet or contact the PLC manufacturer for additional information.

      Regards,
      Shawn MacDonald
      Application Engineer
      DATAQ Instruments Inc.

  10. Avatar
    Anwaruddin Sukamto
    Posted September 6, 2022 at 2:45 am Permalink

    Thank you bro..it is usefull

Post a Comment

You must be logged in to post a comment.