The easiest way to electronically create infrared light is by using a special light-emitting diode (LED) that operates in the infrared spectrum. Infrared LEDs (often called IR LEDs) are readily available at RadioShack or any other store that sells electronic parts.

IR LEDs are similar to regular LEDs, except that you can’t see the light they emit. The LED itself is usually a dark purple or blue color. Like other LEDs, the cathode lead is shorter than the anode lead.

As with any LED, you must use a resistor in series with an IR LED to prevent excess current from burning out the LED. To calculate the size of the resistor, you need to know three things:

  • The supply voltage: For example, 9 V.

  • The LED forward-voltage drop: For most infrared LEDs, the forward-voltage drop is 1.3 V.

  • The desired current through the LED: Usually, the current flowing through the IR LED should be kept under 50 mA. However, IR LEDs are typically rated for more current than regular LEDs. The ones I buy from RadioShack can handle up to 150 mA.

With these three facts in hand, you can calculate the correct resistor size by using Ohm’s law:

  1. Calculate the resistor voltage drop.

    To do that, subtract the voltage drop of the IR LED (typically 1.3 V) from the total supply voltage. For example, if the total supply voltage is 9 V and the LED drops 1.3 V, the voltage drop for the resistor is 7.7 V.

  2. Convert the desired current to amperes.

    In Ohm’s law, the current must be expressed in amperes. You can convert milliamperes to amperes by dividing the milliamperes by 1,000. Thus, if your desired current through the IR LED is 50 mA, you must use 0.05 A in your Ohm’s law calculation.

  3. Divide the resistor voltage drop by the current in amperes.

    This gives you the desired resistance in ohms. For example, if the resistor voltage drop is 7.6 V and the desired current is 50 mA, you need a 152 resistor.

  4. Choose a standard resistor size that’s close to the calculated resistance.

    A 150 resistor is close enough for a 9 V circuit. If you don’t have a 150 resistor, a 220 will do the job.

Once you’ve chosen the correct resistor size, just wire it in series with the IR LED.