@arduino workshop

Page 61

To calculate the required current-limiting resistor for an LED, use this formula: R = (Vs − Vf ) ÷ I where Vs is the supply voltage (Arduino outputs 5 V); Vf is the LED forward voltage drop (say, 1.7 V), and I is the current required for the LED (10 mA). (The value of I must be in amps, so 10 mA converts to 0.01 A.) Now let’s use this for our LEDs—with a value of 5 V for Vs , 1.7 V for Vf  , and 0.01 A for I. Substituting these values into the formula gives a value for R of 330 W. However, the LEDs will happily light up when fed current less than 10 mA. It’s good practice to use lower currents when possible to protect sensitive electronics, so we’ll use 560 W, 1/4-watt resistors with our LEDs, which allow around 6 mA of current to flow. NOTE

When in doubt, always choose a slightly higher value resistor, because it’s better to have a dim LED than a dead one!

The Ohm’s Law Tri a ngle Ohm’s Law states that the relationship between current, resistance, and voltage is as follows: voltage (V) = current (I) × resistance (R) If you know two of the quantities, then you can calculate the third. A popular way to remember Ohm’s Law is with a triangle, as shown in Figure 3-9.

V I

R

V=I×R I=V÷R R=V÷I

Figure 3-9: The Ohm’s Law triangle

The Ohm’s Law triangle diagram is a convenient tool for calculating voltage, current, or resistance when two of the three values are known. For example, if you need to calculate resistance, put your finger over R, which leaves you with voltage divided by current; to calculate voltage, cover V, which leaves you with current times resistance.

40 Chapter 3


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.