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.

LED PWM and current limiting.

Status
Not open for further replies.

3v0

Coop Build Coordinator
Forum Supporter
Halloween is about here. Need to make the eyes on my SO's spider glow. Now and again I would like to make them flash as brightly as possibly.

Will use common red 5mm LEDs. Max forward current 20mA continuous, 5VDC Max reverse Voltage. 2VDC (typ) Forward voltage drop.

The question I have is how much current can I expect to push through the LEDs if it is only for a fraction of a second ? If it is more then the 25mA that each PIC pin can drive, is it OK to tie 2 pins together and use that to feed the current limiting resistor and LED? If it is more then 50mA I will use transistors.

I could just start experimenting but some ballpark numbers would be nice to start with. It would not be a big deal to have to replace an LED.
 
3v0 said:
If it is more then the 25mA that each PIC pin can drive, is it OK to tie 2 pins together and use that to feed the current limiting resistor and LED? If it is more then 50mA I will use transistors.

I was reading somthing lastnight on PICs that said one could only safly supply 25mA total. Not 25mA per pin. I have exceeded that by far with no problems though. I'll have to look at the data sheet to see whats right:confused:

On the subject of LEDs, I have a bunch of amber spider LEDs with a 70mA max current. They seem to get about as bright as there gonna get by 50 or 60mA and going over that dosn't make them that noticably brighter, just make them tend to pop.
 
Simply look on the datasheet for your LEDs.
My MV8191 red LEDs have a max continuous current of 40mA and a max pulsed current of 200mA but for only 0.1ms. A blink duration less than about 20ms looks dimmer.

The chip in an LED is small and warms up very quickly. Try 100mA for 20ms.

The voltage of my red LEDs is typically 1.75V at 20mA and increases to 2.25V at 100mA.
 
Finally found it on the datasheet for the 16F628A, man that thing is long!

Max per pin sunk or scourced is 25mA

Combined current for PORTA and PORTB is 200mA
 
Andy1845c said:
On the subject of LEDs, I have a bunch of amber spider LEDs with a 70mA max current. They seem to get about as bright as there gonna get by 50 or 60mA and going over that dosn't make them that noticably brighter, just make them tend to pop.
I will keep that in mind.

audioguru said:
Simply look on the datasheet for your LEDs.
These are 2 cent LEDs from MPJA, no data sheet or makers part number. Will check out the data sheets from some other cheap reds to get a general idea. I was a bit surprised to see the max pulsed current of 5x.

Thanks everyone. I now have some idea of what to expect.
 
Status
Not open for further replies.

Latest threads

Back
Top