7
\$\begingroup\$

I've been a programmer for years but am very new to electronic engineering. So far I see people saying it doesn't matter where a resistor goes in your LED circuit as long as it is present, but it sounds like that's the nature of the basic LED circuit.

When does the placement of a resistor start to become important?

\$\endgroup\$
  • \$\begingroup\$ It a nature of any series-connected circuit. So, in series connected circuit the placement of a resistor is not important given it is still in series. \$\endgroup\$ – Eugene Sh. Jan 23 '15 at 17:27
  • \$\begingroup\$ It will matter if you try to place it in parallel to your LED. You will probably end up with a burnt LED..And in the worst case with burnt driving circuit. \$\endgroup\$ – Eugene Sh. Jan 23 '15 at 17:34
  • \$\begingroup\$ Take a look at BJT amplifiers - to me, they 'feel' like they should work the same as diode circuits, but they depend on the resistors being in the right order. \$\endgroup\$ – Greg d'Eon Jan 23 '15 at 17:45
  • \$\begingroup\$ possible duplicate of Why does a resistor need to be on the anode of an LED? \$\endgroup\$ – Ricardo Jan 23 '15 at 18:40
  • 1
    \$\begingroup\$ Ok. But then your question is a bit too broad in my opinion, because there are a lot of circuits where LEDs and resistors are involved. That's probably a reason why you're getting so many answers. But I won't get into an argument with you at all, since the question was well received, that's what, counts I suppose. \$\endgroup\$ – Ricardo Jan 23 '15 at 22:17
11
\$\begingroup\$

Since you say you've been a programmer for years I am going to ask you to stretch your mind a little bit answering your question in the most general way.

You refer to resistors, I am referring to any two terminal component (TTC). What's a two terminal component? You guessed it, it's anything that has two terminals. That is useful since we can define a current that flows through it and a voltage across it:

thanks to it.wiki

(Bipolo is the Italian for TTC)

So basically you can connect TTCs in two ways:

  • parallel: all the voltages across all the TTCs are the same, while the currents may be different
  • series: all the currents through the TTCs are the same, while the voltages may be different

please note that there are other ways to connect components, but let's focus on these.

When you connect many TTCs in series you obtain another TTC, its current is the same that passes through all the TTCs while its voltage is the sum of all the voltages across the internal TTCs. This means that the order of the chain is not important since the current through them will always be the same, and the total voltage also won't change because sum is a commutative operation.

And of course the same applies when you connect many TTCs in parallel.

So when does it count? Well I see two cases:

When you don't have a series nor a parallel you can't just swap things around and hope things will still work, as someone said in a comment think of a simple CE bjt amplifier:

courtesy of the big web

You may look at it and say hey! R1 and R2 are in series, I can swap them. No, you can't because they are not in series because the current that flows in R1 is not the same that flows in R2.

Another case is when you need to measure either the voltage across a TTC in a series or the current through a TTC in a parallel. Maybe that voltage/current controls some other quantity around your circuit and if you don't be careful enough you might end up with wrong results:

schematic

simulate this circuit – Schematic created using CircuitLab (Sorry, that image sucks but the editor randomly places labels around.)

Suppose that the top terminal of R1 is connected to some fancy circuit and that \$V_{out}=kV^*\$. Please note that R1 and R2 are in series, I've drawn a wire coming from the middle of them but no current flows there, so the current that flows in R1 is the same that flows in R2. But what happens when you swap R1 and R2? Well, of course \$V^*\$ changes! If your fancy circuit outputs some current \$I_{fancy}\$ in the first case \$V^*=I_{fancy}R1\$ while in the second \$V^*=I_{fancy}R2\$, and these may differ of course.

\$\endgroup\$
8
\$\begingroup\$

Resistors in series with other components are, themselves, transitive. They can be swapped with other components in the uninterrupted series and they will react the same. However, the other components may not like being swapped.

From the resistor's point of view, the current is the same regardless of the position. Since the LED is a current device, it won't be affected by the swap.

If you "tap" the connection between the resistor and the LED, though, then you are sure to get a different voltage depending on the position of the resistor relative to the LED - this is no longer an uninterrupted series circuit, but has some parallel aspects. In this case you can't necessarily swap them without affecting the circuit - specifically the voltage at the tap and the new parallel circuit created by that tap.

schematic

simulate this circuit – Schematic created using CircuitLab

