Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Really Silly Question

Status
Not open for further replies.

AtomSoft

Well-Known Member
Hey guys i have what may be a stupid question again heh :D

Resisters are current limiters of course i know that but lets say your using any PIC that supplies a output pin with 5v @ 25mA.....

If i place a 200 ohm resistor to that pin and a led.... whill the led get 25mA still or will it drop.

The main question is.... As a current limiter... does the resistor 200 ohm resister just let the current pass through it as if it wasnt there since in ohms law 5v / .025mA = 200 ohms....

or will it drop the current further down?

Would a resistor even be usefull? or is it there for a current spike or something?
 
Hey guys i have what may be a stupid question again heh :D

Resisters are current limiters of course i know that but lets say your using any PIC that supplies a output pin with 5v @ 25mA.....

If i place a 200 ohm resistor to that pin and a led.... whill the led get 25mA still or will it drop.

The main question is.... As a current limiter... does the resistor 200 ohm resister just let the current pass through it as if it wasnt there since in ohms law 5v / .025mA = 200 ohms....

or will it drop the current further down?

Would a resistor even be usefull? or is it there for a current spike or something?

hi atom,
The spec is the PIC pin can deliver up to 25mA at ~5V
If you add your 200R and short it to 0V [ assuming the PIC pin is SET hi] it will supply 5v/200R = 25mA.

When you have an LED , the LED's forward voltage drop must be deducted from the +5Vout, say a RED led at 2Vfwd, thats [5-2]/200 = 15mA
 
Last edited:
You will be under driving the LED as the LED will drop 2V and so the resistor will only have 3V on it and 3/200 is 15mA. You resistor should be 3/0.025 = 120Ω.

Mike.
 
Who said the LED current had to be 25mA? That number came from the PIC's max source current... two differnt things.
 
Who said the LED current had to be 25mA? That number came from the PIC's max source current... two differnt things.

I guess the LED forward current is not the most important point of all the calculations presented here.

The most important point is that: The OP forgot to subtract the LED forward voltage from the +5V output of the PIC, no matter how much current it can sink or source.

"Just outside of Beantown" means a lot to me! (Counting beans or peas!)

Boncuk
 
Would a resistor even be usefull?
LEDs are greedy and will grab all the current they can get. Using one without a current limit resistor is like driving a car with the throttle wired full open. While no resistor is generally frowned upon you can do it if the led is multiplexed. This works because the PIC gates/transistors driving the LED are only on for a fraction of the time and the time averaged current is not enough to do harm.

If i place a 200 ohm resistor to that pin and a led.... whill the led get 25mA still or will it drop.
As Boncuk pointed out you need to use (5-Vforward) when doing the resistor calculation.

If you do that you will have a resistor LED pair that will pass 25mA if it is available.
 
Last edited:
Who said the LED current had to be 25mA? That number came from the PIC's max source current... two differnt things.

No one said the LED current has to be 25mA.
 
Heh you guys are great but the main question is ... Would a resistor limit something limited already like... if a pin supplies 25mA MAX then if i want to supply a LED 25mA do i still use a resistor? Or is it more like the pic can supply more than 25mA but would get damaged?

SO CURRENT is really unchangable? Like a LM7805 that supplies 1A... if we try to pull 2A through it it would break because the 2A went through it correct? Current can be dropped but if something tries to pull more it breaks down basically...

If so then this question is a bust so nevermind i fully undersatnd it
 
Atom,
For a 'steady' 25mA current draw, you need a resistor.
As 3v0 points out, using an LED without a resistor its going to draw excess current > 25mA and be damaged.
 
If you google "Beantown" you will know where it is... and it's beans:D

OK, coming from Boston, better known from the "Boston tea party".

What's the difference in counting beans or peas?
 
You can also look at this from the PIC's point of view. The specified 25mA current being sourced or sunk from the PIC pin should not be exceeded. You can get away with it on one or two pins, but if you exceed the spec on multiple pins, you might overheat the chip.

Also, if you accidentally short a PIC pin to ground, and write a 1 to that pin, the current flowing out of the pin to ground (and into the VDD pin(s)), will be much more than 25mA, so the limit is not absolute. The bottom line is that you should not be depending on the PIC port driver to limit the current; you should use an appropriately sized resistor as calculated above.

btw- I routinely use LEDs as indicators driven from a PIC port pin. Modern ultra-bright LEDs are quite visible when driven with as little as 1mA. Why waste power by driving them with 20 or 25mA? Go buy some better LEDs.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top