What R with a LED with Vf of 4V with a ESP32 (3.3V)

Ok, I’ll of course use resistors with LEDs… but what if the equation results in <0 value for R? Do I forgo a R? Do I use a 1ohm (if i can find)?

You can't use an LED with a Vf of 4V with a 3V3 supply.

You need a supply voltage higher than the Vf of the LED, otherwise there will be no current through it and it won't light.

You can’t use an LED with a Vf of 4V with a 3V3 supply.

Ya think ? :smiley:

Get a 5vdc phone charger to power the led and then use a relay to turn it on.

(I might be able to use an NPN transistor:

Let Ic = 0.020 A
hfe = 100
Ib = Ic/hfe
= 13,000‬ Ohms
for Saturation multiply Ib*10 =0.002 A
Rb = 2.6 V / 0.002
Rb = 1.3k Ohms

Ya think ? :smiley:

Get a 5vdc phone charger to power the led and then use a relay to turn it on.

Yes, I think. That would not be using an LED with a 3V3 power supply, that would be using it with a 5V power supply :slight_smile:

Maybe, possibly, this would work. With the output high there is not enough voltage for the LED to conduct, with it low there is 5V across the LED and resistor. Resistor correct for 5mA. D1 Mini used as it was the first 3V3 device I could find in the KiCAD library. Not tested in any way.

PerryBebbington:
You can't use an LED with a Vf of 4V with a 3V3 supply.

Suggest you try it. I often use white leads with a 3v supply.

Suggest you try it. I often use white leads with a 3v supply.

The question was about LEDs with a Vf of 4V, I stand by my answer. I don't have any LEDs with a Vf of 4V to try, but if they light from 3V then their Vf can't be 4V.

Vf of a LED is at the rated current (20mA?).
A white/blue LED with a Vf of ~3.3volt lights up from about 2-2.5 volt.
4volt sounds like a UV LED.

How do you power that ESP32.
From a 5volt source, with a 3.3volt regulator?
Than powering the LED from 5volt, and switching it with the 3.3volt pin of the ESP should work.
See PerryBebbington's circuit in post#4.
Leo..

@Perry,
FYI, "Ya think" is smartass for "obviously !"

so, yeah, I was agreeing with you , not
questioning or doubting you.

PerryBebbington:
Maybe, possibly, this would work. With the output high there is not enough voltage for the LED to conduct, with it low there is 5V across the LED and resistor. Resistor correct for 5mA.

Rats! You beat me to it! That is exactly how you do it. :sunglasses:

This is how you connect one of the common opto-isolated relay modules to an ESP.

The combination of voltage drops of the green LED and the opto-coupler is more than the 3.3 V supply voltage, so you firstly need to connect the "Vcc" to 5 V rather than 3.3 V while is it perfectly safe to do so as the LED drops prevent any more than 3.3 V (if indeed, that) to ever be applied to the GPIO pin (as long as the ESP is actually powered which it always should be if its supply is derived from the 5 V).

I checked two different ESP32s and neither
had a 5V pin. If it did you would think the
OP would have already tried sinking the current
with an output pin.

Couldn't find any here with a 5V pin, but with a phone charger, the same concept should work but the 5V source would just
be external. You should still be able to sink the current.

raschemmel:
@Perry,
FYI, "Ya think" is smartass for "obviously !"
so, yeah, I was agreeing with you , not questioning or doubting you.

Oh! :slight_smile:
I can only assume you are from a different part of the world to me, because it doesn't mean that to me!

Well, where are you ?
Every single example of the use of that
expression I have ever seen has been
to mean 'OBVIOUSLY !'

ie: "Maybe I should wear my mask at the
grocery store ?"

"Ya think ?"

In the USA it has replaced the old
"No shit, Sherlock !'
(funny how we managed to combine
low-brow vernacular with a reference to
a high-brow English Literature character.
I think I read all of Sir Arthur Conan Doyle
when I was 14)

Well, where are you?

UK, not far from Nottingham.

Every single example of the use of that expression I have ever seen has been to mean OBVIOUSLY!'

Gerroff! It dun't, durrit? Y'aying me on!
Kind of makes sense, but no, I don't think that's in the local vernacular.

While I am perfectly used to wearing a mask for a few hours at a time, and a proper mask with eye shield is obviously what is preferred, it annoyingly causes the sun to glare into my eyes from the shield in the car park.

If there are few people in the grocery store/ supermarket at the time, I have been foregoing it. Just keep away.

Note recent Dilbert.

"Astronomers report a large asteroid is scheduled to pass close to Earth next week.
They said it looks like it's wearing a mask..."

UK, not far from Nottingham.

How's Robin Hood ? Is he wearing a mask too ?

@PerryBebbington,
I keep confusing your name with Pappyboyington (WWII,Black Sheep). I'm probably dyslectic.

How’s Robin Hood ? Is he wearing a mask too?

I wouldn’t know, we are not allowed out!

Robin Hood
Doesn’t look like it!

Cool statues !

PerryBebbington:
You can't use an LED with a Vf of 4V with a 3V3 supply.

You need a supply voltage higher than the Vf of the LED, otherwise there will be no current through it and it won't light.

Really? What about that great British invention - the Joule Thief? :slight_smile:

Really? What about that great British invention - the Joule Thief?

Gosh! I remember those! :slight_smile: