Let's watch a short demo video (I advise you to watch it from about 1 min 40 sec)
Tools and materials: -Fiber-optic cable 3 mm diameter;
-Address LEDs WS2812 60 LEDs per meter;
-Microcontroller Arduino Mini Pro 5V; -Button 12x12x7.3 mm; -Cable with connector; -Power supply 5V/1A; -3D-printer; -Connecting wires; -Glue gun; -Heat shrink tube;
Step one: 3D printing
First you need to print the body parts. Files for printing can be downloaded below.
Body – fiber-optic LED lamp.stlCover – Fiber Optic LED Lamp.stlContact – fiber-optic LED lamp.stlSupport – Fiber Optic LED Lamp.stl
< a href = "https://usamodelkina.ru/uploads/posts/2021-02/1614066036_1-5.jpg" rel = "prettyPhoto"> < a href = "https://usamodelkina.ru/uploads/posts/2021-02/1614066044_1-7.jpg" rel = "prettyPhoto"> Step the second: a diagram
For the convenience of installation, the wizard gives a diagram.
< img class = "aligncenter" alt = "Fiber-optic LED decoration lamp" src = "https://usamodelkina.ru/uploads/posts/2021-02/1614066009_1-15.jpg"/> Step three : assembly
It is recommended to check the LEDs before assembling the elements.
After finishing the frame printing, the most difficult part is installation and fixation of four parts of 8 LEDs each in the lamp frame channels.
< a href = "https://usamodelkina.ru/uploads/posts/2021-02/1614065959_1-19.jpg" rel = "prettyPhoto"> After In this operation, pieces of plastic optical fiber are installed in the side holes. If there are 32 LEDs, then the optical fiber is 16 sections. They connect pairs of holes that are equidistant from the sides of the lamp frame.
Next made the rest of the connections in accordance with the electronic circuit. I installed the lamp support and fixed it with hot melt glue. Installed the button and the Arduino Pro Mini module.
< a href = "https://usamodelkina.ru/uploads/posts/2021-02/1614065968_1-23.jpg" rel = "prettyPhoto"> < a href = "https://usamodelkina.ru/uploads/posts/2021-02/1614065990_1-25.jpg" rel = "prettyPhoto"> < a href = "https://usamodelkina.ru/uploads/posts/2021-02/1614065982_1-27.jpg" rel = "prettyPhoto"> Step four: code
The final step in creating the lamp was loading the program into the Arduino microcontroller. The wizard used a USB to Serial module with an FT232RL chip connected, but any convenient method of downloading the code can be used.
The source code of the program is on github, you can download it here.
The lamp has three main modes that can be selected by double-clicking the button: solid color mode, palette mode, and effects mode. With a simple click in solid color mode you can select different colors (9 colors), in palette mode you can select multiple color palettes taken from PaletteKnife for http://fastled.io/tools/paletteknife/and in effects mode some effects. < br> The program is essentially an adaptation of FastLED Breath codes for breath effect, button-controlled palettes for different color palettes and a DemoReel100 code with a button for effects.
By double-clicking the lamp, you can put it into sleep mode while saving the current settings.
We used external FastLED and ArduinoMultiButton libraries and internal sleep.h and EEPROM.h included in Arduino. .