How does TinkerCAD calculate the current/ where is my mistake (beginner)?

TinkerCAD says me, the current is around 35mA. The formula I know is I= (Vs - Vled)/ R = (5-2)/30Ohm. With this formula, the result should be sth around 100mA...
I hope, you can see the screenshot :slight_smile:

Your calculation is sort-off correct (forgetting internal pin impedance of about 25ohm),
but I hope this is only a simulation, because anything over 40mA could damage the pin.
You should keep pin current of an Uno below 20mA.

Modern LEDs are bright enough with 1-10mA current.
Leo..

Thank you :slight_smile: . This is only a simultation. I want to find out how I have to calculate. Can you say more about the different result between 35mA and 100mA? What is the internal pin impendance? How do I have to calculate when I build this constuction in real life?

Calculate the way you did and if you get an answer over 20mA, add a driver (usually an NPN transistor or N-Channel MOSFET).

... or just increase resistor value

Let's see how smart Tinkercad is.

The shortcut current for a pin is 100mA, so the output resistance is set to 50Ω.
That means that (5.0 - VLED) / (30Ω + 50Ω) = 35.1mA
And VLED = 2.192V

Everything stays the same when I choose a blue or white led !
I might have forgotten something, but about 2.2V for an average (any color) led is okay with me.

Thank you for your work. I'm nor an expert either a native speaker. Why is the output resistance 50 Ohm? Is it a fix value? Can you say sth. about the output resistance? What are the reasons?

IDEA: If I'm right, the output resistance is the resistance which depends of the material. But normally, it is way smaller than 50 Ohm, isnt it?

The mosfet switches inside the processor that switch the pin to 5volt or ground are not ideal.
They have some 'on' resistance, which could be anything between 20 and 40 ohm.
This is a rough value that varies per processor, per pin, and is temp dependent.
Not a problem when you are using the pin for low current signals, but when you want to draw significant current from the pin that internal resistance becomes noticable.

I once measured some pins of my Uno, and they were about 22 to 30 ohm.
It seems your simulator uses a value of 50 ohm, and a default Vf value for the LED.
Tells me to not fully trust simulators.
Leo..

1 Like

Twenty pins * 100mA each = 2A :rofl:
The AREF pin as a output is not simulated it seems :frowning_face:
There is 25kA available at the 5V pin and 16.5kA at the 3.3V pin :crazy_face:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.