Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Universal IR Remote Control

By Deepesh Verma

With technological advancements in consumer electronics, nowadays almost every appliance in our home is remote controlled.You can also build IR remote control for Home appliances. 
 
Managing a different Remote (average figure) for TV, AC, Fan, DVD, DTH, etc., is quite difficult. What if we could have only one remote capable of working as a dedicated remote for any appliance any  time?

Prototype of Arduino and TSOP1738 based Universal IR Remote Control Receiver

Fig. 1: Prototype of Arduino and TSOP1738 based Universal IR Remote Control Receiver

 
Presented here is such a device based on Arduino that can act as Remote control for any appliance when needed.For this project reader need the knowledge of how to start with arduino .

Overview of Arduino based Universal IR Remote Control

Fig. 2: Overview of Arduino based Universal IR Remote Control

The remote controls for electronic appliances use IR (Infra-Red) communication technique. A specific code is assigned to  each key of the remote , based on a standard protocol.

There are various protocols designed by manufacturers, such as NEC, Sony SIRC, Philips RC5, Philips RC6;  each carrying a different coding scheme.  For example, in NEC protocol based remote, 32-bit code is transmitted, whereas in SONY, 12-bit code is transmitted.
 
Basically, these codes are nothing but pulses with two levels viz. High and Low. The duration of each pulse is in milliseconds,  which is decided by the manufacturer.
 
The frequency at which the signal is modulated is standardized to 38 kHz. To prevent interference from IR sources such as sunlight or lights, the LED is not turned on steadily, but is turned on and off at a modulation frequency (typically 36 or 38KHz). Thus every receiver must be capable of receiving a 38 kHz signal effectively. A very simple and reliable device for IR signal reception is TSOP17XX, where XX denotes the frequency to which it responds. TSOP1738 is commonly used in IR receiver applications.
 

TSOP 1738

The TSOP is a miniaturized receiver for infrared remote control systems. PIN diode and preamplifier are assembled on lead frame, while the epoxy package is designed as IR filter. The demodulated output signal can be directly decoded by a microprocessor. TSOP is the standard IR remote control receiver series, supporting all major transmission codes. Its output is Active Low.

Pin Diagram of TSOP1738 IR Receiver

Fig. 3: Pin Diagram of TSOP1738 IR Receiver

How to Decode a Remote?

To know what signal is transmitted when a key on remote is pressed, we need to decode it. This can be done with the help of Oscilloscope. Although it seems quite difficult, finding an oscilloscope at home is not possible. Well, an affordable solution to this problem lies in Arduino Library. “IRremote” library provides a ready code to decode the IR remote and display it on the serial monitor.
 
In Arduino IDE 1.0.5 and later, this comes pre-loaded, whereas for older version you can get the library from Arduino’s official website.
 
‘IRrecvDemo’ is a program to decode the IR signals. Get an Arduino and make connections with TSOP1738 as shown below:

Circuit Diagram of Arduino based IR Remote Receiver

Fig. 4: Circuit Diagram of Arduino based IR Remote Receiver

Now upload the code ‘IRrecvDemo’ to the board.
 
After being done with uploading, open serial monitor window and point the remote you want to decode towards the TSOP sensor.
 
Press any key and a code (Hexadecimal) will appear on window. Note down the code for further reference.
 
If you do not know about the type of protocol of your remote, use the program ‘IRrecord’ in the Examples. Upload the program and repeat the above procedure. On the serial monitor, you’ll find Protocol type along with the HEX code.
 
Similarly, record the codes for all keys and remotes that you want to replicate into one. These HEX codes will be inserted in the program of universal remote.

Making Up the Universal Remote

In the remote we have made 6 keys viz., Channel UP; Channel DOWN; Volume UP; Volume DOWN; Power ON/OFF and MUTE.
 
These 6 keys are connected in a 2×3 Matrix, which is easy to interface with Arduino.
 
Also, to select which appliance is to be operated, (since appliances have different protocols) we provide Select buttons. The number of select buttons depends on the number of remotes to be replicated.
 
For the sake of simplicity we have taken 3 select buttons, 1 each for TV, DVD and DTH (You can choose any appliance depending on your requirement).
Thus the Remote control will have  a total of 9 Keys, (3 select and 6 operational keys)
 
