Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home IoT & Smart Home

Smart AC Control with IR Blaster and ESP32: DIY AC Remote

Smart AC Control with IR Blaster and ESP32: DIY AC Remote

March 11, 2026 /Posted byJayesh Jain / 0

If you’ve ever wanted to control your air conditioner from your phone or automate it with schedules, building a smart AC IR blaster ESP32 control system is one of the most satisfying weekend projects you can do. Using an ESP32 microcontroller paired with an IR LED transmitter, you can replicate any air conditioner remote’s signals and control your AC over Wi-Fi, through a dashboard, or even with voice commands. In this guide, we’ll walk through everything — from understanding IR protocols to wiring up your circuit and programming the ESP32 — so that even a beginner can have a working smart AC remote by the end.

Table of Contents

  1. What Is an IR Blaster and How Does It Work?
  2. Components You’ll Need
  3. Wiring the Circuit
  4. Capturing IR Codes from Your AC Remote
  5. Programming the ESP32
  6. Integrating with Home Automation
  7. Frequently Asked Questions

What Is an IR Blaster and How Does It Work?

An IR (Infrared) blaster is a device that emits infrared light pulses — the same kind your standard TV or AC remote uses. When you press a button on your AC remote, it sends a coded pattern of IR pulses to the AC unit’s IR receiver. The receiver decodes this pattern and executes the corresponding command (e.g., set temperature to 24°C, fan speed medium, cooling mode).

By capturing these pulse patterns and replaying them with an IR LED connected to an ESP32, we can software-emulate any remote control. The ESP32 is ideal for this because it has built-in Wi-Fi, enough processing power to decode complex IR protocols, and excellent Arduino/MicroPython support. Popular libraries like IRremoteESP8266 already know the IR protocols used by hundreds of AC brands including Daikin, Hitachi, LG, Voltas, Blue Star, Lloyd, and Samsung — very common brands in India.

The key advantage over commercial smart home plugs is cost and flexibility. A DIY IR blaster using ESP32 costs under ₹300 in components, integrates with any platform you choose, and you have full control over the code.

Components You’ll Need

Before we start, gather the following components. All of these are available at Zbotic.in with fast delivery across India:

  • ESP32 Development Board — The main brain of the project
  • IR LED (940nm) — Transmits the infrared signal
  • IR Receiver (TSOP1738 or similar) — For capturing codes from the original remote
  • 2N2222 or BC547 NPN Transistor — Boosts the IR LED current for longer range
  • 47Ω and 10kΩ resistors
  • DHT11 or DHT22 sensor (optional) — For temperature-triggered automation
  • Breadboard and jumper wires
  • USB cable and 5V power supply
Ai Thinker NodeMCU-32S-ESP32 Development Board

Ai Thinker NodeMCU-32S ESP32 Development Board – IPEX Version

A reliable ESP32 dev board with external antenna support for strong Wi-Fi range — perfect for smart home projects like this IR blaster.

View on Zbotic

DHT11 Digital Relative Humidity and Temperature Sensor Module

DHT11 Digital Relative Humidity and Temperature Sensor Module

Add temperature-based automation to your smart AC — automatically turn on the AC when room temperature exceeds your set threshold.

View on Zbotic

Wiring the Circuit

The circuit has two parts: the IR receiver section for capturing codes, and the IR transmitter section for sending them.

IR Receiver Wiring (for code capture phase)

Connect the TSOP1738 IR receiver as follows:

  • VCC → 3.3V on ESP32
  • GND → GND on ESP32
  • OUT → GPIO 15 on ESP32 (or any digital input pin)

IR LED Transmitter Wiring

A single IR LED driven directly from GPIO may not be powerful enough to reach your AC unit from across the room. Using a transistor amplifier stage is recommended:

  • GPIO 4 (ESP32) → 10kΩ resistor → Base of NPN transistor (2N2222/BC547)
  • Collector → 47Ω resistor → Anode of IR LED → 5V
  • Cathode of IR LED → Collector (the resistor connects between 5V and anode, LED cathode to collector)
  • Emitter → GND

This setup allows the IR LED to draw up to 100mA in pulses, giving you a range of 8–10 metres — sufficient for most rooms. For even better range, you can use 2–3 IR LEDs in parallel, each with its own 47Ω resistor.

