# LEDs without resistor, voltage OK

**URL:** <https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691>\
**Category:** LEDs and Multiplexing\
**Created:** [April 16, 2022, 4:12pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691 "2022-04-16T16:12:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cascou](https://avatars.discourse-cdn.com/v4/letter/c/53a042/32.png) [@Cascou](https://forum.arduino.cc/u/Cascou)\
**Post date:** [April 16, 2022, 4:12pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/1 "2022-04-16T16:12:36Z")

</div>

Hi hackers, I have a little problem with my LEDs. If I calculate the resistor required (2V for the reds, 3V for the blues), and install the correct resistor, they light up very little).  
With a multimeter, I get 1.6V at the LED, so too little.

However my specs seem OK, consumption 20mA, 5V emitted by the arduino, I don't understand.

If I test with no load, I have 4.8V at the output of the arduino.  
If I test without resistance, the LED lights up well, voltage at 3.3V (on the blue).

I tested other LEDs and another Arduino, same story.  
I obviously unplugged everything else from the arduino to test.  
And commented out anything unnecessary in the code.

Is it my arduinos in the voltage collapses due to a breakdown, or my LEDS whose specs were wrong (and which are at more than 20mA)?

NB: Arduinos as components come from AliExpress.

Thanks in advance everyone. Kiss.

---

<div class="post-metadata">

