Introduction: 3D Printed Chistmas Tree Lamp

Since Christmas is near, I have taken my DNA Lamp design and turned it into a christmas tree. This was also a nice project to learn my new 3D printer and how to design my own 3D Model.

This is the latest evolution of my lamps. It looks like I am addicted to LED lamps. Just see my other instructables...

Basically it is an Arduino microcontroller with an LED strip and touch sensors hidden in the 3D printed case.

Supplies

Arduino Nano

60 LEDs/Meter Neopixel LED strip with 15LEDs (25cm).

Some cables

Metal foil with cable

USB Cable

7mm glue sticks

optional some black paper

Step 1: Print the Christmas Tree

The christmas tree files can be found below. It consists of the tree and the lid to close it. They where generated using Open SCAD. This is a 3D Modeling tool using coding to generate models. The advantage of coding is that you can parameterize your prints i.e. you can change dimensions easily. I tried this, but it got a mess. So I don't add the SCAD file here since it is not needed and you probably get only confused. Nevertheless I learnt something in the process.

I had printed some iterations before I got to the final result. The main issue was light shining out at some places and through the walls of the print which wasn't what I wanted.


My print has some glitches on the outside, so I sanded it a little bit. Do this only when using a non glossy filament, otherwise it may give an uneven looking surface.

Step 2: Get Your Electronics Connected

Put your Electronics together to see if everything work as desired. The touchpads are preconfigured, but need calibration later on. This step is to make sure everything works as desired. To test the LEDs go on to the next step to program the Arduino

Step 3: Program the Arduino

The program can be found on github.

You can use the program with Arduino IDE. Just open the DNA_Lamp.ino file. You need to install the libraries manually. See this instructable for details.

Then select your board and port, compile and upload.

When using PlatformIO just compile and upload. The libraries are downloaded automatically.

See the calibration step below for instructions how to do a calibration of the sensors. This is needed since your sensors will be inside the encasing and the sensitivity is related to the size of fthe foil you use.

When everything works fine, you can assemble everything together.

You might wonder why two different LED libraries are used. The reason is that the Adafruit library supports RGBW strips and has a lower memory footprint while the FastLED has some very good mathematics functions. Don't worry only the needed code is compiled, there is no additional overhead.

Step 4: Assemble Eveything

# Video

When everything works fine assemble everything. Start with the gluesticks since they are the most complicated part and you don't want to interfere with the electronics.

Cut the gluesticks to the sizes needed. When you cut them to the size of the visible part of the gluestick directly below it fits quite well. Then squeeze them in. You probably need to bend them a little bit.

When don't want to have the LEDs shine through the case, squeeze some black paper on the outside as shown in the picture. Also glue some black paper on the lid or paint it black.

Fit the Sensors in, but leave the cables loose. be sure they have the correct length to go down to the base where the microcontroller will be placed.

Now fit the LED strip in. fit each LED to one of the tubes. There is one in the top middle which does not fit into a tube. This will not be used by the program and stays off.

Close the lid. You may also do this later, but you don't need to do anything inside anymore.

Connect the Sensors and LED strip to the Arduino and put the Arduino in. Connect the USB to the computer and see if the LEDs shine corretly to the gluesticks.

Step 5: Calibrate the Sensors

Open a Terminal / Serial Monitor on your computer and connect to the Arduino. A menu will show up. Select Sensors and Calibrate

put your finger on a sensor position and see the change in the reading. Adjust the treshold value in a way that it is not triggered automatically or when you touch the other sensors, but triggered when you touch. Go back to the previous menu to save the settings to the internal memory of the Arduino.

Step 6: Have Fun and Merry Christmas

Enjoy your christmas tree. If you are a developer you may want to have a look at the patterns.cpp file to see how to create your own patterns. It is quite easy. When you really did, share them in the comments.

Lamps Challenge

Participated in the
Lamps Challenge