Project showcase
RGB LED Lamp

RGB LED Lamp © GPL3+

Interactive RGB lamp. Made with pupils. We use syringes to change color.

  • 4,735 views
  • 0 comments
  • 6 respects

Components and supplies

Kce8bkptj7srmwx6wcxu
Arduino Mini 05
You can use any arduino
×1
Rg slider a
RobotGeek Slider
Any slide potentiometer of 10k.
×3
Transistor BD139
or similar NPN transistor
×3
11842 01a
SparkFun LilyPad Rainbow LED (strip of 7 colors)
LED strip RGB
×1
13268 01
SparkFun Snappable Protoboard
It's better if you use a printed board
×1

Apps and online services

About this project

My student and I built an interactive RGB lamp.

You can change the color of the lamp by placing a syringe with colored water into desired position. For each color we use one syringe (red, green, blue). Plunger of the first syringe moves the plunger of the second syringe, and it moves a linear potentiometer. Therefore, the voltages are changed to three analog inputs of arduino.

You can take a lampshade with some old lamps or make it from the sturdy wire and transparent material.

Code

The syringe lamp.inoArduino
int led1 = 9;
int led2 =10;
int led3 =11;

int osvetljaj1 = 0;
int osvetljaj2 = 0;
int osvetljaj3 = 0;

void setup() 
    {
    Serial.begin(9600);
    pinMode(led1, OUTPUT);
    pinMode(led2, OUTPUT);
    pinMode(led3, OUTPUT);
    }   
   

void loop() 
    {
    int senzorNivo1 = analogRead(A0);
    int senzorNivo2 = analogRead(A1);
    int senzorNivo3 = analogRead(A2);

    osvetljaj1 =  (senzorNivo1 + 100) /4;  //Zavisi od duzine sprica i duzine potenciometra
    osvetljaj2 =  (senzorNivo2 + 100) /4;
    osvetljaj3 =  (senzorNivo3 + 100) /4;
 
    analogWrite(led1, 255 - osvetljaj1);
    analogWrite(led2, 255 - osvetljaj2);
    analogWrite(led3, 255 - osvetljaj3);
 
    Serial.print(senzorNivo1);
    Serial.print("    ");
    Serial.print(senzorNivo2);
    Serial.print("     ");
    Serial.println(senzorNivo3);
    delay(100);
    }

Comments

Similar projects you might like

Arc RGB LED Lamp

Project in progress by antiElectron

  • 2,921 views
  • 0 comments
  • 9 respects

Running a 32x64 RGB LED Panel with only an Arduino Nano

Project tutorial by CamelCaseName

  • 27,363 views
  • 3 comments
  • 18 respects

Multicolor Knight Rider with RGB PL9823 LED + Arduino UNO

Project tutorial by Giovanni Gentile

  • 14,181 views
  • 1 comment
  • 22 respects

RFID Desk Lamp with RGB Color Scheme Lock

Project tutorial by JLCPCB and Kutluhan Aktar

  • 1,992 views
  • 1 comment
  • 4 respects

RGB LED Snowflake with Arduino Uno

Project in progress by James Cameron

  • 15,533 views
  • 8 comments
  • 32 respects

How to Use an RGB LED

by MisterBotBreak

  • 14,132 views
  • 6 comments
  • 26 respects
Add projectSign up / Login