I've recently started messing around with an arduino, and I'm working towards making a wireless car. I got an idea that I could add some standard LEDs to the car to make it look a little better, but when I search online all the LEDs are around 3V. I have a few LEDs from before that I always connected to 5V without second thought, and they look exactly the same as the ones I see online.
So my question is, would connecting those 3v LEDs to 5V on the arduino damage them and I would need to use a regulator, or are they going to be fine?
You should not be connecting LEDs directly to your arduino pins. It will work because the amount of current that can flow out of an ardino pin is limited but you could damage it.
You really need to include a resistor in series with your LED. If you look up the specs for your LED, you will notice the forward voltage (Vf) and the amount of current (Imax) for the LED. Use that information to calculate how much series resistance you will need.
(5V - Vf) / Imax ==> (5 - 3) / 20mA = 100 ohms. A more typical value for an LED is around 2V and the current can be lower so a common value is a 220 ohm resistor ( or 330 )
Hi!
Most LEDS get damaged from long exposure to 5V; I (generally) just use a 330 ohm resistor to prevent this.
You can check the ratings for the LEDs you're using too, and use a bit of math to figure out what resistor to use to meet these ratings.
Thanks for the answers, I know I need to use a resistor, but my concern is that using 5V instead of 3V will damage the LED in the long term. I've only ever connected them for a little while, but if I'm going to put them in the car they will be running for a much longer time at a voltage they are not to work at.
Is the forward voltage the only voltage the LED can work at or is the maximum voltage higher?
OK, love the avatar - it seems to fit.
You are not comprehending the nature of LEDs and their operation.
There is no such thing as a "3 V LED".
LEDs are characterised by a conduction voltage - the voltage drop which the LED will exhibit at a particular current. This voltage depends on the led colour - the inverse of the wavelength - so that for IR LEDs it is about 1.2 V, for red between 1.5 and 1.9, and at the other end, for blue/ purple and their derivative, white LEDs (which use fluorescence) it is perhaps 3.2 V.
The implication of this is that to operate the LED, you need to arrange for it to pass a particular design current. So you have to figure out how to achieve that. The conduction voltage assists you by giving you an approximation of what voltage there will be across the LED, but it is only an approximation and will vary with individual devices and temperature. Thus as I say, "no such thing as a 3 V LED".
So how do you arrange for a specific current to operate the LED? Well, there are various ways but the simplest for indicator LEDs which are specified at up to 20 mA, is to use a resistor. This is where it is useful to know the conduction voltage of the LED. If that voltage is for example, 3.0 V for a white LED then we can decide to use a resistor which will pass say, 20 mA at 2 V across the resistor.
We can expect that the conduction voltage of the LED will not vary more than a couple of tenths of a volt either way, so we know that the resistor will see between 1.8 and 2.2 V if the LED and resistor in series are powered at 5 V. So we use a value of resistor 2/0.02 = 100 Ohm and the current might in that respect, vary between 18 and 22 mA which is reasonable.
You need to have that order of "leeway" voltage across the resistor in order to allow for variations in the LED voltage, so for an LED with a conduction voltage of 3 V, it is generally not practical to operate it from less than 5 V. In short,
There is no such thing as a "3 V LED".
Damn, couldn't have asked for a better reply. Thanks for responding in such detail, I know it is pretty trivial but I really wasn't sure how it worked.
And yeah, my profile pic shows my confusion pretty accurately.