Countertop Lighting Arduino Control

Countertop Lighting Arduino Control © LGPL

Countertop lighting? No problem!

  • 1,540 views
  • 0 comments
  • 3 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
Fairchild semiconductor fqu13n06ltu image 75px
Power MOSFET N-Channel
One that can handle the amperage of the led strip used.
×1
IR receiver (generic)
×1

Necessary tools and machines

Dremel

About this project

This project is a continuation of another project I have finished, the Solar Powered Cellar LED lighting project. In saying that, basically the circuitry is similar, the LED lighting is the same product. Although in this project, I have implemented an IR remote control sensor to turn the lights on and off, as well as dimming/brightness control.

In this project, I will show you how I ran/mounted my LED strips, connected my wiring, and how I coded the Arduino Uno for IR control.

Step 1

Mount your LEDs! I mounted mine an inch inside the outside trim. Doing this this way ensures the LED strip is not easily pulled off. But if you want you could mount them underneath the ledge.

Also doing this I had to cut out a few holes to run wires through. It's a cinch if you have a dremel or drill.

Step 2

Build the circuit and attach IR sensor as follows.

Step 3
  • Code your Arduino. Download the IR Remote Library here: https://github.com/shirriff/Arduino-IRremote. Test the remote and decide which buttons you want to use. Upload irrecv.ino code from the example sketches under IRremote. Jot down the codes from the buttons accordingly.
Step 4

You're finished! Test it out! Here's what my project looks like with video...

Code

CounterTopControlArduino
Your remote will most likely have different readings check the buttons you'd like to use before adding them to the if statements.
#include <IRremote.h>

int RECV_PIN = 11;
const int underLeds = 6;

int lightState = 0;
int lightValue = 0;
int flag;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(9600);
  // In case the interrupt driver crashes on setup, give a clue
  // to the user what's going on.
  Serial.println("Enabling IRin");
  irrecv.enableIRIn(); // Start the receiver
  Serial.println("Enabled IRin");
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, DEC);
    //irrecv.resume(); // Receive the next value
  
  if(results.value == 33441975){
     //lights on
     lightState = 1;
     flag = flag + 1;
     //Serial.println("ON");
     lightValue = 250;
     analogWrite(underLeds, lightValue);
  }
 
  if(results.value == 33448095 && lightState == 1){
    lightValue = lightValue + 10;
    analogWrite(underLeds, lightValue);
    }

   if(results.value == 33464415 && lightState == 1){
      lightValue = lightValue - 10;
      analogWrite(underLeds, lightValue);
   
}
  if(results.value == 33441975 && flag == 2){
    //check if leds are on then turn off.
    flag = 0;
    Serial.println("OFF");
    analogWrite(underLeds, 0);
  }
 irrecv.resume();
  }
 //irrecv.resume();
  
}

Comments

Similar projects you might like

Servo Control with TV Remote Control

Project showcase by eldo85

  • 5,649 views
  • 5 comments
  • 18 respects

Control an LED with the Remote Control

Project showcase by Nicholas_N

  • 3,196 views
  • 2 comments
  • 9 respects

Control Your Computer With A Remote Control

Project tutorial by Arduino_Scuola

  • 5,942 views
  • 1 comment
  • 8 respects

Solar Powered, Cellar Lighting Arduino Control

Project in progress by TJ Blevins

  • 1,343 views
  • 0 comments
  • 3 respects

Turn LEDs On/Off via Remote Control

Project tutorial by ismystore

  • 6,933 views
  • 0 comments
  • 5 respects
Add projectSign up / Login