# Help with Led

Hello all I'm new Newbie to electronic I'm confused . when we connect i know that resistance should connected to to + anode of LED but sometimes is connected to anode : http://robotmill.com/wp/wp-content/uploads/2011/02/arduinoblink2led_fr.jpg help me with when it should be connect to anode or cathode ?? Thank you Simon

simoatk: Hello all I'm new Newbie to electronic I'm confused . when we connect i know that resistance should connected to to + anode of LED but sometimes is connected to anode : http://robotmill.com/wp/wp-content/uploads/2011/02/arduinoblink2led_fr.jpg help me with when it should be connect to anode or cathode ?? Thank you Simon

A current limiting resistor in series with an LED will work the same either side of the LED as in a series circuit the current is the same for all components. The voltage sums across each component so that the order of components cannot matter as a+b = b+a. Read up on Kirchoff's and Ohm's law for more insight into understanding these ideas.

Forgive me if I explain something you already know.

The answer to your question lies in the fundamentals of electronics. This starts with Ohms law. Ohm's law says that V (voltage) = I (current) * R (resistance). Another important point is that if you have 3 components in series with one another, the same current flowing through one component is flowing through the others! You're just consuming (or dropping) voltage across them individually. So, between your power line and ground, you need to consume all that voltage.

LED's are a particular class of component, which consume a particular amount of voltage across them. This depends on the colour and lots of other properties. You can look up typical values in the datasheet for that LED.

Now, LED stands for Light Emitting Diode. Diode's are a particular type of component with somewhat unique properties, that essentially only allow current to flow through in one way. (There are limitations to that, but I'm keeping it simple here).

So, let's say we have a 5v line and a ground line and we want to light an LED, which, from the datasheet we know consumes 1.7v.

Well, let's connect the anode to the 5v line and the cathode to the ground line. But oh wait! We're only consuming 1.7v across the LED! Where will we lose the rest? (5v - 1.7 = 3.3v)? Well, we will have to consume it across the wire between the LED cathode and ground. But the resistance here is very low. As such, V = I * R, in this example -> 5 = I * low resistance -> very high curent! Possibly an amp or more. Your LED isn't going to withstand that and will blow up. This is known as a short circuit.

So, we implement a resistor. This resistor will consume the remaining 3.3v. The trick here is that it does not matter which way around the LED the resistor is placed. You can go 5v -> resistor -> led -> ground, or you can go 5v -> led -> resistor -> ground. Or you could even 5v -> resistor -> led -> resistor -> ground (of course, generally speaking, there's not much point of that though). This works because the current flowing through one component is equal to the current flowing through any other component in series with it.

In terms of calculations, what's going on is we have 5v - 1.7v = 3.3v that we will consume across the resistor(s). If we had a 330 ohm resistor, the current would be 5 - 1.7 = I * 330 -> I = 3.3/330 = 10mA.

I hope this helps and should explain the circuit more fully. If you understand fully how this circuit operates electrically, it will be of much benefit when you try and understand more complicated circuits!