The above two circuits will operate the same in every use case you will run into as a programmer.

schematic

simulate this circuit

The above two circuits will be different depending on where that wire goes off to the side.

You can apply the same principle to many other two terminal devices next to resistors as long as you observe polarity when doing the swap. If there is no wire coming off between two items in series, then swapping the two is likely to have little effect on the overall circuit.

Of course if neither object is a resistor, the answer might be different.

Note that this is generic and good enough for the types of circuits you should be working with. If you get into reactive components or active components (AC signals, such as sound, RF, etc) then you will find that sometimes even resistors are not transitive.

\$\endgroup\$
5
\$\begingroup\$

It becomes important when there are multiple paths for current to travel in a circuit. A basic led resistor circuit has a single path. If you need to control the path of current, or the value of voltage at a certain node, then the resistor placement (and value) becomes important.

As a programming analogy, simple addition of a group of integers, it doesn't matter the order. Now throw in multiplication, the order is important. Concating a group of strings, placement becomes important for the out come to be readable.

\$\endgroup\$
  • \$\begingroup\$ Nice analogy :) \$\endgroup\$ – seetharaman Apr 13 '16 at 16:38
1
\$\begingroup\$

The resistor serves to limit the current that flows through the LED, so it needs to be placed in such a way that the resistor and LED share the same current path. IOW, in series. It does not matter which side of the LED the resistor is on. Also, if you have multiple LEDs in series, you only need one current limiting resistor, and it can be placed anywhere in the chain.

\$\endgroup\$
  • \$\begingroup\$ Upvoting this because this is exactly the answer I was looking for when I came here. I needed to know if I could put the resistor anywhere in the chain; I was 99.9% sure the answer was yes, but having someone else confirm it was helpful! I made some modular boards at OSHPark for 1 and 2 LEDs that can be chained in series, but they have all the through holes to be run independently (i.e. each has holes for a resistor in addition to the LEDs -- use wire to bridge if you don't want a resistor, and a pair of holes to bridge the final cathode to the return path on the back of the board) \$\endgroup\$ – Doktor J Aug 12 '16 at 0:14
1
\$\begingroup\$

In general (that is, almost always) the location of a component in a series connection does not matter. The exceptions generally have to do with the relationship of the part to other components as mediated by considerations that don't show up on schematics.

For instance, in high-voltage circuits, a switch in series with a load resistor to ground might be required to be connected on the ground side of the resistor, in order to reduce shock hazard which would result from the body of the switch if it were sitting at the high voltage.

Likewise, an optocoupler might be required to be connected where the isolation voltage between the input and output is not too great.

A capacitor in a tuning circuit might need to have one side tied to ground so that the case is also tied to ground and acts as a shield for the other terminal.

In analog IC design, the order of occurrence of components can affect the consequences of different parts of the circuit getting heated more or less, and thus the voltage drift and linearity of the output with changes in input.

But these considerations don't apply to LED circuits such as you're interested in.

\$\endgroup\$
  • \$\begingroup\$ Your examples are very good. \$\endgroup\$ – Vladimir Cravero Jan 23 '15 at 19:04
1
\$\begingroup\$

If you're asking more broadly than just at the circuit level. For me physical placement of resistors is important for terminating high speed signals on the board. You might use a small resistor at the source to match the output impedance of the driver to the trace, and you might use another at the end to terminate the signal. Same goes for resistors used in feedback paths, whether they be for a regulator or a filter. I want those close and tight to my devices to minimize noise that could creep in.

\$\endgroup\$
0
\$\begingroup\$

It doesn't really matter where you place a current limiting resistor for LED. I usually place them between power and anode, so I can connect all cathodes together and to the ground when I have bunch of LEDs next to each other. This way I can place the resistors anywhere on the board and will save some space but not having to have traces for return current for all LEDs, just one, which is also ground, which would be there anyway in the form of ground pour.

\$\endgroup\$
0
\$\begingroup\$

The placement of the resistor ALWAYS matter at some combination of geometry and frequency. Typically, however, what people are asking is whether they will notice.

Just find two old Tandy Radioshack TRS-80s, place them side-by-side and try to run programs on both at once!

\$\endgroup\$
  • \$\begingroup\$ I think the joke was wasted on me. Did some of the TRS-80s come with a different amount of resistors? \$\endgroup\$ – Jacksonkr Jan 24 '15 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.