**Author:** ![LarryD](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/larryd/32/215550_2.png) [@LarryD](https://forum.arduino.cc/u/LarryD)\
**Post date:** [April 16, 2022, 4:32pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/2 "2022-04-16T16:32:40Z")

</div>

Did you set the pinMode to output on your LED pins ?

* * *

Show us a good schematic of your proposed circuit.  
Show us a good image of **your** ‘actual’ wiring.  
Give links to components.

* * *

In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the **complete sketch**.

Use the \</\> icon from the ‘reply menu’ to attach the copied sketch.

* * *

Wire LEDs like D1 or D2 as in the image below.

[![](https://europe1.discourse-cdn.com/arduino/original/4X/7/e/0/7e0ee1e51f1df32e30893550c85f0dd33244fb0e.jpeg) ](https://europe1.discourse-cdn.com/arduino/original/4X/7/e/0/7e0ee1e51f1df32e30893550c85f0dd33244fb0e.jpeg)

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [April 16, 2022, 4:41pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/3 "2022-04-16T16:41:30Z")

</div>

> [@Cascou](#):
>
> If I test without resistance, the LED lights up well

Do not do that! It will damage the LEDs and possibly the Arduino pins.

---

<div class="post-metadata">

**Author:** ![JohnRob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnrob/32/253560_2.png) [@JohnRob](https://forum.arduino.cc/u/JohnRob)\
**Post date:** [April 16, 2022, 7:28pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/4 "2022-04-16T19:28:10Z")

</div>

LED's operate on current not voltage. The voltage quoted by the LED spec is a typical value and changes part to part and over temperature of the LED.

The output of the Arduino has a limit on the amount of current it can supply. As you require more current the output voltage drops until the current is within the capability of the output OR the output overheats and fails.

Unfortunately most of the characteristics are not linear so looking a the specifications is important. For instance of the 328L processor (many of the Arduino boards use this processor) the output voltage vs current is in figure 35-25 (see below),

However usually LED's can be pretty bright when controlled by Arduino. I would suggest you connect LED + resistor directly to your 5V power supply.

For the Reds:  
R = E/I Where E = the voltage across a resistor and I = the current through the resistor.

R = (5V - 2V) / 0.02 = 150 ohms. This should be really bright when looking at the LED, but not is you are trying to light a room.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/e/a/5/ea59efca810b2bc09e4ae2f63375ff2178cb59da.png)

---

<div class="post-metadata">

**Author:** ![DVDdoug](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dvddoug/32/671533_2.png) [@DVDdoug](https://forum.arduino.cc/u/DVDdoug)\
**Post date:** [April 16, 2022, 7:48pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/5 "2022-04-16T19:48:46Z")

</div>

> [@Cascou](#):
>
> If I calculate the resistor required (2V for the reds, 3V for the blues), and install the correct resistor, they light up very little).

You didn't show your calculations tell us the resistance. ...For a 2V LED at 20mA you have 3V across the resistor so 3V/0.02A =150 Ohms. Is that what you're using?

> [@](#):
>
> If I test without resistance, the LED lights up well, voltage at 3.3V (on the blue).

And if you measure the current you are probably exceeding the specs for the LED and the Arduino! 😉 It might work OK or one or both may eventually die, or the Arduino may become flakey when the LED is on.

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [April 16, 2022, 10:00pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/6 "2022-04-16T22:00:36Z")

</div>

A common mistake is not setting the pin to OUTPUT in setup(). pinMode (ledPin, OUTPUT);  
If you forget, then the LED is powered through the internal pull up of the pin,  
which could be 0.1mA or less.

Pull up (or down) resistor should be somewhere between a few hundred and a few thousand ohm.  
You don't _have_ to drive a LED with 20mA.  
5-10mA is usually more than bright enough for modern LEDs.  
Leo..

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [April 16, 2022, 10:22pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/7 "2022-04-16T22:22:30Z")

</div>

> [@Wawa](#):
>
> A common mistake is not setting the pin to OUTPUT in setup(). pinMode (ledPin, OUTPUT);

And that is of course, the first thought. As Larry first replied. 🤔

However, given that the effective resistance of the internal pullup is about 45k, then a _correctly calculated_ resistor - **100 Ohms** for the blue LED (2 V drop at 20 mA) would make **no** difference whatsoever to the LED in this case.

I am betting that setting pinMode to OUTPUT was indeed forgotten or mis-coded **and** the resistor in question is not 100 Ohms.

Of course since neither code nor the result of the supposed calculation was given, we so far do not - **cannot** - know. 😁

---

<div class="post-metadata">

**Author:** ![Cascou](https://avatars.discourse-cdn.com/v4/letter/c/53a042/32.png) [@Cascou](https://forum.arduino.cc/u/Cascou)\
**Post date:** [April 28, 2022, 12:28pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/8 "2022-04-28T12:28:45Z")

</div>

Hi all ! sorry for the delay.  
so,

@LarryD:  
I don't know if it's going to be enough, but here are some pictures & my code (everything useless is commented)

```arduino
// Pins
int mode = 2;
int respawn = 3;
int delai = A0;
int active = 4;
int desactive = 5;
int touche = 6;
int desactiveDuree = A1;

// Variables
int dernierRespawn = 0;

void setup() {
  Serial.begin(9600);

  pinMode(mode, INPUT);
  pinMode(respawn, OUTPUT);
  pinMode(delai, INPUT);
  pinMode(active, INPUT_PULLUP);
  pinMode(desactive, OUTPUT);
  pinMode(touche, INPUT_PULLUP);
  pinMode(desactiveDuree, INPUT);
}

void loop() {
  //digitalWrite(respawn, LOW);
  
  digitalWrite(respawn, HIGH);
  
  // Respawn
  /*if (millis() > dernierRespawn + 1000 + map(analogRead(delai), 0, 1023, 0, 10000)) { // De 1s à 11s
    dernierRespawn = millis();
    digitalWrite(respawn, HIGH);
    delay(250);
  }

  // Touche (désactivation)
  if (1-digitalRead(touche)) {
    digitalWrite(respawn, LOW);
    digitalWrite(desactive, HIGH);
    delay(10000 + map(analogRead(desactiveDuree), 0, 1023, 0, 100000)); // De 10s à 110s
    dernierRespawn = millis();
  } else {
    digitalWrite(desactive, LOW);
  }*/
  
}

```

board here :

 ![](https://europe1.discourse-cdn.com/arduino/original/4X/9/6/c/96caee3b4f2c242efcda5c6f5563d705a2a4003b.jpeg)  
 ![](https://europe1.discourse-cdn.com/arduino/original/4X/d/8/6/d86c87a743acd0632e65773d1e4bfa5816b60c26.jpeg)  
 ![](https://europe1.discourse-cdn.com/arduino/original/4X/c/8/3/c838399bdcac5111130974c4dc45d324ab5135ed.jpeg)

> Do not do that! It will damage the LEDs and possibly the Arduino pins.  
> Note. 😂

@JohnRob:  
Thank you for all this information & the diagram on the voltage drop, on a previous assembly (this one is only my second), I had no problem with the leds (the same ones). And with equivalent resistances. Here the problem is precisely that with 150Ohm, the lighting is 10% of normal (compared to a direct 5V power supply & with the resistor).  
If I connect the + to the 5V output of the arduino, same result, it lights up very badly.  
I tested with another Uno card, same thing.  
I just went to look for other resistors, I get normal lighting at 100 Ohm, but I find it strange on the internet we see everyone putting 220?

> You didn't show your calculations tell us the resistance. ...For a 2V LED at 20mA you have 3V across the resistor so 3V/0.02A =150 Ohms. Is that what you're using?  
> Yes and it's too much. 100 is fine.

> And if you measure the current you are probably exceeding the specs for the LED and the Arduino! 😉 It might work OK or one or both may eventually die, or the Arduino may become flakey when the LED is on.  
> My father explained to me afterwards that tension and charge were linked but I still have a little trouble with that. 😉  
> Well I wouldn't do it again anyway. 😁

> A common mistake is not setting the pin to OUTPUT in setup()  
> Yes I had suspected when several people asked me that it must be something like that, no my PIN is correctly configured

> Of course since neither code nor the result of the supposed calculation was given, we so far do not - cannot - know. 😁  
> Yes I should have, I'm not sure why I didn't post at least the code from the beginning, it's stupid. 😅

I use this site to calculate the resistance of my leds:

> **[LED Series Resistor Calculator | DigiKey Electronics](https://www.digikey.fr/en/resources/conversion-calculators/conversion-calculator-led-series-resistor)**
>
> DigiKey's LED series resistor calculator uses supply voltage, forward voltage, and forward current values to help you identify the correct series resistor.

for the blue, it gives me 100 Ohm  
for red, 150 Ohm  
It's too much for red.  
And in general people take a value a little above. There I even have to take a little below to be good.

I no longer have access to the LEDs page, they are 3mm bought on aliexpress, nothing very high-end.

thank you all for your attention and the time you spent answering me, in itself I can put 100Ohm everywhere, but I find it counter-intuitive to have no safety margin, or even to reduce it in the case of red.

(or else the specs of my leds are wrong).

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 25, 2022, 12:29pm UTC](https://forum.arduino.cc/t/leds-without-resistor-voltage-ok/981691/9 "2022-10-25T12:29:43Z")

</div>

Closed on October 25, 2022, 12:29pm UTC

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