Introduction: Home Built IR Remote Receiver or Demodulator Using Phototransistor and Arduino Due

About: A Researcher, an Engineer and an electronics enthusiast

My IR receiver module from Banggood bangged after first run - it just ceased working. The next new one will take weeks to arrive, but the show must go on.... so decided to find temporary solution, and it worked :).

I googled, and found that mostly it is mentioned that normal photo-transistor itself cannot be used as an IR receiver because it does not have inbuilt amplifier. There was a photo-transistor BPW 77NB and standard NPN amplifier transistor PN2222A in the components box, so decided to go with this trial experiment and it the first attempt. The range is obviously not very long (around 30-35 cm ) like standard TSOP IR receiver (few meters). But at least I could continue to work on the main project until new IR receiver arrives :)

Let us see how to make it work...

Step 1: Components and Circuit for IR Receiver and Arduino Due Pins


*Photo-transistor TFK-BPW 77NB

*Standard NPN amplifier transistor PN2222A

*Breadboard and Jumper wires

*Arduino Due dev board (you can use even other boards, just change pins if required)

*Resistors 2.2k and 4.7k (you can use any other suitable resistor in place of 2.2k for LEDs, in place of 4.7k resistor you can use a potentiometer so as to adjust range- probably - experts please correct me :) )

*Few LEDs of any color

Note that in circuit diagram i have shown LEDs connected to pin 5,6,7 only, but practically i have connected one more bi-color LED to pin 3 and 4. This was just as fun for my kid.

The phototransistor and NPN amplifier transistor forms a kind of darlington pair amplifier circuit. The red LED between collector and PN2222A works as indicator when IR codes are received by photo-transistor.

Step 2: Arduino Due Code

Final working code is available on my github page.... or attached arduino .ino file

Acknowledgements- IRremote2 library from

Circuit for phototransistor originally from

how to make infrared sensor in few steps!

Have fun..... the show must go on..............

Step 3:

Step 4:

Arduino All The Things! Contest

Participated in the
Arduino All The Things! Contest

Make It Glow! Contest

Participated in the
Make It Glow! Contest