The IR LED is connected between Digital pin 3 of Arduino and Ground through a 330E resistor.
 
Select Switches are connected to Digital pins 9, 10 and 11,  whereas the operational keys are interfaced in the form of a 2×3 matrix with digital pins 4,5,6,7 and 8.

Image showing different circuit sections of Arduino based Universal IR Remote Control Receiver

Fig. 5: Image showing different circuit sections of Arduino based Universal IR Remote Control Receiver

Operation

The operation of the remote is quite simple and straight forward. The select buttons help to decide, which appliance will be controlled by the remote. Say, if Switch1 is pressed, Applliance1 (here, T.V.) will be controlled. Now, on pressing operational keys, corresponding code will be transmitted.
 
After pressing operation, all work is done by the heart of the remote i.e. Arduino and finally IR LED plays like cherry on the cake.

Image showing Arduino based Universal IR Remote Receiver in action

Fig. 6: Image showing Arduino based Universal IR Remote Receiver in action

 

 

Project Source Code

###



#include <IRremote.h>    // Include IR remote Library
IRsend irsend;
#define select1        // Select Buttons
#define select2
#define select3
#define row1 4         // Operational Keypad Matrix (2x3)
#define row2 5
#define col1 6
#define col2 7
#define col3 8
void setup()
{
  pinMode(row1,OUTPUT);
  pinMode(row2,OUTPUT);
  pinMode(col1,INPUT);
  pinMode(col2,INPUT);
  pinMode(col3,INPUT);
  pinMode(select1,INPUT);
  pinMode(select2,INPUT);
  pinMode(select3,INPUT);
}
void loop()                                      
{
if(digitalRead(select1)==HIGH)                  // Remote 1 (TV)
{
    digitalWrite(row1,HIGH);
    digitalWrite(row2,LOW);
      if(digitalRead(col1)==HIGH)       // key1 pressed
       {
         irsend.sendNEC(0x1CE338C7,32);      //power
       }  
      else if(digitalRead(col2)==HIGH)   // key2 pressed
       {
         irsend.sendNEC(0x1CE3A857,32);      //mute
       }
       else if(digitalRead(col3)==HIGH)  // key3 pressed
       {
         irsend.sendNEC(0x1CE36897,32);      //Channel Up
       }
       else
       {
         digitalWrite(3,LOW);
       }
    delay(10);
    digitalWrite(row2,HIGH);
    digitalWrite(row1,LOW);
      if(digitalRead(col1)==HIGH)         // key4 pressed
       {
         irsend.sendNEC(0x1CE3E817,32);      //Channel Down
       }  
      else if(digitalRead(col2)==HIGH)    // key5 pressed
       {
         irsend.sendNEC(0x1CE330CF,32);      //Volume Up
       }
       else if(digitalRead(col3)==HIGH)   // key6 pressed
       {
        irsend.sendNEC(0x1CE3B04F,32);      //Volume Down
       }
       else
       {
         digitalWrite(3,LOW);
       }
    delay(10);
}
else if (digitalRead(select2)==HIGH)          // --> Remote 2 (DVD/DTH/etc)
{
 // Similar to 'if(){}' block above; copy your own remote codes;
}
else if (digitalRead(select2)==HIGH)          // --> Remote 3 (other appliances like AC)
{
  // Similar to 'if(){}' block above; copy your own remote codes;
}
else
{
  // if multiple select switches ON simultaneously --> NO operation
}
}

###

 


Circuit Diagrams

Circuit-Diagram-Arduino-Based-Universal-IR-Remote-Control-Receiver

Project Video


Filed Under: Electronic Projects
Tagged With: Arduino, ir remote, remote
 

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Band Pass Filte
  • Making a ducted soldering fan?
  • Slope compensation ramp calculation for UCC38084
  • Timer MC14541B wrong delay
  • Pull up via GPIO

RSS Electro-Tech-Online.com Discussions

  • Best way to reduce voltage in higher wattage system?
  • Need a ducted soldering fan for solder smoke extraction
  • Power failure relay options
  • DIY bluetooth speaker
  • Turn CD4029 on/off with TTP223
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering