# How do i sink current using PCA9685?

Hi, all
I’m using a PCA9685 with a pinout board like Adafruit’s. I’m trying to run a bunch of LEDs at 20 mA, and the chip is supposed to be able to source 10 mA and sink 25 mA. I understand that to have it Source, you connect the LED between the PWM and GND pins and to Sink you connect it between V+ and PWM.

I’ve tried both ways and using a multimeter and a red LED I get 12.5 mA. Why is it not 25 in Sink? Also, why do I get 12.5 on Source mode as well?

Is there anyone have ideas of it? Many thanks.

Hello Dan,

The 10 mA source and 25 mA are the chip’s maximum values. The actual current depends on the applied power supply voltage, used LED and current limiting resistor, that in on LED’s voltage drop. See also Fig 15 - Direct LED connection, in chapter 7.7 of the datasheet. I understand that it depicts a sink configuration and it complies with your understanding.

To verify that, replace the LED with a resistor. For example, for a sinked LED when the PCA9685 is supplied from a 3.3 V rail:

R = U / I = 3.3 / 0.025 = 132 ohm

To be on the safe side use the next higher value available, which is 150 ohm:

I = U / R = 3.3 / 150 = 0.022 = 22 mA

So when a sink LED is replaced with a 150 ohm resistor the measured current should be close to 22 mA.

WARNING: For a sourced LED the maximum current is 10 mA so R = 3.3 / 0.010 = 330 ohm !

NOTE: The LED forward voltage drop across the LED in volts, shown as Vf on LED datasheets. Typically, the forward voltage of an LED is between 1.8 and 3.3 volts. It varies by the color of the LED. A red LED typically drops around 1.7 to 2.0 volts, but since both voltage drop and light frequency increase with frequency, a blue LED may drop around 3 to 3.3 volts.