Arduino + infrared receiver TSOP

It has long been going here and found time for this post. Today I want to share my experience connecting infrared receiver TSOP 31236 to Arduino Uno. As a transmitter, I used an infrared (IR) remote that first got my hands (in general can take any IR remote). The receiver and the remote are shown in Fig. 1.

Figure 1 – IR remote and receiver TSOP 31236

Getting started with Arduino IR receiver

To work well with Arduino IR remote control and receiver, we need a library IRremote.
Control carried out by sending an IR remote commands IR receiver. Each button remote has a hex code. So when you press certain buttons, the receiver sent a code that corresponds to the button. Our first task is to find out which code which corresponds button. Then we can write a sketch for Arduino, programming a specific remote button for a specific action.

To do this, connect the receiver to our Aduino (first output –> earth, the second output –> Power Arduino 3.3 V, the third –> digital contact 11 Arduino)

Figure 2 – Connecting TSOP to Arduino

Fill in Arduino sketch buttons to display the codes.

Now let Codes button to be able to use these codes for further specific programming button to perform a certain action Arduino. Just open the Serial Monitor , instructs the remote toward the receiver, press the buttons and codes to remember.
In my case the button R-red, G-green and blue with B-codes according FF906F, FF10EF and FF50AF, after pressing the red button green, then blue, I saw it in Serial Monitor:


Now we can program the Arduino. For example, implement controls colored LEDs. By pressing the red button should turn on / off red LED, green – green and blue – blue.

LEDs are found at home – so are used 😉


The result is:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.