Blink led without resistor

Let us know what you think about the chipKIT, and what can be done to make it better!
Post Reply
benderamp
Posts: 16
Joined: Tue Mar 11, 2014 7:21 pm

Blink led without resistor

Post by benderamp » Fri Oct 03, 2014 1:22 pm

I am wondering, what bad might happen if we connect LED to board without resistor. I know that overcurrent might damage the LED instantly or on long period, but can it damage the board or some of its parts? The more general question is what are scenarios to damage the board by sudden incorrect wiring on it.

So, what is the possible damage for board (don't care about LEDs), if I connect:

1) If I connect PIN-LED-GND
2) If connect 3.3V-LED-GND (or just 3.3V-Wire-GND)
3) If connect 5V-LED-GND (or just 5V-Wire-GND)

Target boards are ChipKIT Uno32, WF32 and Wi-FIRE if that makes sense. Also, is there any difference in answers when we power board from USB or external battery?

thank's

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Blink led without resistor

Post by majenko » Fri Oct 03, 2014 1:37 pm

The biggest danger of using an LED on an IO pin without a resistor is the MOSFETs in the output driver for the IO pin overheating and breaking down.

Connecting an LED direct to any power source will most likely cause the LED to either burn out or explode.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

EmbeddedMan
Posts: 597
Joined: Tue May 24, 2011 9:24 pm
Location: Minneapolis, MN
Contact:

Re: Blink led without resistor

Post by EmbeddedMan » Fri Oct 03, 2014 2:57 pm

That's exactly right - you do risk damaging the output drivers on the I/O pin. That being said, I've found PICs have exceptionally robust output drivers on their pins, even this PIC32s. I've accidentally tired a pin to GND and set it high, tied it to 3.3V and set it low, and my PICs have always survived. Don't count on this always being safe! But it's not always going to damage things either.

I've seen several designs (kits mainly, or examples - not commercial products) where LEDs are driven direction from I/O pins without any current limiting resistors. What you're doing is relying upon the natural current limiting abilities of the I/O pin, so choosing the right microcontroller (or the right port on the micro - they aren't all the same) and the right LED is critical for this to work well. But it can be done safely. There are some micros that have drive strength adjustments for each pin or port. This can help.

*Brian

User avatar
Jacob Christ
Posts: 723
Joined: Sat May 28, 2011 6:34 am
Location: Southern California
Contact:

Re: Blink led without resistor

Post by Jacob Christ » Sun Oct 05, 2014 5:24 pm

If you PWM the output it will average out the power and are less likely to burn anything. The led and driver if damaged from over current do so because they cannot dissipate the heat fast enough. PWM gives the devices a little break to cool off.

Jacob
PONTECH Quick240 an industrial form factor platform for chipKIT and Arduino users.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Blink led without resistor

Post by majenko » Sun Oct 05, 2014 6:35 pm

Actually that's not strictly true.

Yes, the average output current will be reduced protecting the LED, however the most power is dissipated by the output stage MOSFETs during a switch from low-to-high or high-to-low (when the resistance is higher), so couple lots of switching (PWM) with excess current, and you have a recipe for disaster.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply