Dim LEDs

I am using an Arduino UNO. On this board, there is an LED already on pin 13 and a resistor to go with it (please correct me if I am wrong about anything). This system lights LEDs nice and bright and, without further resistors, presumably does not damage the life of the LED. On pin 12, I am using another of the same type of LED, and 300 ohms makes it very dim in comparrison - is this right?

Looking at it - they are bright from the front

If you have a low mCD LED, it may appear dim.
If you have a high brightness LED, it will be blindingly bright!


I am using another of the same type of LED...

If you are using the exact same part number, it should be about the same brightness.

...and 300 ohms ...

Lower resistance will give you more brightness, but you cannot exceed the current rating on the LED (typically 20mA) or the current rating of the Arduino output. LEDs are "constant voltage" devices (variable current) and you need to know the voltage before making any calculations.

LEDs are typically rated at about 2V (you have to check the spec for the particular LED). So, if we assume 5V out of the Arduino and 2V across the LED, that leaves 3V across the resistor. Using [u]Ohm's Law[/u], you can calculate the desired resistance (or current through a known resistance). 3V across 300 Ohms means you have 10mA through the resistor (and through the LED). If you wanted to calculate the resistance for 20mA, Ohm's Law gives you 3V/0.020A = 150 Ohms.

Don't forget to set the other pin to OUTPUT.

It is on OUTPUT - I have already made that mistake - and I think I have learnt my lesson on simple circuits

Thanks to everybody who gave me help

The colour and forward voltage of LEDs are strongly related. Red are about 1.7V, orange/yellow 1.9V, green 3V, blue/white 3.5 to 4V. This is due to the particular semiconductor material used - its bandgap voltage determines the energy/colour of photons emitted as well as the forward voltage (which is somewhat below the bandgap voltage at room temperature, but closely approximates it at absolute zero).

White LEDs are really blue/violet LEDs with a yellow fluorescent plastic coating.