Introduction: IR Remote and Receiver With Arduino Uno

About: Welcome to School Sur Seine !! Here, I offer step-by-step tutorials using the Arduino UNO, ESP32 and Raspberry pi pico wh. I also create small projects that combine multiple modules, sensors, motors, and vario…

In this project, we will use an Arduino and an infrared (IR) receiver to decode the signals sent by a remote control.

Every button on an IR remote sends a unique binary code in the form of infrared pulses.

With the help of the IRremote library, the Arduino can read these pulses, convert them into hexadecimal values, and display them in the Serial Monitor.

The objective of this project is to identify and decode the value of each button on the remote control.

For example, we will determine which hexadecimal code corresponds to the "1" button, the "2" button, and so on. Once the codes are known, they can be used to control LEDs, motors, relays, or any other device using the remote.

This simple experiment helps beginners understand how IR communication works and how to detect and use remote control signals in their own Arduino projects.

-------------------------------------------------------------------------------------------

Dans ce projet, nous allons utiliser une carte Arduino et un récepteur infrarouge (IR) pour décoder les signaux envoyés par une télécommande.

Chaque bouton d’une télécommande émet un code unique sous forme d’impulsions infrarouges. Grâce à la bibliothèque IRremote, l’Arduino peut lire ces impulsions, les convertir en valeurs hexadécimales et les afficher dans le Moniteur Série.

L’objectif de ce projet est de déterminer et décoder la valeur de chaque bouton de la télécommande.

Par exemple, nous allons identifier quel code correspond au bouton “1”, quel code correspond au bouton “2”, etc. Une fois ces codes connus, ils pourront être utilisés pour contrôler des LEDs, moteurs, relais ou tout autre composant à l’aide de la télécommande.

Cette expérience simple permet aux débutants de comprendre le fonctionnement de la communication infrarouge et la manière de détecter et d’utiliser les signaux d’une télécommande dans leurs propres projets Arduino.

Supplies

-----------------------------------------------------------------------

  1. Arduino UNO development board
  2. USB 2.0 cable type A/B
  3. IR Remote and Receiver (Kit HX1838)
  4. Câbles

-----------------------------------------------------------------------

  1. Carte de développement Arduino UNO
  2. Câble USB 2.0 type A/B
  3. Télécommande et Récepteur Infrarouge (Kit HX1838)
  4. Câbles

----------------------------------------------------------------------

Step 1: Circuit Diagram / Schéma

The circuit diagram is made using : thttps://www.wokwi.com/

------------------------------------------------------------------------------------------

Le schéma est réalisé via : thttps://www.wokwi.com/

Step 2: Libraries / Bibliothèques

1- Open Arduino IDE, then go to Library Manager , search for "IRremote" and install the "IRremote" package by Shirriff, z3t0, ArminJo.

2- Once the installation is complete, add and select the Arduino Uno board you are using from the Tools > Boards menu.

3- Go to Tools > Port, and select the port corresponding to your board.

-------------------------------------------------------------------------------------------

1- Ouvrez l’Arduino IDE, puis allez dans Library Manager . Recherchez "IRremote" et installez le paquet "IRremote" de Shirriff, z3t0, ArminJo.

2- Une fois l’installation terminée, ajoutez et sélectionnez la carte Arduino Uno que vous utilisez dans le menu Tools > Boards.

3- Allez dans Tools > Port, puis choisissez le port correspondant à ta carte.

Step 3: Source Code / Code Source

You can find the full source code below, and you also have the option to simulate your program directly here. This allows you to test and understand how it works before running it on your actual Arduino Uno.

https://wokwi.com/projects/449146121436539905

-------------------------------------------------------------------------------------------

Vous trouverez le code source complet ci-dessous, et vous avez également la possibilité de simuler votre programme directement ici. Cela vous permet de tester et de comprendre son fonctionnement avant de l’exécuter sur votre Arduino Uno réel.

https://wokwi.com/projects/449146121436539905

Step 4: Serial Monitor / Moniteur Série

In this step, it is important to mention that the IR codes obtained on Wokwi do not always match those of the real remote.

The reason is that the remote used in the simulation is not the same as the one used in real life, which explains the differences in coding.

To read the actual codes sent by your real remote, you need to:

  1. Open Arduino IDE
  2. Go to Tools > Serial Monitor
  3. Select a baud rate of 9600
  4. Press the buttons 0 to 9 on your real remote

The codes will appear in the Serial Monitor.

I also included a picture showing the IR codes obtained and their correspondence with the remote’s digits.

-------------------------------------------------------------------------------------------

Dans cette étape, il est important de préciser que les codes IR obtenus sur Wokwi ne correspondent pas toujours à ceux de la télécommande réelle.

En effet, les télécommandes utilisées dans la simulation et celles utilisées dans la vraie vie ne sont pas les mêmes, ce qui explique les différences de codage.

Pour lire les vrais codes envoyés par votre télécommande, il faut :

  1. Ouvrir Arduino IDE
  2. Aller dans Tools > Serial Monitor
  3. Choisir la vitesse 9600 baud
  4. Appuyer sur les boutons 0 à 9 de votre télécommande réelle

Les codes apparaîtront dans le Serial Monitor.

J’ai également ajouté une photo montrant les codes IR obtenus ainsi que leur correspondance avec les chiffres de la télécommande.