Project showcase
RGB LED Lamp

RGB LED Lamp © GPL3+

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

  • 1,464 views
  • 0 comments
  • 4 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

  • 1,232 views
  • 0 comments
  • 4 respects

Multicolor Knight Rider with RGB PL9823 LED + Arduino UNO

Project tutorial by Giovanni Gentile

  • 4,181 views
  • 0 comments
  • 11 respects

Wireless LED Lamp with IR Remote Control

Project showcase by Peter Wallhead

  • 3,827 views
  • 2 comments
  • 16 respects

Not Your Typical RGB LED

by Alexander Vaughn

  • 1,697 views
  • 1 comment
  • 9 respects

DMX RGB LED Outdoor

Project tutorial by Sebastian Wiessner

  • 9,828 views
  • 6 comments
  • 15 respects
Add projectSign up / Login