Capturing IR Codes from Your AC Remote

The first step is to capture the IR codes from your existing AC remote. We’ll use the IRremoteESP8266 library, which works perfectly with ESP32.

Install the Library

In Arduino IDE, go to Sketch → Include Library → Manage Libraries. Search for IRremoteESP8266 by David Conran and install it. This library supports over 90 AC brands and makes code capture trivial.

Capture Sketch

#include <Arduino.h>
#include <IRrecv.h>
#include <IRutils.h>

const uint16_t kRecvPin = 15;
IRrecv irrecv(kRecvPin);
decode_results results;

void setup() {
  Serial.begin(115200);
  irrecv.enableIRIn();
  Serial.println("IR Receiver Ready — Point remote and press button");
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(resultToHumanReadableBasic(&results));
    Serial.println(resultToSourceCode(&results));
    irrecv.resume();
  }
}

Upload this sketch, open Serial Monitor at 115200 baud, and point your AC remote at the IR receiver. Press each button (Power On, Power Off, Set Temp 24, etc.) and copy the decoded output. The library will tell you which protocol your AC uses (e.g., DAIKIN, LG_AC, SAMSUNG_AC).

Save the raw or decoded codes for each function you want to replicate. For split ACs popular in India — Voltas, Lloyd, Daikin, Hitachi, LG Dual Inverter — the library has dedicated support with structured command sets.

Programming the ESP32 as a Smart IR Blaster

Now that you have the IR codes, let’s build the full smart AC controller. The ESP32 will host a simple web server accessible on your local Wi-Fi network.

#include <Arduino.h>
#include <WiFi.h>
#include <WebServer.h>
#include <IRsend.h>
#include <ir_Daikin.h>  // Change to your brand

const char* ssid     = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";

const uint16_t kIrLedPin = 4;
IRDaikinESP ac(kIrLedPin);
WebServer server(80);

void handleRoot() {
  String html = "<h2>Smart AC Control</h2>";
  html += "<a href='/on'><button>Turn ON</button></a> ";
  html += "<a href='/off'><button>Turn OFF</button></a> ";
  html += "<a href='/cool24'><button>Cool 24°C</button></a>";
  server.send(200, "text/html", html);
}

void handleOn() {
  ac.begin();
  ac.setPower(true);
  ac.setMode(kDaikinCool);
  ac.setTemp(24);
  ac.setFan(kDaikinFanAuto);
  ac.send();
  server.send(200, "text/plain", "AC turned ON");
}

void handleOff() {
  ac.begin();
  ac.setPower(false);
  ac.send();
  server.send(200, "text/plain", "AC turned OFF");
}

void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); }
  Serial.println("nConnected: " + WiFi.localIP().toString());
  ac.begin();
  server.on("/", handleRoot);
  server.on("/on", handleOn);
  server.on("/off", handleOff);
  server.begin();
}

void loop() {
  server.handleClient();
}

After uploading, the Serial Monitor will show the ESP32’s IP address. Open that IP in your phone’s browser (on the same Wi-Fi) and you’ll see buttons to control your AC. You can bookmark this page for quick access, or use it as the API backend for home automation.

2 x 18650 Lithium Battery Shield

2 x 18650 Lithium Battery Shield for Arduino/ESP32/ESP8266

Make your IR blaster portable with this battery shield — run your ESP32 IR controller wirelessly without needing a USB power source.

View on Zbotic

Integrating with Home Automation Platforms

Once your basic IR blaster works, you can take it further by integrating with popular home automation platforms:

Home Assistant

Flash ESPHome firmware on your ESP32. ESPHome has a built-in climate platform with IR support. Define your AC brand in YAML, and it appears as a fully featured climate entity in Home Assistant with a beautiful thermostat card. You can then create automations like “Turn on AC at 2PM on weekdays if temperature is above 32°C.”

Google Home / Alexa

Connect Home Assistant to Google Home or Alexa. Once your AC is a Home Assistant climate entity, it shows up in Google Home as a thermostat. You can say “OK Google, set AC to 22 degrees” — and it works!

MQTT + Node-RED

For a more custom setup, publish IR commands over MQTT from a Node-RED dashboard. The ESP32 subscribes to an MQTT topic and sends the IR signal whenever a message arrives. This approach is great for integrating with other sensors — for example, automatically turning off the AC when a window sensor detects an open window.

