June 27, 2018

Using IR LED and IR Phototransistor


IR LED and IR phototransistor can send and receive light in the infrared (IR) region. This light is not visible to the naked eye, but you might be able to see this light using the camera on your mobile phone.

A pair of IR LED and IR phototransistor can be used as a proximity sensor, or you could use an IR LED to make your own remote control.


STEP 1: Assemble this circuit.

STEP 2: Upload this program to Arduino.

The program displays the value of pin A0 on the Serial Monitor.

STEP 3: Observe how the value changes in the Serial Monitor.

  1. Open the Serial Monitor.
  2. Bring your hand closer to the transmitter (Tx) and receiver (Rx).
  3. Observe how the value changes.
  4. Replace your hand with other objects of different colour or surface.


TV-B-GONE is a type of universal IR remote control device for turning off a large majority of current brands to television sets. Created by Mitch Altman, TV-B-GONE lets people in public places to turn off nearby television sets.

Although it can take up to a minute for the device to find a proper code for a particular TV receiver, most popular TV brands turn off in the first few seconds.

STEP 1: Assemble this circuit (adapted from Ken Shirriff’s Blog).

STEP 2: Download the Arduino program here. Upload the program to Arduino.

STEP 3: Try out the IR remote you created. Press the Activator Switch, and the program will go through a list of IR codes to turn off the TV. The LED (pin 13) on the Arduino flashes for each code that is transmitted. Pressing the Activator Switch during transmission will restart the codes.

Leave a Reply

Your email address will not be published. Required fields are marked *