Safe to use LED without resistor? (UNO R3)

I used an LED for like 20 seconds with the anode going to pin 3 and cathode going to GND. I didn't have any resistor though. I didn't notice a brightness change. Is this okay to do or did i damage something? it didn't explode obviously

1 Like

You are lucky if the Arduino output pin and LED both survived, although they have probably been damaged.

No, it is not safe to leave out the resistor: use 150 Ohms to 10K, depending on desired brightness and power consumption.

4 Likes

That is not what normally happens. As to what you damaged it can range from nothing to both the LED and whatever pin 3 is. Without complete information a SWAG is the best you will get. If it works use it but not in anything you expect to make to be permanent.

1 Like
  • You stressed the GPIO.
    The pin and possibly the die, should be suspect from now on.

:sob:

1 Like

Not the expected failure mode. You likely overstressed the Arduino (LED is much tougher). Might cause the Arduino to fail later on.

If you plan on doing more things with the Arduino you should purchase a low cost selection of resistors (they come in a kit) from someplace like Amazon or ebay.

Why don't they just build it in? It seems kind of tedious

They do, some types of LED have them built in, you can see a black dot when you hold up one of these to the light.

But it gives you no choice as to how bright the brightest LED can be.

It is simple enough to add a resistor and it is not as if it is going to break your budget.

Only to a beginner.

2 Likes
  • What power supply voltage do you suggest they design for :thinking:

  • In life we need to accept the things we cannot change . . .

  • Time to put your efforts into learning basic electronics.

2 Likes

They did...
You can toggle a LED with internal pull up. That doesn't need a resistor. You can only do that if you don't set the pin to OUTPUT, and toggle the pull up resistor on/off. LED won't be very bright though, but good enough as indicator.
Leo..

const byte ledPin = 3; // LED between pin and ground, no resistor

void setup() {
  // nothing here
}

void loop() {
  pinMode(ledPin, INPUT_PULLUP); // LED on
  delay(500);
  pinMode (ledPin, INPUT); // LED off
  delay(500);
}
2 Likes

Just put the resistor in !
Never just try something to see if it works , do the sums , or ask . That way your Arduino will survive .
Better to start off with good practice in your Arduino adventures .

1 Like

I hear you, I can't stand them either. Especially since an Arduino is essentially one big adjustable resistor. So you can but you need a potentiometer and another led.
Light one up properly with a resistor or to a power supply where you can see the amps.
Now connect the potentiometer and a display so that you can see the numbers 0.00 - 1.00
Connect the other led to the digital out of a pin that takes in the pot values.
Make sure the pot is set to 0
And gradually raise it till it is just as bright as the other led. Usually ~0.4-0.5 range.
And voila... Don't go higher than that number.
Because in the end only heat kills.
Also if you change power supply's those values might also change a bit :slight_smile:

1 Like

Wrong. Also killing an LED is electron / hole depletion mechanism. as well as overrating not showing up until years later.

You know I thought we had stamped out all this nonsense years ago.

We used to ban people permanently from the forum advocating such rubbish like this.

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