Let's consider the correct switching on of LEDs, only the electrical side of things.
To use the information below, you will need: a calculator, a soldering iron, a tester.
We should immediately dwell on some issues. If you do not have the skills to use the listed tools, it is better to contact a specialist, as a result of which you can avoid such troubles as an unplanned fire at home, as well as damage to your own body as a whole or its individual parts. Also, you should not direct the LED beam directly into your eye (or into the eye of a friend) at close range, which can damage your eyesight.
The factory parameters for turning on the LED should be observed. Before connecting an LED anywhere, you need to find out its electrical parameters.
A little physics. Voltage 'U' is measured in volts (V), current 'I' is measured in amperes (A), resistance 'R' is measured in ohms (Ohm). Ohm's law: U = R * I .
So, we decided to turn on the LED. Let's consider the most popular voltages - 9, 12 V. Consider the option when there is a constant voltage available, without interference (for example, batteries quietly removed from TV remotes), and then consider the issue of connecting to less ideal sources (interference, unstable voltage, etc.).
All LEDs have one main electrical parameter, which ensures its normal operation. This is the current ( I ) flowing through the LED. The LED cannot be called a two- or three-volt one. Those who did attend physics classes at school immediately have a logical question: if two LEDs are absolutely identical and the same current flows through both, then the same voltage must be applied to both. But no! The technology of manufacturing crystals does not allow making two LEDs with the same, let's call it, 'internal resistance' and according to Ohm's law, the corresponding conclusions can be made. Current must be passed through the LED (according to the factory parameters) and the voltage at its terminals must be measured. This voltage will ensure the required current flows through the LED crystal!
Let's consider the most common LEDs, designed for a current of 20 mA (i.e. 0.02 A).
The ideal option for connecting LEDs is to use a current stabilizer. Unfortunately, ready-made stabilizers cost an order of magnitude more than the LED itself; we will consider the production of a relatively cheap homemade one below.
Usually, the average voltage (at I=0.02 A) of a red and yellow LED is 2.0 V (usually this value is 1.8 - 2.4 V), and of a white, blue and green LED - 3.0 V (3.0 - 3.5 V).
So, the seller solemnly announced to you that you bought, for example, 'a red LED at 2.0 V, such-and-such brightness' - we will take the seller's word for now, check it and if it is not so, we will return and very politely.
Let's consider a simple option. For example, you have 8 1.5 V batteries at home, total 8.0 * 1.5 = 12.0 V (we take a high voltage to make it clearer), and connect one LED that you bought. Did you connect it? Now throw away your LED, because it burned out, the seller told you - 2.0 V, and you plugged it into 12.0 V! Bought a new one, or better yet, a small pile at once (photo). We look (not only look, but also very vigorously use the measuring device): there are 12.0 V, we need 2.0 V, we need to put the extra 10 V somewhere (12.0 - 2.0 = 10.0). The easiest way is to use a resistor (aka resistance). Find out what resistance you need. Ohm's law states:
U = R * I
R = U / I
The current flowing in the circuit I = 0.02 A. The resistance needs to be selected so that 10 V is lost on it, and the required 2.0 V reaches the LED. From here we find the required R:
R = 10.0 / 0.02 = 500 Ohm
The voltage across the resistance turns into heat. In order for the resistance to withstand the load and the heat generated does not lead to its failure, it is necessary to calculate the dissipated power of the resistance. As is known (again, we return to attendance of physics lessons) power:
P = U * I
On the resistance we have 10.0 V at a current of 0.02 A. We calculate:
P = 10.0 * 0.02 A = 0.2 W.
When buying a resistance, we ask the seller for 500 Ohm, with a power of at least 0.2 W (better more, with a reserve, so that you have peace of mind, 0.5 W for example, but you should take into account - the more