Fiber Optic LED Lamp

46,673

907

142

Introduction: Fiber Optic LED Lamp

This LED lamp is in a way a continuation of my previous project "Fiber Optic and LEDs - a Wall Decoration", I think a natural one, I wanted to make something simpler, easier to do, that would be available to many of you. The "mechanical" parts of the lamp are 3D printed, the electronic part is simple and the plastic optical fiber is eye catching. The shape of the lamp is inspired by Helder Santos' project "Square LED Lamp" and the arrangement of the optical fibers is very similar to that of my project mentioned above. I will show you in this instructable how easy it is to make this LED lamp.

Step 1: Parts, Materials Needed…

And a few small things: wires, heat-shrinkable tubes for connections and hot glue.

If you are not used to tinkercad you have the stl files below:

Step 2: Electronic Schematics

Particularly simple as you can see in the graphic above

Step 3: ​Construction

I started with the 3D printing of the components, it takes quite a long time so in the meantime I was able to make the connections between the pieces of LED strip. It is good to check the correct operation of the LEDs before mounting the soldered pieces as in step3 of the project "Fiber Optic and LEDs - a Wall Decoration" (I just changed the value DATA PIN to 5 and NUM_LEDS to 32 in the test code).

After finishing the printing of the frame, the hardest part followed: ) fitting and fixing the four pieces of 8 LEDs each in the channels of the lamp frame. I loosened the protective plastic of the self-adhesive layer of the LEDstrip and for the best and most precise fixation I also used a few fiber optic ends inserted through the side holes. Then I slowly untied the protective layer and by pressing the strip to the frame, I fixed it. You can see the operation more clearly in the photos above.

This operation was followed by inserting in the side holes some pieces of plastic optical fiber. I cut the pieces as perpendicular as possible using the same template as in the "Fiber Optic and LEDs - a Wall Decoration" project. 8 pieces of fiber, so a total of 16 pieces, of different lengths join the pairs of holes that are at the same distance from the sides of the lamp frame, as in the photos above.

I made the rest of the connections according to the electronic schematics and then I mounted the lamp support and fixed it with a lot of hot glue, I fixed the touch button also with hot glue (not before mounting the push pin) and I fixed the Arduino Pro Mini module in the place provided by the support.

That's all!

Step 4: The Software

The final step in building the lamp was to upload the program to the Arduino micro controller. I used an USB to Serial module with the FT232RL chip connected as you can see in the photos above. Of course you can upload the code with other USB to Serial adapters. There are a lot of howto's online about programming the Arduino Pro Mini.

The source code of the program is on github, you can download it from there.

A few words about the program...

The lamp works in three main modes that can be selected by double-clicking on the push button: solid color mode (and with the breath effect), palette mode and effects mode. With a simple click in solid color mode you can choose different colors (9 colors) also with the breath effect, in palette mode you can choose several color palettes that are taken from PaletteKnife for FastLED and in effect mode…some effects :)

The program is essentially an adaptation of the codes from FastLED Breath for the breath effect, from palettes with button control for the different color palettes and the code from DemoReel100 with button for effects. For putting the Arduino Pro Mini to sleep, with a double click, I was inspired by this article. Also, at this moment (double click) the current operating mode is saved but also the settings from each operating mode.

External libraries I used (sleep.h and EEPROM.h are among Arduino's internal libraries) are FastLED and ArduinoMultiButton.

Step 5: Using the Lamp

In the video below you can see in more detail how the lamp can be used.

Step 6: Some Conclusions

I have to admit that I built this lamp for myself, I wanted to have something special :)

I put the lamp on the bedside table, I have been using it for a few days and I really like it. I am very satisfied with how the construction succeeded. However, maybe I will make some changes in the future…

For example in color palette mode I would make the brightness lower or choose color palettes with lower brightness. I would add a few more effects, I really liked the noise effect in my "Fiber Optic and LEDs - a Wall Decoration" project, I'm thinking of adding it to the effects mode. I could also power the LED strip through a MOSFET transistor as I did in my "Safety Armband" project and thus greatly reduce the idle consumption of the lamp. Now if I turn it off with a double click, the lamp consumes about 30 mA and in operation I measured a maximum of 400 mA.

I look forward to your reactions and questions as always.

Anything Goes Contest

First Prize in the
Anything Goes Contest

23 People Made This Project!

Recommendations

  • Science Fair Challenge

    Science Fair Challenge
  • Trash to Treasure Contest

    Trash to Treasure Contest
  • Make It Modular: Student Design Challenge

    Make It Modular: Student Design Challenge

142 Comments

