How to make remote control light fan at home. Remote control system.

IR Remote control system. Many of you want to create a remote control system. But do not know how to make the remote control system yourself. Today I will teach you how to create a remote control project. Remote control system i.e. loading on and off with the help of remote. This project can be created in different ways. Today I will teach you how to create this remote control system by coding Arduino. But you can do this project by coding Arduino with any remote. It could be your home TV remote or AC remote or any other new remote. I will teach you how to do this technology with practicality and coding. Let’s first find out what components we need to do the project.

  1. Arduino Uno R3 Board.
  2. IR Receiver Sensor.
  3. Bread board.
  4. 4 Relay Module.
  5. 100 Ohm Resistance.
  6. Any Remote.
  7. Bulb Holder.
  8. AC Bulb.
  9. Sling Fan.
  10. Connecting wire.
  11. 5v Power supply.

With these components you can test or create this project. Now take a look at the pin diagram of the IR receiver sensor.

IR Remote
IR Remote

This IR Receiver sensor will basically give an output by receiving the signal sent from the remote transmitter. Notice the Pin Diagram below to use it with Arduino.

 

IR Remote
IR Remote

Now you have to do some test after uploading that coding to Arduino by coding Arduino. The remote you will use in this project will generate a code to press each button on that remote .First you need to download a library file and add Arduino ID software.

Now the coding that I am showing you below will upload this coding to Arduino UNO Board.

CODE:

 #include <IRremote.h>  
 int RECV_PIN = A0;  
 IRrecv irrecv(RECV_PIN);  
 decode_results results;  
 void setup()  
 {  
  Serial.begin(9600);  
  irrecv.enableIRIn(); // Start the receiver  
 }  
 void loop() {  
  if (irrecv.decode(&results)) {  
   Serial.println(results.value, HEX);  
   irrecv.resume(); // Receive the next value  
  }  
 }   

 

Connect the IR receiver sensor with the Arduino board as shown above and upload this code. Now you have to give power to the Arduino board. Then press the buttons of the remote that you will use in this project in front of the IR receiver sensor. Then you will get a code for pressing every button on the serial monitor of Arduino ID software. Notice in the figure below.

remote control
remote control

In this way, for pressing every button on the remote, you will get such a code in the serial monitor of Arduino ID software. Now you have to remember which code comes up when you press any button. Now you need to move on to the original coding. In this project I have shown three loading on and off coding. You can enlarge the coding and load a lot of on and off. By pressing each button on the remote you get the codes separately. These codes have to be given inside the original coding. Notice the image below.

remote control
remote control

Here you can see the ones marked in red. These are the codes for pressing each button. And to use each of these codes in the original coding, you have to put 0XFF in front of this code. Now let me show you the Pin Diagram or connection diagram of this project.

IR Remote
IR Remote

Here I have shown three loads on and off with the help of remote. Because two bulbs in a room have a fan.

CODE:

 #include <IRremote.h>  
 int RECV_PIN = A0; //   
 int output1 = 8;  
 int output2 = 9;  
 int output3 = 10;  
 int itsONled[] = {0,0,0,0};  
 #define code1 0xFF38863BE0  
 #define code2 0xFF38863BD0  
 #define code3 0xFF38863BF0  
 IRrecv irrecv(RECV_PIN);  
 decode_results results;  
 void setup()  
 {  
  Serial.begin(9600);  //   
  irrecv.enableIRIn(); //   
  pinMode(output1, OUTPUT);  
  pinMode(output2, OUTPUT);  
  pinMode(output3, OUTPUT);  
  pinMode(A0, INPUT);  
  digitalWrite(output1, HIGH);  
  digitalWrite(output2, HIGH);  
  digitalWrite(output3, HIGH);  
 }  
 void loop() {  
  if (irrecv.decode(&results)) {  
   unsigned int value = results.value;  
   switch(value) {  
    case code1:  
     if(itsONled[1] == 1) {       
       digitalWrite(output1, LOW);    
       itsONled[1] = 0;        
     } else {             
       digitalWrite(output1, HIGH);   
       itsONled[1] = 1;        
     }  
      break;   
    case code2:  
     if(itsONled[2] == 1) {  
       digitalWrite(output2, LOW);  
       itsONled[2] = 0;  
     } else {  
       digitalWrite(output2, HIGH);  
       itsONled[2] = 1;  
     }  
      break;  
    case code3:  
     if(itsONled[3] == 1) {  
       digitalWrite(output3, LOW);  
       itsONled[3] = 0;  
     } else {  
       digitalWrite(output3, HIGH);  
       itsONled[3] = 1;  
     }  
      break;       
   }  
   Serial.println(value); // you can comment this line  
   irrecv.resume(); // Receive the next value  
  }  
 }   

 

Now make the connection according to the connection diagram I have shown you above. After that, if you upload the coding, this project will be created for you. But inside the coding you must change. Because you have to do the coding according to the code of the remote you will use.

 

 

 

100% LikesVS
0% Dislikes

1 thought on “How to make remote control light fan at home. Remote control system.”

Leave a Comment