How to Build a Remote Controlled LED Light Strip With Arduino for Under $15

Introduction

Building your own LED light strip that can be controlled remotely using an Arduino is a fun electronics project that can be completed on a budget. With just a few common components, you can make an LED strip that can change color, pattern, and brightness all from a homemade infrared remote.

Here's what you'll need to build your own remote controlled LED strip with Arduino:

Components

Total cost: Under $15

In the rest of this guide I'll walk through step-by-step how to assemble the circuit, program the Arduino code, and control your new LED strip remotely.

Assembling the Circuit

We'll first breadboard the circuit so it can be tested and programmed before soldering a more permanent version.

1. Connect the IR receiver

2. Connect the transistor

3. Connect LED strip

4. Power supply

The circuit should look something like this:

Installing the Arduino Libraries

We'll need to install the IR remote and LED strip libraries to interface with those components.

IR Remote Library

The IRremote library allows Arduino to decode IR signals from a remote.

To install it:

  1. Open the Arduino IDE.
  2. Go to Sketch > Include Library > Manage Libraries.
  3. Search for "IRremote" and install the latest version.

FastLED Library

FastLED provides easy control of addressable LED strips like the WS2812.

To install:

  1. Go to Sketch > Include Library > Manage Libraries.
  2. Search for "FastLED" and install.

Arduino Code

Here is the full Arduino code to control the LED strip with the IR remote. I'll go through it section by section:

```c++
// Libraries

include

include

// Pin definitions

define LED_PIN 3

define IR_RECEIVER 11

// LED strip

define NUM_LEDS 60

CRGB leds[NUM_LEDS];

// IR codes

define CODE_RED 0xFF30CF // Buttons on remote

define CODE_GREEN 0xFF18E7

define CODE_BLUE 0xFF7A85

define CODE_WHITE 0xFF10EF

define CODE_FLASH 0xFF38C7

define CODE_FADE 0xFF5AA5

define CODE_SMOOTH 0xFF42BD

// Config

define BRIGHTNESS 96

define FRAMES_PER_SECOND 60

// Global variables
uint8_t lastButtonState = HIGH;
int brightness = 0;

// Initialize
IRrecv irrecv(IR_RECEIVER);
decode_results results;

void setup() {

// Initialize serial
Serial.begin(9600);

// Initialize IR receiver
irrecv.enableIRIn();

// Initialize LEDs
FastLED.addLeds(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness(BRIGHTNESS);

// Set all LEDs to green
fill_solid(leds, NUM_LEDS, CRGB::Green);
FastLED.show();
}

// Main loop
void loop() {

// Check if IR code received
if (irrecv.decode(&results)) {

// Print code 
Serial.println(results.value, HEX);

switch(results.value) {

  case CODE_RED:  
    fill_solid(leds, NUM_LEDS, CRGB::Red); 
    break;

  case CODE_GREEN:
    fill_solid(leds, NUM_LEDS, CRGB::Green);
    break;

  case CODE_BLUE:
    fill_solid(leds, NUM_LEDS, CRGB::Blue);
    break;

  case CODE_WHITE:
    fill_solid(leds, NUM_LEDS, CRGB::White);  
    break;

  case CODE_FLASH:
    // Flash red
    if(brightness == 0) {
      fill_solid(leds, NUM_LEDS, CRGB::Black);
      brightness = 255; 
    } else {
      fill_solid(leds, NUM_LEDS, CRGB::Red);
      brightness = 0;  
    }
    break;

  case CODE_FADE:
    // Fade through rainbow
    static uint8_t hue = 0;
    fill_rainbow(leds, NUM_LEDS, hue, 1);
    hue++;
    if(hue >= 255) hue = 0;
    break;

  case CODE_SMOOTH: 
    // Smooth pulse
    uint8_t maxBright = peak8(brightness); 
    nscale8(brightness, maxBright, 255);
    FastLED.setBrightness(brightness);  
    fill_solid(leds, NUM_LEDS, CHSV(160, 255, brightness));
    FastLED.show();
    break;

}

// Send updates
FastLED.show();    
irrecv.resume();

}

// Rainbow fade effect
EVERY_N_MILLISECONDS(10) {
fadeToBlackBy(leds, NUM_LEDS, 1);
}
}
```

Libraries and Pins

We first include the IR and LED libraries and define pins:

```c++

include

include

define LED_PIN 3

define IR_RECEIVER 11

```

LED Strip Setup

Next we set up the LED strip with number of LEDs, pin, and brightness:

```c++

define NUM_LEDS 60

CRGB leds[NUM_LEDS];

define BRIGHTNESS 96

```

The FastLED functions like fill_solid() are used to set colors.

IR Codes

Here we define IR codes for each button on the remote:

```c++

define CODE_RED 0xFF30CF

define CODE_GREEN 0xFF18E7

define CODE_BLUE 0xFF7A85

// etc
```

Use a IR receiver tool like IRrecvDump to get the codes.

Setup Function

In setup() we initialize the serial monitor, IR receiver, and LEDs:

```c++
void setup() {

Serial.begin(9600);

irrecv.enableIRIn();

FastLED.addLeds(leds, NUM_LEDS);
FastLED.setBrightness(BRIGHTNESS);

fill_solid(leds, NUM_LEDS, CRGB::Green);
FastLED.show();
}
```

Main Loop

The main loop checks for new IR codes and sets the LED colors and effects based on the button pressed:

```c++
if (irrecv.decode(&results)) {

switch(results.value) {

case CODE_RED:
   // Set color red
   break;

case CODE_FLASH:
   // Flash LEDs
   break;

}

FastLED.show();
}
```

Additional rainbow and pulse effects are also added.

Assembling the Final Version

Once the code is tested and working on the breadboard, solder up a permanent circuit:

Make sure to connect the grounds of the LED power supply and Arduino.

Some tips for the final assembly:

Applications and Improvements

With an Arduino controlled LED strip, here are some cool applications:

Some ways to improve this project:

So with just a few common components, you can DIY an awesome remote controlled LED strip for under $15!