0
\$\begingroup\$

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

  • Input voltage = 24V

enter image description here

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?

\$\endgroup\$
2
  • \$\begingroup\$ 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. \$\endgroup\$
    – jonk
    Commented Apr 27, 2020 at 5:53
  • \$\begingroup\$ Ok. In case of Microcontroller connected to that end, how to identify the amount of current that will pass through the resistor? \$\endgroup\$
    – user220456
    Commented Apr 27, 2020 at 5:55

3 Answers 3

1
\$\begingroup\$

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?

\$\endgroup\$
14
  • \$\begingroup\$ 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? \$\endgroup\$
    – user220456
    Commented Apr 27, 2020 at 5:54
  • \$\begingroup\$ How to calculate the power dissipation of the resistor theoretically? \$\endgroup\$
    – user220456
    Commented Apr 27, 2020 at 5:56
  • \$\begingroup\$ I was not able to find the input impedance of the IO port in the attached datasheet \$\endgroup\$
    – user220456
    Commented Apr 27, 2020 at 6:02
  • \$\begingroup\$ 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 \$\endgroup\$
    – Kyle B
    Commented Apr 27, 2020 at 6:03
  • \$\begingroup\$ Edited the link in the question. This Link - mouser.in/datasheet/2/302/S32K-DS-1358565.pdf \$\endgroup\$
    – user220456
    Commented Apr 27, 2020 at 6:05
0
\$\begingroup\$

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

enter image description here

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 \$

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

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.

\$\endgroup\$
2
  • \$\begingroup\$ 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? \$\endgroup\$
    – user220456
    Commented Apr 27, 2020 at 6:30
  • \$\begingroup\$ (R0010+R0011)/Vin \$\endgroup\$
    – JRE
    Commented Apr 27, 2020 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.