Is there any reason that one cannot or should not use a single resistor on the ground end of the circuit, instead of using multiple resistors, one for each of the LEDs, on the +ve end of the circuit?
IF you can guarantee that ONLY one LED at a time will be illuminated then you can indeed use a single resistor. However if there is ANY possibility of more than one LED being illuminated simultaneously then you need individual resistors.
jackrae:
IF you can guarantee that ONLY one LED at a time will be illuminated then you can indeed use a single resistor. However if there is ANY possibility of more than one LED being illuminated simultaneously then you need individual resistors.
I am glad to see a moderator saying this! I am in the same boat really. I have so many questions, but I just can not seem to find the correct words to utilize the search to its fullest.
Since we're on the topic of resistors and ohms law, could someone explain how many amps is too many amps (i dont want to break my arduino)? Can someone walk me through this? I only have ONE of the needed two bits regarding ohms law (voltage = 5v). Where would I get the resistance or current when I am setting up a few LEDs for example?
I've just been throwing a resistor on every LED (330) to connect them to the ground due to my lack of real knowledge. I'd like to fix that lol.
Where would I get the resistance or current when I am setting up a few LEDs for example?
You decide on what current you want. You do this from the data sheet and how bright you want them. Most small LEDs take 20mA maximum but they are nearly as bright with only 10mA.
Having chosen the current you calculate the resistance.
The LED will have a forward voltage drop depending mainly on the colour. Say it is red then it would be about 1.8V BUT see the data sheet for your LED for the exact value. Subtract this from your 5V supply, so you get the voltage across the resistor:-
5 - 1.8 = 3.2V
So to get the resistor that will have 3.2 Volts across it when there is 10mA through it use ohms law:-
R = E/I ...... = 3.2 / 0.01 = 320 R ( or ohms )
Which is close to what you have been doing.
From an arduino pin too many amps is 40mA, keep it below 30mA.