Site icon Circuit Ideas for You

Arduino LED Dimmer Circuit using IR Remote

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:

Circuit Working:

Arduino LED Dimmer Circuit  Diagram using IR Remote

Parts List:

Part NameSpecificationQuantity
Resistor220Ω 1/4 watt1
SemiconductorsArduino UNO board1
White LED1
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,

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:

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.

References:

Arduino LED dimmer with IR remote control

Datasheet TSOP4838 IC

Exit mobile version