# Power dissipation of a current limiting resistor (connected to an input pin of uC.)

Below I have attached a circuit which divides the voltage and gives the output to an input pin of a microcontroller.

• Input voltage = 24V

The resistor R0012 is for current limiting. The Zener diode breakdown voltage is 5.1V.

The microcontroller which I am using is - Microcontroller Datasheet

I could not see an GPIO input pin internal architecture of diagram inside the microcontroller datasheet.

I tried to simulate this portion of the circuit with the MCU end floating. I found that the voltage before R0012 is 2.9486561V and after R0012 is 2.9486144V. The current through it was 2.953uA. I couldn't understand how this current is obtained (even though I left the other end of the diode floating - nothing connected at the MCU end.)

My objective :

1. I want to calculate the maximum power dissipation of the R0012 current limiting resistor. I know that it will not dissipate a huge amount. Just want to understand.

My questions:

1. The microcontroller datasheet attached mentions a GPIO sink current of +3mA max. So, what would be the current flowing into the microcontroller pin in my case and what would be the voltage detected at the MCU pin?

2. How to go about calculating the power dissipation of the resistor?

3. How did my simulation show a current of 2.953uA?

• Your resistor divider provides a Thevenin voltage that appears to be below the zener voltage. I'd imagine no current at all and therefore no appreciable power.
– jonk
Apr 27, 2020 at 5:53
• Ok. In case of Microcontroller connected to that end, how to identify the amount of current that will pass through the resistor? Apr 27, 2020 at 5:55

First question where is that trickle of current going? It's leakage current through the diode. Got a datasheet? Its probably specified

Second question ( actually labeled #1). The max 3mA is when the port is an OUTPUT
You seem to be wanting an INPUT yes?

The current would be close to zero. Except if you have am internal pull resistor active. In other words... "What is the input impedance of your I/O port?

• Ok. So you are saying that 2.95uA, is going through the diode? I agree that there is no other path for the current to go then. But in case of Microcontroller GPIO connected, how to identify the max current through the resistor? Apr 27, 2020 at 5:54
• How to calculate the power dissipation of the resistor theoretically? Apr 27, 2020 at 5:56
• I was not able to find the input impedance of the IO port in the attached datasheet Apr 27, 2020 at 6:02
• To answer that, you have to know the input ports impedance. Which I/O are you using....they are not necessarily all the same. Couldn't open your datasheet link BTW Apr 27, 2020 at 6:03
• Edited the link in the question. This Link - mouser.in/datasheet/2/302/S32K-DS-1358565.pdf Apr 27, 2020 at 6:05

Even capacitors have a certain leakage current. See this picture which shows a reference model of a non-ideal capacitor.

The maximum power dissipated by the resistor can be calculated by getting the maximum voltage on the resistor

$$\(24V/87.75kOhm*5.75kOhm)^2/11.5kOhm = 215uW \$$

• Yes but hes simulating a ceramic capacitor. Its not leaking 3uA (unless hes got fancy software that simulates cracked caps ;) Apr 27, 2020 at 6:01
• What is that formula and what is the 5.75k? Apr 27, 2020 at 6:03
• That's 11.5k || 11.5k Apr 27, 2020 at 6:06

R0012 will never see any appreciable current.

Assume that D0005 shorts out completely. That effectively puts R0011 and R0012 in parallel. The total resistance is (R0011||R0012)+R0010. That works out to 87.75 kohms.

At 24V going in, that's a current of 0.27 milliamperes through R0010. Half of that goes through R0012, so 0.13 milliamperes.

The power dissipated in R0012 would be:

P= RI^2= 11.5k *0.13mA^2 = 0.215 milliwatts.

Any resistor can handle that power.

The dissipated power does go up as the input voltage goes up.

I'd be more concerned about R0010 and R0011, though. They are always exposed to the full voltage and current.

The calculation above applies to R0011 as well. It'll take a very high voltage to exceed the power rated on even a 1/4 watt resistor.

• In General case, My Zener will not turn ON. Thats for safety purpose only. So, In normal case, the Microcontroller input leakage current is 0.5uA. So, I will take my power Dissipation as = (0.5uA)^2)*11.5k. Is it fine? And what would be the current through the R0010 and R0011 in this case? Apr 27, 2020 at 6:30
• (R0010+R0011)/Vin
– JRE
Apr 27, 2020 at 7:06