I've recently started doing basic diode connections (red and green diodes). I've also got blue diodes, but there's one thing that prevented me from connecting them already, namely - the specs say they're 3.3V.

While calculating resistor value, I'm doing simple: 3.3V - ULed / 2mA to obtain resistor value needed to draw default 2mA.

But if the forward voltage of blue diode is said to be same as supply voltage of my GPIO pins, how would then things work? Will the rpi be just 'unable' to power up the led? And if it will (and diode will do just fine with lower voltage), how should I calculate resistor value?

  • NOTE:* A confusing topic perhaps... a more recent question has been marked as a duplicate to this question. However, as I read these questions, it seems to me that the answers omit a key fact: There are 3.3v LEDs available, and they do not need an external resistor to operate. This question has also been asked and answered in the SE EE forum. @ikku
    – Seamus
    Aug 19 '18 at 17:48

The 3.3v forward voltage drop that you talk about, is specified at a certain forward current. This is just a point on a Forward Voltage Drop / Forward Current curve. In the datasheet of the LED you should also have the total curve. You can use this curve to select a different point for a different drop voltage / current, this implies you will not be using the LED at it's brightest. A good example of how to do this can be found here.

  • Many thanks! surprisingly, I was looking for something like 'electronics' stackexchange (as I predicted it might be a better place to look for an answer), but only on the footer here, so I just didn't find it.
    – Bartosz
    Dec 17 '12 at 12:00

You can connect the anode of the LED to the +5v and pull the cathode to GND with the GPIO pin. This gives you 850 ohm for 2mA. 820 ohm should work fine too.

     > 820 ohm
     V LED

  • Yeah, that would work if I didn't want to control them (I didn't state it in my question).
    – Bartosz
    Dec 17 '12 at 12:18
  • 2
    @Bartosz, You can control it. When the GPIO is low, the LED will be on. When the GPIO is high (3.3V) the LED will only have 1.7V across it, so won't light up. Dec 17 '12 at 12:24
  • Oh damn, care to elaborate 'pull the cathode to GND with the GPIO pin'? The diagram could be also nice:)
    – Bartosz
    Dec 17 '12 at 12:27
  • Thanks, needed to refresh my knowledge about potential difference a bit, I think I was missing quite big chunk of the overall picture:)
    – Bartosz
    Dec 17 '12 at 14:00
  • 1
    I'd be wary of connecting a voltage over +v of the chip to a gpio, although the led threshold should not allow any current into logic high at +5V. Investing in a few transistors would be cleaner, like in blog.jacobean.net/?p=158
    – XTL
    Dec 19 '12 at 7:53

The OP asked 3 questions:

  1. But if the forward voltage of blue diode is said to be same as supply voltage of my GPIO pins, how would then things work?

What this means is that the manufacturer has integrated a resistor with the LED. This relieves you of having to size the resistor yourself, and insert another component in your circuit. The manufacturer has chosen the proper resistor value for connecting the LED across a 3.3v supply (RPi GPIO pin for example).

  1. Will the rpi be just 'unable' to power up the led? And if it will (and diode will do just fine with lower voltage),

The RPi will be able to power up the LED from any 3.3v output. If you reduce the voltage below 3.3v, the LED will still light up when this lower voltage is applied to a point. At some point, if the voltage is low enough, the LED will no longer illuminate because the forward current is too low, or your supply has not forward-biased the LED.

  1. how should I calculate resistor value?

Again, as long as the LED has an integrated resistor (which will be the case when the LED is specified as a "3.3v LED"), then you need not calculate, or add, another resistor to your circuit.

Finally, you should always consult the spec sheet published by the manufacturer for the device as the "ultimate authority" in these matters. Spec sheets are available online from a variety of sources. Mouser's website is one I use; they list a large number of 3.3v LEDs in their catalog.

  • TWIMC: Care to elaborate on the downvote? If I've missed something, I'd like to learn of it.
    – Seamus
    Aug 19 '18 at 17:52
  • I'm confused about why this is the only thing I've ever seen that suggests 3.3v forward voltage on an LED just means the LED has an integrated resistor. I'm pretty sure that's not correct. As far as I knew, blue LEDs, and therefore also white ones, have an actual forward voltage on the diode of 3.3v Dec 27 '20 at 12:58
  • @thomasrutter: What do you think it means? The forward voltage drop of an LED isn't a single value - it varies IAW forward current, temp & other variables. Ordinarily, when one offers an LED with a specific voltage - this is what it means - for example. And FWIW - I'm pretty sure it is correct.
    – Seamus
    Dec 27 '20 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.