This project for Arduino LED Dimmer Circuit using IR Remote make simple LED look like smart light.
LED listens to IR remote.
IR receiver reads remote signal.
Arduino change LED brightness using PWM.
With Arduino and few parts, we can change brightness sitting on sofa.
It feel like small home-automation system.
This project is good for beginners.
It mixes small coding, simple electronics and fun remote tricks.
Arduino Coding:
#include <IRremote.h>
int RECV_PIN = 2;
int led = 9;
int brightness = 0;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup() {
pinMode(led, OUTPUT);
irrecv.enableIRIn();
}
void loop() {
if (irrecv.decode(&results)) {
long value = results.value;
if (value == 0xFFA857) {
brightness = brightness + 20;
if (brightness > 255) brightness = 255;
}
if (value == 0xFFE01F) {
brightness = brightness - 20;
if (brightness < 0) brightness = 0;
}
analogWrite(led, brightness);
irrecv.resume();
}
}Coding Explanation:
- IRremote library reads IR signals.
- Pin 2 is input from IR receiver.
- Pin 9 gives PWM to LED.
- Brightness variable stores LED level.
- Two IR codes are used.
- One code increases brightness.
- One code decreases brightness.
- Arduino writes PWM to LED using analogWrite.
- PWM value changes LED brightness.
Circuit Working:

Parts List:
| Part Name | Specification | Quantity |
|---|---|---|
| Resistor | 220Ω 1/4 watt | 1 |
| Semiconductors | Arduino UNO board | 1 |
| White LED | 1 | |
| TSOP4838 IR Receiver | 1 |
In the above diagram IR receiver takes remote signal.
Then the signal goes to Arduino digital pin.
Arduino then decodes it.
When the user presses a button the Arduino increases or decreases LED brightness.
LED brightness changes using PWM output pin.
And then LED becomes bright or dim slowly.
Formula with Calculation:
Below is the LED resistor value formula
R = (Vsource – Vled) / Iled
here,
- Vsource is 5V
- Vled is 2V
- Iled is 0.015A
R = (5 – 2) / 0.015 = 200 ohms approx
We have used 220 ohm resistor for safety.
How to Build:
To build a Arduino LED Dimmer Circuit using IR Remote follow the below steps:
- Take all the parts as shown in circuit diagram.
- IR receiver VCC pin goes to Arduino 5V.
- IR receiver GND pin goes to Arduino GND.
- IR receiver OUT pin goes to Arduino digital pin 2.
- LED anode (+) goes to Arduino pin 9 through a R1 resistor.
- LED cathode (-) goes to Arduino GND.
Conclusion:
This is a simple Arduino LED Dimmer Circuit using IR Remote.
IR remote makes LED control wireless.
Circuit is easy and Code is also easy.
We can use same idea for lamps, strips or other small loads.
Leave a Reply