Project tutorial
DIY Lithophane Floating Lamp

DIY Lithophane Floating Lamp © CC BY-NC-ND

A Lithophane Floating Lamp for your loved ones.

  • 12 views
  • 0 comments
  • 0 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
4966285
Solder Wire, Lead Free

Apps and online services

About this project

From last few weeks we are seeing many posts about the Impossible Floating table. Using the same concept I have designed a Lithophane Floating Lamp. Lithophane Floating Lamp is a desk lamp, having the photos you desire to have on it. Its can be a best gift for your loved ones. The lamp has different color modes which can be triggered using a push button or a IR sensor.

Code

Arduino CodeArduino
#include <FastLED.h>

#define LED_PIN     3
#define NUM_LEDS    20
#define LED_TYPE    WS2811
#define COLOR_ORDER RGB
#define BRIGHTNESS  255
CRGB leds[NUM_LEDS];
#define UPDATES_PER_SECOND 100

char ir_pin=A0;
int ir_value=0;
int mode=0;

CRGBPalette16 currentPalette;
TBlendType    currentBlending;

void setup()
{
  Serial.begin(9600);
  pinMode(ir_pin, INPUT_PULLUP);
  FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS);
  FastLED.setBrightness(  BRIGHTNESS );

  currentPalette = RainbowColors_p;
  currentBlending = LINEARBLEND;
}
void fadeall()
{ 
  for(int i = 0; i < NUM_LEDS; i++) 
  { 
    leds[i].nscale8(250);
  }
}
void loop() 
{
  ir_value=digitalRead(ir_pin);
  if(ir_value==LOW)
  {
    mode++;
    delay(1000);
  }
  if(mode==0)
  {
    leds[0] = CRGB(255, 255,255);
    leds[1] = CRGB(255, 255,255);
    leds[2] = CRGB(255, 255,255);
    leds[3] = CRGB(255, 255,255);
    leds[4] = CRGB(255, 255,255);
    leds[5] = CRGB(255, 255,255);
    leds[6] = CRGB(255, 255,255);
    leds[7] = CRGB(255, 255,255);
    leds[8] = CRGB(255, 255,255);
    leds[9] = CRGB(255, 255,255);
    leds[10] = CRGB(255, 255,255);
    leds[11] = CRGB(255, 255,255);
    leds[12] = CRGB(255, 255,255);
    leds[13] = CRGB(255, 255,255);
    leds[14] = CRGB(255, 255,255);
    leds[15] = CRGB(255, 255,255);
    leds[16] = CRGB(255, 255,255);
    leds[17] = CRGB(255, 255,255);
    leds[18] = CRGB(255, 255,255);
    leds[19] = CRGB(255, 255,255);
    FastLED.show();
  }
  if(mode==1)
  {
    leds[0] = CRGB(0, 242, 2554);
    leds[1] = CRGB(0, 242, 255);
    leds[2] = CRGB(0, 242, 255);
    leds[3] = CRGB(0, 242, 255);
    leds[4] = CRGB(0, 242, 255);
    leds[5] = CRGB(0, 242, 255);
    leds[6] = CRGB(0, 242, 255);
    leds[7] = CRGB(0, 242, 255);
    leds[8] = CRGB(0, 242, 255);
    leds[9] = CRGB(0, 242, 255);
    leds[10] = CRGB(0, 242, 255);
    leds[11] = CRGB(0, 242, 255);
    leds[12] = CRGB(0, 242, 255);
    leds[13] = CRGB(0, 242, 255);
    leds[14] = CRGB(0, 242, 255);
    leds[15] = CRGB(0, 242, 255);
    leds[16] = CRGB(0, 242, 255);
    leds[17] = CRGB(0, 242, 255);
    leds[18] = CRGB(0, 242, 255);
    leds[19] = CRGB(0, 242, 255);
    FastLED.show();
  }
  if(mode==2)
  {
    leds[0] = CRGB(255, 70,0);
    leds[1] = CRGB(255, 70,0);
    leds[2] = CRGB(255, 70,0);
    leds[3] = CRGB(255, 70,0);
    leds[4] = CRGB(255, 70,0);
    leds[5] = CRGB(255, 70,0);
    leds[6] = CRGB(255, 70,0);
    leds[7] = CRGB(255, 70,0);
    leds[8] = CRGB(255, 70,0);
    leds[9] = CRGB(255, 70,0);
    leds[10] = CRGB(255, 70,0);
    leds[11] = CRGB(255, 70,0);
    leds[12] = CRGB(255, 70,0);
    leds[13] = CRGB(255, 70,0);
    leds[14] = CRGB(255, 70,0);
    leds[15] = CRGB(255, 70,0);
    leds[16] = CRGB(255, 70,0);
    leds[17] = CRGB(255, 70,0);
    leds[18] = CRGB(255, 70,0);
    leds[19] = CRGB(255, 70,0);
    FastLED.show();
  }
  if(mode==3)
  {
      static uint8_t hue = 0;
  for(int i = 0; i < NUM_LEDS; i++) {
    leds[i] = CHSV(hue++, 255, 255);
    FastLED.show(); 
    fadeall();
    delay(10);
  }
  for(int i = (NUM_LEDS)-1; i >= 0; i--) {
    leds[i] = CHSV(hue++, 255, 255);
    FastLED.show();
    fadeall();
    delay(10);
  }
  }
  if(mode==4)
  {
    static uint8_t startIndex = 0;
    startIndex = startIndex + 1; 
    FillLEDsFromPaletteColors( startIndex);
    FastLED.show();
    FastLED.delay(1000 / UPDATES_PER_SECOND);
  }
  if(mode==5)
  {
    FastLED.clear();
    FastLED.show();
  }
  if(mode==6)
  {
    mode=mode-6;
  }
}
void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
    uint8_t brightness = 255;
    
    for( int i = 0; i < NUM_LEDS; i++) {
        leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
        colorIndex += 3;
    }
}

