Why it is dimmer on 3.3 V
A 3.3 V pin has a third less voltage than a 5 V one, and the LED gets about a sixth of the current. The LED keeps its 3 V whatever the pin gives, so a 3.3 V pin leaves only a sliver for the resistor.
Where the volts go
The bar is the pin's voltage, split between the two parts in the loop. The blue part is the LED's share, and it barely moves: about 3.0 V, whether the pin gives 3.3 V or 5 V. The orange part is the resistor's share, and it is everything left over.
Only the resistor's share sets the current. From 5 V it is 2.0 V, and 2.0 V across 150 Ω is about 13 mA. From 3.3 V it is 0.3 V, which is about 2 mA.
A third less voltage, a sixth of the current
That is the surprise, and the reason is the fixed share. The pin voltage drops by 1.7 V, and all 1.7 V of the drop comes out of the resistor's share, because the LED's share does not move. 2.0 V becomes 0.3 V, so the current falls to a sixth.
Every LED behaves like this, but a blue one is the extreme case. A red LED takes about 2 V, which leaves a 3.3 V pin more than a volt of headroom. A blue LED takes about 3 V, so on a 3.3 V board it is running on almost nothing.
The 3.0 V is a bench measurement of one board, not a datasheet figure. Your LED's forward voltage may be a tenth of a volt either side of it. At 3.3 V that changes the current a lot, which is why the LED on two ESP32 boards can look slightly different while it looks the same on two Unos.
It still looks lit
About 2 mA is plenty to see indoors. The eye's response to light is closer to logarithmic than linear, so a sixth of the current reads as dimmer rather than as a sixth of the brightness. On a 3.3 V board the LED is a clear indicator, just not a torch.
Making it brighter on a 3.3 V board
The pin cannot give more voltage, and the resistor is soldered to the board, so the honest options are outside it:
- Use a 5 V board. The same block on an Uno gets about 13 mA.
- Switch 5 V with a transistor. The 3.3 V pin drives the transistor, and the transistor connects the LED to 5 V. A transistor as a switch covers the circuit.
Do not try to feed 5 V into SIGNAL alongside a 3.3 V pin, or join the two. The block would be fine; the ESP32's pin would not.
When it does not work
Not by much from the pin itself: the LED takes about 3 V and a 3.3 V pin has only 0.3 V left over. A smaller resistor would help, but it is soldered to the board. If brightness matters, drive the block from a 5 V board, or switch 5 V to it through a transistor.
The block does not care: it has no chip on it and takes whatever the pin gives. What matters is that SIGNAL is driven by a pin, not joined to one. Never connect this block's SIGNAL to an ESP32 pin and a 5 V source at the same time.
The eye does not see light linearly. A sixth of the current looks something like half as bright, which is why the LED is still plainly lit on a 3.3 V board. The same effect is what makes a straight PWM fade look uneven, in the article after next.
Not here. From 3.3 V the LED only asks for about 2 mA, inside the Pico's default drive of 4 mA. It would matter for a brighter load, and it is one of the reasons this block is dim on a Pico rather than broken.
How a pin that can only be on or off makes half brightness.
Brightness is a duty cycle →Edit this page — content/books/xl-led/why-it-is-dimmer-on-3v3.mdx
Questions about this product
See what other owners have asked, and read their solutions.
XL LED
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.