Introduction: Embedded LED 3D Printed Christmas Tree
This is a 3D-printed Christmas tree with embedded addressable LEDs inside. So it is possible to program the LEDs for nice light effects and using the 3D printed structure as a diffusor.
The tree is separated in 4 stages and a base element (the tree trunk) to make it easier to assemble and embed the LEDs during the prints. So in total 5 elements have to be printed.
LEDs are part of the print, they are not removable afterwards. Please ensure that everything works fine before embedding them into the print.
3D files were designed in Fusion360 and are available at prusaprinters.org
- Transparent and green filament (In this case PLA filament was used)
- Teensy M0 or other small Arduino board (Trinket M0)
- Single Cell LiPo, for example a 18560 from Adafruit (battery)
- ON/OFF Switch with 17.5 mm hole distance
- 25 WS2812B LEDs
- Coated Copper wire or other thin wires
Files at https://www.prusaprinters.org/prints/13643
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Soldering the LEDs
Before embedding the LEDs in the 3D print, they have to be connected to each other for every stage separately. Using a 3D printed stencil (stencil.stl file) makes it much easier to match the correct wire length for stages 1-3. LEDs are connected like displayed in the schematic, DOUT of every LED is connected to the DI of the next one. At the end, first DI and last DOUT are wired to the center for connecting them with the other stages later.
Step 2: Concept of Embedding the LEDs
There is a click mechanism to hold the LEDs in place. Also there is a small overhang in the corners of the wiring channels to prevent the wires from popping out of the channels during printing. The wires, which are lead out of the print, are fixed in a comb structure to hold them in place. Therefore the wire diameter for this wires should be around 1mm.
Step 3: Prepare Print Files
3D data is provided as .3mf file, including the color change from transparent to green. Nevertheless, because every filament is slightly different. Please check the shrinkage of your material and do a test print (e.g. first 5 mm) to adapt the scaling if needed so that the LEDs are fitting in the click mechanism.
Step 4: Start Printing
Every print starts with transparent filament. Stages 1-3 have 1 color change, Stage 4 has two.
Step 5: Embedding the LEDs
PrusaSlicer was used to add a color change at 5 mm to embed the LEDs, change to green filament and continue the print. It’s very important to ensure that the LEDs are embedded properly so nothing overlaps the 5mm which would cause a problem for the next printing step. It is very usefull to fixate the wires in the center with some tape. Please check the video above, the procedure is shown several times, also for the topper LED. The longer the center cables are, the easier is the later assembling. But space is limited because of the 5mm height limit.
Step 6: Test It!
Just test it by connecting V+,GND and DIN and using e.g. an Arduino board and a simple Neopixel example code.
Step 7: Connecting the Stages
Stages are connected according to the shown wiring diagram. V+ and GND are connected from stage to stage. Please also check the video above, there is a time-lapse section from the full assembly process.
Step 8: Preparing Electronics and Battery
There are different ways to power the LEDs. Normally they are rated for 5V, but they also work with 3,7 battery voltage and 3.3V logic, if you are using only a few of them. The Trinket M0 from Adafruit can be directly powered from a single cell Li-Ion battery. V+ of the LEDs is connected to the Bat pin, GND to GND and DIN of the LEDS to Pin 4 of the Trinket. To avoid issues with LEDs, please add a 330 Ohm resistor between Pin 4 and the first LED and also a larger capacitor (around 1000uF) between V+ and GND like mentioned in the Adafruit Neopixel best practice guide.
Step 9: Final Assembly
Between the battery plus-pin and the Trinket Bat pin, the ON/OFF-Switch is inserted. The switch can be screwed to the base and the trinket is also inserted in the base. Battery fits into the tree if its width is smaller then 30mm. Please also check the video.
Step 10: Code
There are different options for programming the LEDs, just using Arduino IDE and Neopixel library or if CircuitPython is supported just use this like in this demonstration. Code is a slightly changed example from the Adafruit CircuitPython Neopixel example provided on their website. Just change the config to:
pixel_pin = board.D4
num_pixels = 25
Runner Up in the
Home Decor Contest
1 Person Made This Project!
- Wkarner61 made it!