0
Jarne Delarue
Jarne Delarue

23 days ago

This is awesome! It looks very cool. I'd love to have it as decoration in my room.

0
K0e0v0i0n
K0e0v0i0n

Question 3 months ago

Dear, when i try to verify the file fiber_optic_led_lamp to the arduino, they write pinbutton.h: no such file or directory. Did someone also had this?

0
K0e0v0i0n
K0e0v0i0n

Reply 3 months ago

yes thank you, I have add.

0
K0e0v0i0n
K0e0v0i0n

Answer 3 months ago

Never mind, solved this, im sorry.

0
crazy__raptor
crazy__raptor

3 months ago

Has anyone got this to work with a nano every? getting compiling issues and its way above my skillset to figure out how to fix this!

In file included from C:****\Downloads\Fiber-Optic-LED-Lamp-main\Fiber-Optic-LED-Lamp-main\Fiber_Optic_LED_Lamp\Fiber_Optic_LED_Lamp.ino:5:0:
C:****\Documents\Arduino\libraries\FastLED\src/FastLED.h:14:21: note: #pragma message: FastLED version 3.004.000
# pragma message "FastLED version 3.004.000"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:****\Documents\Arduino\libraries\FastLED\src/FastLED.h:65:0,
from C:****\Downloads\Fiber-Optic-LED-Lamp-main\Fiber-Optic-LED-Lamp-main\Fiber_Optic_LED_Lamp\Fiber_Optic_LED_Lamp.ino:5:
C:****\Documents\Arduino\libraries\FastLED\src/fastspi.h:135:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output
# pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:****\Documents\Arduino\libraries\FastLED\src/platforms/avr/fastled_avr.h:4:0,
from C:****\Documents\Arduino\libraries\FastLED\src/platforms.h:41,
from C:****\Documents\Arduino\libraries\FastLED\src/FastLED.h:52,
from C:****\Downloads\Fiber-Optic-LED-Lamp-main\Fiber-Optic-LED-Lamp-main\Fiber_Optic_LED_Lamp\Fiber_Optic_LED_Lamp.ino:5:
C:****\Documents\Arduino\libraries\FastLED\src/platforms/avr/fastpin_avr.h: In instantiation of 'static void _AVRPIN<PIN, _MASK, _PORT, _DDR, _PIN>::setOutput() [with unsigned char PIN = 5; unsigned char _MASK = 4; _PORT = __gen_struct_PORTB_OUT; _DDR = __gen_struct_PORTB_DIR; _PIN = __gen_struct_PORTB_IN]':
C:****\Documents\Arduino\libraries\FastLED\src/platforms/avr/clockless_trinket.h:107:31: required from 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::init() [with unsigned char DATA_PIN = 5; int T1 = 6; int T2 = 8; int T3 = 6; EOrder RGB_ORDER = (EOrder)66; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 10]'
C:****\Downloads\Fiber-Optic-LED-Lamp-main\Fiber-Optic-LED-Lamp-main\Fiber_Optic_LED_Lamp\Fiber_Optic_LED_Lamp.ino:124:1: required from here
C:****\Documents\Arduino\libraries\FastLED\src/platforms/avr/fastpin_avr.h:22:42: error: incomplete type '__gen_struct_PORTB_DIR' used in nested name specifier
inline static void setOutput() { _DDR::r() |= _MASK; }
~~~~~~~^~
C:****\Documents\Arduino\libraries\FastLED\src/platforms/avr/fastpin_avr.h: In instantiation of 'static volatile uint8_t* _AVRPIN<PIN, _MASK, _PORT, _DDR, _PIN>::port() [with unsigned char PIN = 5; unsigned char _MASK = 4; _PORT = __gen_struct_PORTB_OUT; _DDR = __gen_struct_PORTB_DIR; _PIN = __gen_struct_PORTB_IN; _AVRPIN<PIN, _MASK, _PORT, _DDR, _PIN>::port_ptr_t = volatile unsigned char*; uint8_t = unsigned char]':
C:****\Documents\Arduino\libraries\FastLED\src/platforms/avr/clockless_trinket.h:340:44: required from 'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>&) [with unsigned char DATA_PIN = 5; int T1 = 6; int T2 = 8; int T3 = 6; EOrder RGB_ORDER = (EOrder)66; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 10]'
C:****\Documents\Arduino\libraries\FastLED\src/platforms/avr/clockless_trinket.h:118:18: required from 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showPixels(PixelController<RGB_ORDER>&) [with unsigned char DATA_PIN = 5; int T1 = 6; int T2 = 8; int T3 = 6; EOrder RGB_ORDER = (EOrder)66; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 10]'
C:****\Downloads\Fiber-Optic-LED-Lamp-main\Fiber-Optic-LED-Lamp-main\Fiber_Optic_LED_Lamp\Fiber_Optic_LED_Lamp.ino:124:1: required from here
C:****\Documents\Arduino\libraries\FastLED\src/platforms/avr/fastpin_avr.h:39:84: error: incomplete type '__gen_struct_PORTB_OUT' used in nested name specifier
inline static port_ptr_t port() __attribute__ ((always_inline)) { return &_PORT::r(); }
~~~~~~~~^~
exit status 1
Error compiling for board Arduino Nano Every.

