I am powering an LED / current limiting resistor by sinking current into an IO pin. Where can I find the resistance of the IOs when sinking current?
I am powering an LED / current limiting resistor by sinking current into an IO pin. Where can I find the resistance of the IOs when sinking current?
In the nrf52832 PS, chapter 20.4.1: GPIO Electrical Specification:
Current at VSS+0.4 V, output set low, high drive, VDD >= 2.7 V: Min 6mA, typ 10mA, maximum 15 mA.
Standard drive is 1,2 and 4 mA.
Should be more than enough for an LED unless it was from the garbage bin.
You don't need to know the resistance.
The Product Specification will tell you what the output voltage is when the output is low. Generally, it is negligible - especially when it comes to driving an LED.
This is really the wrong question. The GPIO doesn't have a fixed resistance, it does have a current limiter which limits current to an amount depending on drive mode (standard/high). So as long as your LED/resistor combination, when the pin is low, has enough resistance that current sunk is less than the maximum drive mode current, the GPIO has basically zero resistance. If however your current limiting resistor is too small and you attempt to sink more than the drive mode current allowed, the 'resistance' of the GPIO will rise to whatever level is necessary, in series with your LED and resistor, to keep the current to the maximum allowed.
eg say you're using standard 2mA drive, your LED has Vf of 2.1v and you're powering off 3.3v. (3.3-2.1) = 1.2v you need to drop across the resistor, so you need 600 ohms. Provide a resistor of that or higher, the GPIO 'resistance' will be 0. Provide anything lower and the GPIO effective resistance will be (600 - your resistor) ohms. If you don't even provide a resistor the current will still be limited to 2mA and the GPIO effective resistance will be 600 ohms. However you're then asking the nRF to dissipate 2.4mW of power, so you're better off with an external resistor.
Hey I'm a team member of edwardsbobg and wanted to followup on this question. We're running an RGB LED and sinking the current into the nrf52832 using 100, 470, and 100 Ohm resistors respectively. For simplicity let's just look at the red - it's powered with 3.3V, drops 1.92V over the LED, then drops 0.517V over the 100 Ohm resistor. Thus the voltage at the pin is 0.863V. The voltage drop over the resistor calculates to a current of 5mA.
The 0.863V was surprising to me because I figured the GPIO to have close to zero resistance and thus the voltage would be close to 0V. But this voltage is not negligible, which to me suggests I need to factor in this voltage when calculating the external resistor value. Do people know why this 0.863V would be higher than 0.4V?
you don't say what drive strength you are using on the GPIO which is fairly important. If it's standard drive then it's as I wrote above, not GPIO resistance but current limitation, in fact 5mA is higher than the max in the spec sheet for SD. If it's HD then you're just below the minimum in the spec sheet but still possible. So again the likely reason for the voltage being higher than 0.4V is because the pins have current limiters. The only way a current limiter can work on a pin driven in the way you are driving them is to 'raise' the low voltage to the point the current falls to the clamped current limit.