Blue led issue

To test a part of my bigger circuit, I wrote a sketch which turned on leds connected to digital pins. All the leds have a common 220 ohm 1/4 W resistor. But the blue one (with transparent casing) won't turn on, but turns on bright when no resistor is used(which is a bad practise). The digi pin is giving 5V and checked whether it was able to power other leds and that worked fine. The issue is only with blue led. However, it turned on when I used an external 5v supply with the led connected to it with 220ohm in series.
Any ideas??

Does it happen on all the pins? Eg swapping them around?

Yes...I swapped pins and thing's the same. Other color leds work fine.

The other LEDs are clamping the resistor to 1.8 volts, but the Blue LED needs 2.3 volts. Use a separate resistor for blue. The total current of all LEDs from one Arduino pin must be less than 40mA.

All the leds have a common 220 ohm 1/4 W resistor.

That's "bad practice" too. :wink: You damage anything like you might with no resistor, but as AmbiLobe explained, each LED has a different forward "breakdown" (turn-on) voltage.

The voltage across ALL of the LEDs with be determined by the LED that turns-on "first" (at the lowest voltage). Two "identical" LEDs may even glow with different brightness when wired in parallel.

GaN blue/green/white LEDs are about 3V, not 2.3 - it depends on the precise semiconductor used
but as a rough guide the forward voltage (volts) is proportional to photon energy (electron volts).

Paralleling LEDs is normally only done with identical ones from the same batch and on the same heatsink.

Using seperate resistors did work...Thanks....

if you think blue is power hungry, you should try the same 1 resistor trick with a shared RED LED.

Not so much power hungry, just a higher Vf.

Not so much power hungry, just a higher Vf.

lower Vf? (Red is lower than blue/white)

I meant blue had higher Vf, like 3.7V, than say red at 2.2V.