DIY IR Remote Control Switch

 


Project 7: DIY IR Remote Control Switch


Objective:

To build a DIY Infrared (IR) remote control switch that can turn ON/OFF an LED (or appliance) using a TV/DVD remote.


Components Required:

  1. IR Receiver Module (TSOP1738)
  2. Arduino Uno (or ATtiny85 for a compact design)
  3. NPN Transistor (BC547)
  4. Resistors – 220Ω, 1KΩ, 10KΩ
  5. Relay Module (5V)
  6. LED (or appliance)
  7. Power Supply (9V Battery / 5V Adapter)
  8. Breadboard & Wires
  9. Any IR Remote (TV, DVD, etc.)

Circuit Diagram:

(A schematic can be designed in Fritzing or Tinkercad.)


Step-by-Step Instructions:

Step 1: Connect the IR Receiver Module

  • TSOP1738 has 3 pins:
    • VCC → 5V
    • GND → GND
    • OUT → Arduino Digital Pin (D2)

Step 2: Decode the Remote Signals

  • Upload an IR decoding sketch to Arduino using the IRremote library.
  • Open the Serial Monitor and press buttons on the remote.
  • Note down the unique HEX codes of the buttons.

Step 3: Control the LED/Relay

  • Program Arduino to toggle the LED/Relay when a specific IR code is received.

Step 4: Power the Circuit

  • Use a 9V battery or 5V adapter for stable operation.

Code for Arduino:

cpp
#include <IRremote.h> int RECV_PIN = 2; int LED = 7; IRrecv irrecv(RECV_PIN); decode_results results; void setup() { Serial.begin(9600); irrecv.enableIRIn(); pinMode(LED, OUTPUT); } void loop() { if (irrecv.decode(&results)) { Serial.println(results.value, HEX); if (results.value == 0xFFA25D) { // Replace with your remote's button code digitalWrite(LED, !digitalRead(LED)); // Toggle LED } irrecv.resume(); } }

How It Works:

  1. The IR receiver detects remote signals.
  2. Arduino decodes the signal and checks the button code.
  3. If the button matches, it toggles the LED/Relay ON or OFF.
  4. The appliance/light operates like a remote-controlled switch.

Customization Ideas:

💡 Control multiple appliances using different remote buttons.
💡 Use ATtiny85 for a compact and low-power version.
💡 Add a display to show which device is ON/OFF.


Speaker

Comments

Popular Posts

DIY electric fireplace decor

F450 Drone Kit DIY Quadcopter Flying Multicopter Heli Flame Wheel Kit in Pakistan

Mini Wind Turbine with PVC Pipes

Touch Sensor

DIY Mini iPhone 17 Pro Max with Paper and Cardboard

PVC Pipe Mini Lathe Machine

Basic Watch Repair Tools: