What's bred in the bone comes out in the flesh! Electricity is my basic job, and sometimes I find on the web let’s say inaccuracies… Here you will find some notions or tricks on subjects that made me react. My goal is to be fairly rigorous, but keeping it as simple as possible.
So, for the moment, these pages will deal with a little bit of everything and without specific plan.
Note: for diagrams, I use the current international standardized representation, published by the International Electrotechnical Commission (IEC). I hope you will not be too much disturbed if you are used to the old standards of the 60s or the American representation, which persists because of PCB software originating mostly from the USA.
An LED, light-emitting diode, is in fact actually a diode, in the sense that it conducts current only in one direction, but the comparison stops there. It is not this property that interests us here, but rather its ability to emit light. As a normal diode, an LED has a forward voltage (ie when conducting, noted VF in the data books, which varies from 1.5 to 3 V depending on the type of LED and color of the light. Typically the voltage increases from infrared (TV remote control) to purple through the red and all colors of the rainbow. This is because the shorter wavelengths (towards violet) require more energy than the longer ones, and this explains why blue LEDs and even more violet appeared only recently (for the greatest satisfaction of train models enthusiasts!).
If the polarity is reversed (the + and – terminals are exchanged), the diode is blocked. It then supports a reverse voltage which, for a normal diode, is at least 50 V. But for an LED, it is much less (about 5 V). Caution should therefore be taken if the voltage can be reversed (eg AC). If the maximum is exceeded, it’s the assured breakdown (very inconspicuous, without fireworks!). See next page for how to know the direction of a diode.
The light emitted by the LEDs is practically monochromatic, ie. of a single wavelength. Before the white LEDs existed, yellow LEDs were often used to illuminate cars (railway models, I mean), and the visual rendering was very bad, because the objects of a color containing no yellow appeared gray or black!
The case of white LEDs is somewhat peculiar, since they emit at the source a blue light that is converted into white light by a layer of phosphorus. See an interesting article on the website led-fr.net. This is the same principle as for fluorescent lamps (those called neon, wrongly because they do not contain neon!). This explains also the problems of color temperature encountered: in no case will we have a rich light of all wavelengths like that of the sun.
Note that it exists tricolor LEDs, made up of three LEDs in the same case, one red, one green and one (or two) blue. By varying the luminous intensity of these three colors, we can theoretically reconstitute any color. This is the principle of the color additive synthesis used among other things on TV screens. But these LEDs are by nature more difficult to miniaturize than the others. Nevertheless, they have a great interest in the rear signaling of trains in era II (and III?), where multiple colors were used depending on the type of train (regular, additional, last of the day, etc.)
As we have seen, an LED has a forward voltage of a few volts. Our sources have a voltage ranging from 9 V (battery) to 20 V (DCC set to maximum). If an LED is connected like a normal (incandescent) lamp, it will be instantly destroyed by overcurrent. It is therefore necessary to add to it a resistor which will limit the current and also adjust it to obtain the desired light intensity.
How to calculate the resistor? It's very simple, don’t worry, even for a non-electrician. There are two laws (outage!) to know, and again, in only a small part: Ohm’s law and the mesh rule.
Note to specialists: I simplify on purpose not to discourage!
Let’s first apply a result of the mesh rule: the sum of the voltages along the branch constituted by the elements in series (the resistance and the LED), which constitute the receiver, must be equal to the voltage supplied by the source, or generator (which is almost never represented on the diagrams):
VR + VF = VALIM
Numerically, if the supply voltage is 12 V and the LED has a forward voltage of 3 V:
VR + 3 V = 12 V
VR is unknown. It is precisely this value that we seek. It is easy to find it:
VR = 12 V − 3 V = 9 V
Let’s now apply Ohm’s law, which states that the ratio between the voltage applied to a resistor and the current passing through it is constant, and is precisely called resistance. Here the applied voltage is VR, and the current is IF. Indeed, the LED’s current IF also passes through the resistor. So:
R = VR / IF
If the LED current is 5 mA (or 0.005 A), this gives:
R = 9 V / 0,005 A = 1800 Ω, or 1,8 kΩ
Note: if you do the calculation by keeping the milliamps, you get the result directly in kilohms, but do it only if you are self assured:
R = 9 V / 5 mA = 1,8 kΩ
All right. It happens that 1.8 kΩ is one of the standardized values found on the market (see page 4). What if this is not the case? Well, just take the closest value. The small difference will change practically nothing. If you take the higher value, you will have a slightly smaller current, and vice versa, but the difference in light intensity will be insensitive. In our example, if we had found 1650 Ω, we could have chosen either 1500 Ω (value by default) or 1800 Ω (value by excess).
Neon lamps do exist: they can be found into the stairwells buttons, into certain irons and some coffee-makers; they give a typical orange light. But trying to light up with is a challenge…