Custom parts and enclosures

angle_TWZbNvC3QV.stl
base_NXTofF5A1g.stl
lampshade-wp3891853-avengers-endgame-wallpapers_60b5ovdAtH.stl
lamptop_oY3dzXhMTe.stl
top_tYgyOaBRhL.stl

Schematics

Circuit Diagram For Push Button
*You can choose the mode of triggering the lamp color modes either by push button or IR sensor.
*The code for both the option is same.
*Make all the connections as shown in circuit diagram.
*I have used WS2811 LEDs, I will recommend you to use any addressable LED Strip so that it can be more continent.
Button circuit tmrbryqaab
Circuit Diagrams for IR Sensor
*You can choose the mode of triggering the lamp color modes either by push button or IR sensor.
*The code for both the option is same.
*Make all the connections as shown in circuit diagram.
*I have used WS2811 LEDs, I will recommend you to use any addressable LED Strip so that it can be more continent.
Ir circuit q6lhotr0j8

Comments

Similar projects you might like

Integrated Solar ChargeController, Inverter, PowerBank, Lamp

Project tutorial by Shahariar

  • 15,534 views
  • 27 comments
  • 47 respects

RFID Desk Lamp

Project tutorial by Kutluhan Aktar

  • 3,317 views
  • 0 comments
  • 9 respects

Bluetooth Mobile Remote Lamp with Weather Station

Project tutorial by Kutluhan Aktar

  • 1,805 views
  • 2 comments
  • 2 respects

Remote Lamp

Project tutorial by Kutluhan Aktar

  • 3,379 views
  • 0 comments
  • 8 respects

DIY Arduino Tic Toc Toe Game

Project tutorial by Mukesh Sankhla

  • 726 views
  • 0 comments
  • 4 respects

Hot Glue LED Matrix Lamp

Project tutorial by John Bradnam

  • 9,151 views
  • 1 comment
  • 40 respects
Add projectSign up / Login