Scheduling with RTC

Add a DS3231 RTC module to your ESP32 to enable time-based schedules even without internet. Program it to turn on the AC at 10PM every night and off at 7AM — perfect for maintaining a comfortable sleeping temperature through Indian summers.

30Pin ESP32 Expansion Board

30Pin ESP32 Expansion Board with Type-C USB and Micro USB Dual Interface

This expansion board makes it easy to connect multiple sensors and modules to your ESP32 without a breadboard — ideal for a permanent smart AC installation.

View on Zbotic

Ai Thinker ESP32-C3-01M Wi-Fi + BLE Module

Ai Thinker ESP32-C3-01M Wi-Fi + BLE Module

A compact and cost-effective ESP32-C3 module that fits into a small enclosure, perfect for a wall-mounted IR blaster that stays discreet.

View on Zbotic

Frequently Asked Questions

Will this work with any AC brand available in India?

Yes, the IRremoteESP8266 library supports over 90 AC brands including Voltas, LG, Daikin, Hitachi, Blue Star, Lloyd, Samsung, Carrier, and Panasonic — which cover the vast majority of ACs sold in India. For any brand not supported, you can use raw IR code capture and replay.

What is the maximum range of the IR blaster?

With a single IR LED and transistor driver, you can expect 5–8 metres of reliable range. Using 2–3 IR LEDs in parallel can extend this to 10–12 metres. Ensure the IR LED is pointed toward the AC unit’s IR sensor, usually located at the front panel.

Can I control multiple AC units with one ESP32?

Yes. You can connect multiple IR LEDs pointing in different directions (each through its own transistor), and assign separate HTTP endpoints or MQTT topics for each. The IRremoteESP8266 library supports multiple IR send objects on different GPIO pins simultaneously.

Does this work when the internet is down?

Yes, as long as your local Wi-Fi router is working. The ESP32 hosts a local web server, so internet connectivity is not required. However, voice assistant integrations (Google Home, Alexa) do need internet.

How do I make the IR blaster permanent and reliable?

Solder the final circuit on a perfboard, put it in a 3D-printed or small plastic enclosure, and power it from a USB charger. Add a watchdog timer in code (esp_task_wdt) and enable the ESP32’s hardware watchdog so it auto-restarts if the firmware hangs.

Ready to Build Your Smart AC Controller?

Get all the components you need for this project — ESP32 boards, sensors, battery shields, and more — from Zbotic.in. We stock genuine components with fast shipping across India.

Shop IoT & Smart Home Components

Tags: DIY Smart Home, ESP32, home automation, IR blaster, Smart AC
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
LoRaWAN with ESP32 and TTN: Lo...
blog lorawan with esp32 and ttn low power wide area iot 595405
blog esp32 dual core programming split tasks across both cores 595410
ESP32 Dual Core Programming: S...

Related posts

Svg%3E
Read more

IoT Home Insurance Sensor Kit: Leak, Smoke, and Motion

April 1, 2026 0
Table of Contents IoT and Home Insurance Water Leak Detection Smoke and Fire Detection Motion and Intrusion Sensing Building the... Continue reading
Svg%3E
Read more

IoT Pet Tracker: GPS Collar with Geofencing Alerts

April 1, 2026 0
Table of Contents Introduction and Overview Hardware Components Required GPS Module Integration with ESP32 Cloud Platform Setup Real-Time Tracking Dashboard... Continue reading
Svg%3E
Read more

IoT Aquaponics Controller: Fish and Plant Automation

April 1, 2026 0
Table of Contents The Water Monitoring Challenge in India Sensor Technologies for Water Building the Sensor Node Data Transmission and... Continue reading
Svg%3E
Read more

IoT Composting Monitor: Temperature and Moisture Tracking

April 1, 2026 0
Table of Contents Why Temperature Monitoring Matters Sensor Selection Guide Hardware Assembly and Wiring Firmware Development Cloud Data Logging Alert... Continue reading
Svg%3E
Read more

IoT Beehive Monitor: Weight, Temperature, and Humidity

April 1, 2026 0
Table of Contents Why Monitor Beehives Weight Measurement System Temperature and Humidity Sensing Building the Monitor Data Analysis for Bee... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now