0
andrei.erdei
andrei.erdei

Reply 3 months ago

Hi
I don't think that arduino nano every is fully supported by FastLED library. This month FastLED 3.5.0 was released and here it is stated that there is some "Improved board support for Teensy 4, Adafruit MatrixPortal M4, Arduino Nano Every". Maybe it works...

0
pillola
pillola

Reply 3 months ago

Thanks..!!!Andrei.....have a nice days!!!

0
trabajosmarbella
trabajosmarbella

Question 11 months ago

hello, connected like this it won't work for me It may be for something, it doesn't turn on the lights. Thank you

image.jpg
0
klwill1192
klwill1192

Answer 4 months ago

I don't see a connection to pin 2 for the momentary switch. One leg of the switch should be connected to ground and the other to pin 2 so the firmware will recognize when you push the button.

0
Rpl85
Rpl85

Question 4 months ago on Step 2

Very cool project. I do have a question for you and that is can you recommend a 3D printer for these types of projects. I have never used a 3D printer but would like to get into it so any suggestions would be wonderful. Thank you

0
andrei.erdei
andrei.erdei

Answer 4 months ago

There are plenty of 3D printer options to get you started. It depends on how much money you want to spend but also how much time you want to sacrifice with such a printer. Many swear that for an amateur the best printer is the one that is hackable, modifiable and one you will learn by struggling with. That's how I started ...
A Prusa i3 clone, an Anet A8, an Ender 3 v2 were my first printers. But honestly I didn't want to waste my time with all kinds of additions, modifications, improvements and so I switched to a semi-professional printer. I wanted to print from the beginning without too much hassle, I wanted to have repeatable results, so now I have a Creality CR-6 SE. Of course it's a little more expensive than the ones I listed at the beginning. So if you want to learn and "torment" yourself, take a cheap printer with which you will try to make the printing work as good as possible ... Or a more expensive printer and focus on design, freeing yourself from the hassle of repeated printing attempts :)
Also I'd like to point out I bought all these printers from the Chinese market.
This is my opinion, surely it does not match other's opinion ... :)

0
bradjenkins
bradjenkins

Question 4 months ago

Very cool project. I would redesign with GoPro type mount.

0
stephenzambrzycki
stephenzambrzycki

Question 1 year ago

Hey Andrei! Love the project and almost done with mine. Everything is wired up and printed, but I'm just having some trouble switching from one LED mode to another. Only 'palette mode' is working. After double clicking, I cannot get 'breath' or 'effects' modes engaged and it just switches to a different color in 'palette mode'. The sleep/shutdown long click works though. Any common errors that may cause this? Its my first time working with an Arduino and C++.

A few more details if you need them. I uploaded your 'Fiber_optic_LED_Lamp.ino' code to the arduino. The following external libraries are installed on my IDE: 'FastLED', MultiButton', and 'Fiber-Optic-LED-Lamp-main'. Am I missing a library?

Thank you ahead for any help!

0
Pulsy
Pulsy

Answer 4 months ago

I realise this is a late answer, but maybe this will help someone else. If this happens, you haven't initialised your Arduino's memory storage yet. In the code there is a portion that you need to uncomment the first time you upload the program. Next, comment it again, and upload the software again. The explenation is in the code comments :)

0
andrei.erdei
andrei.erdei

Reply 1 year ago

Very strange. Maybe you do not make the double clicks fast enough? In the Multibutton library sources the line
static const int SINGLECLICK_DELAY = 250; // ms
indicates the maximum delay between clicks to be detected as double clicks
I don't know what else to say...

0
amo2183
amo2183

Question 4 months ago on Introduction

Wow this is amazing. I don't think I would ever be able to make these. I am a crafter but not this good. If you ever decide to make and sell, I will more than gladly purchase 2 :)

0
yrlintwtc
yrlintwtc

10 months ago

can I use the esp32 to contorl the fiber led lamp? Is the code still running? Thanks