diff --git a/Notes/Main Base.base b/Notes/Main Base.base index e69de29..c6ab609 100644 --- a/Notes/Main Base.base +++ b/Notes/Main Base.base @@ -0,0 +1,3 @@ +views: + - type: table + name: Table diff --git a/Notes/PWM Candles Software.md b/Notes/PWM Candles Software.md new file mode 100644 index 0000000..d75874b --- /dev/null +++ b/Notes/PWM Candles Software.md @@ -0,0 +1,17 @@ +--- +created: 2026-06-08T14:10:00 +Index: +tags: + - software + - table-candles +source: +--- +# PWM Candles Software +--- + +1. User inputs the desired LED pins (via mosfets) to program +2. Program sets them as output +3. Program flickers each pin simultaniously, but with different flicker rates. + +--- +## References: diff --git a/Notes/PWM Candles.md b/Notes/PWM Candles.md index 77c902f..6faa192 100644 --- a/Notes/PWM Candles.md +++ b/Notes/PWM Candles.md @@ -1,10 +1,10 @@ --- created: 2026-06-07T14:31:00 -Index: "[[Escape Gallery]]" +Index: tags: - software - - escape-gallery - electrical + - table-candles source: --- # PWM Candles diff --git a/Source Material/Clippings/LED Resistor and How To Calculate the Correct Resistor for LEDs.md b/Source Material/Clippings/LED Resistor and How To Calculate the Correct Resistor for LEDs.md new file mode 100644 index 0000000..ef16af6 --- /dev/null +++ b/Source Material/Clippings/LED Resistor and How To Calculate the Correct Resistor for LEDs.md @@ -0,0 +1,164 @@ +--- +title: "LED Resistor and How To Calculate the Correct Resistor for LEDs" +source: "https://www.electronics-tutorials.ws/resistor/led-resistor.html" +author: + - "[[Wayne Storr]]" +published: 2025-06-11 +created: 2026-06-07 +description: "What size LED resistor do I need drive one or more series-connected LEDs and what end of the led does the resistor go to limit current flow" +tags: + - "clippings" +--- +## LED Resistor + +Using series resistors with LEDs is a fairly simple process, but it does require some basic knowledge of the LED itself as well as a bit of maths to limit the forward current flowing through the LED to a safe level + +## Using Series Resistors With LEDs + +A *light emitting diode* will illuminate once current starts to flow through it so a series LED resistor is required for current limitation. This series resistor creates a voltage divider network with the LED allowing it to operate safely. + +Nowadays, light emitting diodes are everywhere and an important part of many optoelectronic devices and circuits. Tis is mainly due to their low power consumption and the fact that they can produce a high brightness coloured light using low voltage levels. + +![led resistor colours](https://www.electronics-tutorials.ws/wp-content/uploads/2025/05/led-resistor-colours.jpg?resize=320%2C240 "LED Resistor Colours") + +Organic based LEDs are now successfully used in full colour displays in digital cameras, cell phones, car stereos, TV’s and PC monitors. However, in order for an LED to operate correctly an *LED Resistor* is required. + +**Light Emitting Diodes**, or **LED’s** for short, are solid state electroluminescent devices made from doped semiconductor materials such as gallium phosphide, aluminium gallium indium phosphide or gallium arsenide phosphide allowing them to produce a wide variety of different coloured light outputs, such as: red, green, orange and yellow. + +The electroluminescence light produced by any LED will only occur when the diodes p-n junction is **Forward Biased** allowing an electric current to pass through it. Thus for light production the diodes *Anode* lead must be made more positive with respect to its negative *Cathode* lead. + +That is, as an LED is constructed similar to a conventional rectifying diode with two leads, electric current can only flow from its p-side (anode) to its n-side (cathode), but not in its *reverse-biased* direction. Note that the longer lead of an LED is the positive (anode) lead, while the shorter one is the negative (cathode). + +Since the [light emitting diode](https://amzn.to/459VBCW) has nearly the same electrical I-V characteristics of a pn-junction diode, the type and intensity of light output generated depends on the current and voltage characteristics of the particular light emitting diode being used. Generally, the most commonly available LEDs require a forward voltage, V F of between 1.8 to 3.6 volts with a forward current, I F rating of about 8 to 30 milli-amperes (mA) to produce light. + +Clearly, both the forward operating voltage and forward current will vary depending on the doped semiconductor material being used to produce the required colour spectrum of light. But as a general rule of thumb, a forward current range of between 10 to 20 mA is the most common current value they are safely designed to support. + +The simplest electrical circuit we can create to power an LED is a low voltage battery source with a suitable resistor in series with an LED as shown. + +### Simple LED Resistor Circuit + +![led resistor circuit](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res90.gif?resize=324%2C133 "LED Resistor Circuit") + +We said previously, that an LED emits light from its pn-junction when an electric current passes through it. The amount of light emitted is generally proportional to the LED’s forward current, I F over a wide voltage range. + +Light emitting diodes are designed to operate continuously at a relatively low level of current, for example: 20 mA. So applying a voltage directly across a single LED without a series resistor can result in a higher than normal current flowing through the diodes pn-junction if not correctly controlled. + +Thus an LED needs a resistor to limit the current flowing through it to a desirable level, since its forward voltage drop, V LED is very low. That is, an LED, or group of LED’s should not be connected directly to a power source without using a current limiting series resistor. So what size resistor do we need for an LED? + +## LED Resistor Calculator Equation + +Choosing a suitable resistor to connect in series with an LED is fairly simple, it just requires some knowledge of the I-V characteristics of the LED being used, and some basic maths using Ohm’s Law. + +When a rectifying diode is forward biased, it has a voltage drop of about 0.7 volts across it. Similarly LEDs also have a voltage drop across them known commonly as their forward voltage value, V F or V LED. + +### LED Resistor Equation + +![ calculator equation](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res91.gif?resize=233%2C61 "LED Resistor Calculator Equation") + +Where: + +- **R** is the required resistance value in Ohms +- **V S** is the DC supply voltage +- **V LED** is the LED’s “Forward Voltage” drop in Volts +- **I F** is the LED’s required “Forward Current” in mA (milliamperes) +- **N** is the number of LEDs connected together in series + +Then in order to know what resistor to use with an LED we simply, select the LED current in milliamperes for the desired brightness, typically 10 to 20mA. Understand the forward voltage drop of each LED (from the LED’s datasheet) as well as the value of the supply voltage to be used to power it. + +### LED Resistor Example No1 + +So let’s assume that we want to power a single 5mm Red coloured LED which has a typical forward voltage, V LED of 1.8 volts when supplied with a continuous forward current, I F of 15mA from a 9 volt battery. Which series resistor value should we use with this LED? + +![led resistor example](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res92.gif?resize=400%2C63 "LED Resistor Example") + +In this simple example, the single LED requires a series current limiting resistor of 480Ω’s, because without it, the LED would probably burn out immediately due to overcurrent. However, there is no preferred value resistor with an exact 480Ω value, not even in the E96 Series at ±1% Tolerance. The next highest value would be 487Ω (or 500Ω) giving an LED current of 14.8 mA. + +But what about the resistors wattage value?. The resistors [power rating](https://www.electronics-tutorials.ws/resistor/res_7.html) can easily be determined using Ohms Law, since it states that: Power (P) = I 2 \*R. Thus for a forward current of 14.8 mA and a resistive value of 487Ω’s, the wattage value of our resistor would be: P = 0.0148 2 \*487 = 107 milli-watts. Thus, a standard 1/8 Watt LED resistor (or higher) is more than sufficient. + +### LED Resistor Example Circuit + +![led resistor example circuit](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res93.gif?resize=324%2C144 "LED Resistor Example Circuit") + +Here in this simple example, we have connected the series current limiting resistor in between the power supply and the anode terminal of the LED. But what end of the LED does the resistor go? + +Well, since it is a series circuit, we could connect the resistor to the LED’s anode terminal or its cathode terminal. In this case it does not matter as it will still limit the current flowing through the LED if connected to either side. What is important is that the LED is “forward biased”. That is, a positive voltage to the anode, and the negative voltage to the cathode. + +Note that some special types of LED such as multicoloured LEDs, flashing LEDs and 5V LEDs are designed to run directly off a 5V power supply provided by a digital logic gate, logic circuit, microcontroller, or Arduino, etc. Therefore, they do not need a series LED resistor. + +## Two or More LED’s Connected in Series + +We now know that a current limiting resistor must always be used in series with an LED to control the current and prevent the LED from being damaged. But what if we wanted to connect two or more LEDs in series. Would we need another LED resistor? The quick answer to that is: No!. + +It is quite common in electronic circuits that multiple [light emitting diodes](https://www.electronics-tutorials.ws/diode/diode_8.html) are connected together in a series string to a voltage source. Because the current flowing through two or more LEDs connected in series is the same, as it has only one path to take through the circuit, we can use just one LED resistor to control current flow. + +However, the DC voltage source supplying the series LEDs must be greater than the sum of their voltage drops plus the resistor. For example, assume we want to connect four of our previous Red LEDs in series. What value power supply would we need and what size resistor for the LED combination. + +Firstly, we know that each Red LED requires a forward voltage of 1.8 volts to illuminate. Thus the total voltage drop will be: 1.8 x 4 = 7.2 volts. If we assume the required voltage source is 50 percent higher than the sum of LED voltages. Then V S would be equal to 7.2 x 1.5 = 10.8 volts. To keep things simple, let’s round it off to 12 volts DC. + +Therefore, the value of the series LED resistor required to supply 15 mA, as all the LEDs share the same series current, is calculated as: + +![series led resistor](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res94.gif?resize=413%2C63 "Series LED Resistor") + +Thus we will require a 320Ω series resistor. Again, a 1/8 watt or higher wattage resistor is sufficient. Thus our circuit of four LEDs in series driven by a 12 volt power source becomes: + +### Four LEDs in a Series Circuit + +![series circuit](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res95.gif?resize=459%2C144 "4 LEDs in Series") + +Note that the LEDs are connected so that the cathodes (-) and anodes (+) alternate in their connection to each other in the circuit. Otherwise, connecting two anodes (+) or two cathodes (-) in sequence would block current flow so the LEDs would not illuminate. + +Also while we have chosen a 12 volt supply at 15 mA, sometimes for series connected LEDs it can be beneficial to have a lower voltage source. In this case, the lower brightness of each individual LED is compensated by having a larger number of LEDs connected together. Thus, there is less thermal loss overhaul giving the LEDs a longer lifespan due to a lower brightness. + +### Different Coloured LED’s in series + +As well as connecting the same coloured LEDs in series, we could also use different coloured LEDs together. For example, let’s assume we want to connect one Red LED with a forward voltage of 1.8V with a blue LED which has a forward voltage of 3.5 volts across a 6 volt battery supply. Both LEDs have a rated amperage of 14 mA as shown. + +### Bi-coloured LED Resistor Series Circuit + +![bi-coloured led resistor series circuit](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res96.gif?resize=389%2C139 "Bi-coloured LED Resistor Series Circuit") + +Then using the previous *LED resistor calculator equation* above, we can calculate the value of the LED resistor required as being: + +![bi-coloured led resistor value](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res97.gif?resize=518%2C63 "Bi-coloured LED Resistor Value") + +Then the series LED resistor must have a resistance value of at least 50 ohms. + +## Two or More LED’s in Parallel + +The problem with connecting multiple LEDs in series is that to overcome the forward voltage drops of each LED, we must increase the supply voltage, V S each time an LED is added to the series string while keeping the forward current at the same value. But what if we wanted to illuminate two or more LEDs from a single fixed low voltage battery supply. How can we do that? + +Well, in addition to connecting LEDs in series, we can also connect them in parallel across a common voltage source. However, while it is possible to connect LEDs directly together in parallel, it generally creates more problems than for series circuits due to variations in their I-V characteristics. + +For example, each LED must have the same forward voltage rating, which usually implies they are of the same colour, otherwise the lowest voltage LED in the parallel combination will light up as it takes all the supply current. Then while we may have a bunch of LEDs with the same colour, each LED can pass a different current due to variations in their I-V characteristics. + +One way to overcome this problem is to insert a resistor into each parallel branch to, in effect, balance all the LEDs across the same voltage supply. Since two or more LEDs connected in parallel, have the same voltage across them as shown. + +### Parallel LED Resistor Circuit + +![parallel led resistor circuit](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res98.gif?resize=405%2C182 "Parallel LED Resistor Circuit") + +As we can see, the resistors and LEDs are arranged in parallel branches to one another. Although the voltage across each parallel branch is the same, the individual branch currents would be different separating at each node and then recombining back to the voltage supply. In our parallel circuit example, current I 1, I 2, I 3 and I 4 represent currents flowing through each LED branch. + +The advantage here is that we can select each LED resistor to have a different resistive value as required to give different light intensities for each one of the light emitting diode. For example, let’s assume we have a 6 volt battery that will drive four 3mm round Red LEDs in parallel. Let’s further assume as before, that each of the four 3mm Red LEDs has a forward voltage of 1.8 volts. + +Finally, let’s assume that the light intensity of each LED is to be different. Therefore, different forward LED currents are require which will flow through each LED in the parallel circuit. Thus I 1 = 8mA, I 2 = 12mA, I 3 = 16mA and I 4 = 20mA as shown. + +### Parallel LED Circuit + +![parallel circuit](https://www.electronics-tutorials.ws/wp-content/uploads/2025/06/res99.gif?resize=453%2C198 "Parallel LED Circuit") + +The main disadvantage of a parallel circuit is that although the voltage across all the LED branches is exactly the same (6 Volts), the current is in proportion to the resistance of each individual LED resistor which collectively add up. Thus the current drawn from the 6 volts battery supply is the sum of: I T = I 1 + I 2 + I 3 + I 4 which can be large if many parallel branches are used. + +In our simple example above, the total current I T taken from the supply adds up to 56mA. Then we need to consider the amp-hour rating of the battery source when using parallel connected LEDs, otherwise it will become quickly discharged. However, depending on the application, we could also have a trade-off between a series and a parallel connected LED configuration. + +### Tutorial Summary + +We now know that a diode intentionally designed to generate light like a lamp is called a *Light Emitting Diode*, or LED and that using resistors with LEDs is essential if you want them to last for any length of time. + +LEDs are inherently current-controlled devices which have a current vs voltage, I-V curve, so the current flowing through them depends on the voltage applied across them. Generally, the greater the forward current, the higher is the light intensity. However, too much forward current and will damage them. + +As we have seen, choosing a resistor to work with an LED is a fairly simple process and a bit of maths without the need for an LED resistor calculator. So depending on the voltage source, whether it is a battery, microcontroller, Arduino, or Raspberry Pi, etc. You now have the knowledge to calculate what resistor to use with your LED school project. + +Just remember that every LED has a voltage dropped across it, known as its forward voltage, V F and will different for every LED typically between 1.8 volts and about 3.6 volts for an ultra bright LED no matter what its colour. + +So if you are building an LED project from a voltage power sources, select your current limiting **LED Resistor** accordingly to ensure stable and safe operation of your light emitting diode devices. \ No newline at end of file