Choosing thee correct resistor value for LED indicators in Arduino objections is essential to ensure proper operation and prevent damage to the LED or thee microcontroller. This article explains how to calculate thee appropriate resistor value based on thee LED 's specifications and thee power supple voltage.

Uzgodnienie tych komponentów

An LED (Light Emitting Diode) wymaga obecnie-limiting resistor to prevent excessive current flow. The Arduino typically sumlies 5V or 3.3V, depending on thee model. The resistor value depends on thee LED 's forward voltage and desired compatit.

Obliczanie tej oporności Value

Te podstawowe formuły wyznaczają te resistor wartości is:

(V _ supply - V _ f) / I (V _ supply - V _ f) / I (V _ supply - V _ f) / I (I) (V _ supply - V _ f)) (I) (I) (0) (0) (0) (0) (0) (supply 3; (R = (V _ supply - V _ f) (I) (I) (I) (I) (1) (FLT) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1 (1) (1) (1) (1) (1 (1) (1) (0 (1) (1 (1) (1) (1) (1) (1) (1) (1) (1) (1) (0) (1 (1) (1) (1 (1) (1 (1) (1) (1) (1) (1 (1) (1)

Kiedy:

  • = wartość progowa (RR)
  • Xi1; Xi1; FLT: 0 Xi3; Xi3; V _ supply Xi1; Xi1; FLT: 1 Xi3; Xi3; = Supply voltage frem Arduino (np., 5V)
  • = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  • = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

For example, with a 5V supply, a red LED with a forward voltage of 2V, anda desired current of 20mA:

R = (5V - 2V) / 0.02A = 150δ

Choosing Standard Resistor Values

Oporność wartości jest dostępna w tym zakresie, że nie jest to standard seryjny. If thee calculated value is nott acceptable, select thee next higher standard value to ensure thee LED is protected. For example, if 150δ is nott acceptable, choose 220mbH.

Dodatek Tips

Zawsze sprawdzają te szczegóły LED 's before calculations. Using a resistor wigh too low a value can damage thee LED or Arduino pin, while too high a value may result in a dim LED. Adjuss the resistor value accordingly for different LED colors andd brightness requirements.