3D Printed LED Mood Lamp
by BreaksnMakes in Circuits > Arduino
39571 Views, 461 Favorites, 0 Comments
3D Printed LED Mood Lamp
I've always had this fascination with lamps, so having the ability to combine 3D Printing and Arduino with LEDs was something I needed to pursue.
The concept is very simple and the outcome is one of the most satisfying visual experiences you can put in a lamp format.
Please bear in mind that this was my first ever Arduino project, so not everything might be as perfect or as efficient as it could be, but it works. I'll get better with more practice :)
If you want the visual version of these instructions, please see the youtube video, and while you're there, make sure to subscribe to see my other projects :)
Enjoy!
Safety
Yes, I know, but it can never be stressed enough!
This project involves soldering and the use of a hot glue gun which brings with it the possibility of burns. So please make sure you are comfortable using a soldering iron or ask for help from someone who does.
It is also recommended to use protective goggles for eye protection.
Please take all necessary precautions in order to complete the project safely and also have fun!
Things You'll Need
Printed Parts
The files for the model from Printables: Link
The outer cover for the lamp should be printed in white PLA. I used Filamentive Natural Transparent as it diffuses the light nicely and also doesn't block it. The outer shell should be printed at 0% infill, 2 perimeters, 10 bottom, and 10 top layers.Any layer height is good, i used 0.2mm layers.
The bottom and inner column can be printed at pretty much any settings you wish (without supports).
I used Petg for the column as it can withstand heat better than PLA. I used 20% infill, 2 perimeters and 4 top and bottom layers. No supports are necessary.
The bottom was printed in wood filament at 0.2mm layers, 2 perimeters, 4 top and bottom layers and 20% infill.
The tint button extention was printed in standard black PLA at 100% infill as it's very small.
Electronics
Arduino Nano: Link
LM2596 DC-DC Step Down: Link
Tactile Touch Push Button: Link
DC Jack: Link
5v 30mm fan (Optional): Link
2 Meters RGB LED Strip (WS2812B - 60 LED per Meter): Link
Power Supply: Link
Some Red, Black, Yellow wires: Link
2 x M3x12 Screws: Link
2 x M2x10 Self Tapping Screws: Link
Sketch for all light effects: Link
Tools
Hot Glue Gun: Link
Soldering Iron: Link
Multimeter: Link
3D Printer (Obviously) with at least 200mm volume in height - too many to choose from. however, if you're in the market for one, I highly recommend the Prusa MK3s or if you want something more budget-friendly, the Creality Ender 3 is also pretty decent
Wiring Diagram
This is the complete wiring diagram for lamp.
The fan is not necessary. I designed it to counteract any possible heating from the LEDs, however, since you will most likely not use full brightness chances of the LEDs getting that hot to melt PETg are impossible.
If you are printing the LED column with PLA though and thinking of leaving it running for prolonged periods, the fan will definitely help in keeping things cool.
LED Strip and Fan Assembly
- Solder a black, red and yellow wires to the end of the LED strip.
- The Black wire should go on the GND pad
- The Red wire should go on the +5v pad
- The Yellow wire should go on the Din pad
NOTE: take note of the direction of the arrow on the LED strip. The wires should be soldered with direction of the arrow not against it as in the photo.
- Insert the 3 wires through the whole at the bottom of the column and pull them all the way through.
- Remove the sticker cover from the back of the LED strip and attach the strip to the column in a spiral direction going upwards. 2 meters should be enough to cover the whole column while leaving around 2mm space between the rotation of the strip.
- Take the hot glue gun, and just put a little dab of hot glue at the end of the strip and also at the beginning to hold both the strip and the wires in place.
- if you are installing the fan, place it at the bottom of the column as in the photo and attach it using the 2 M3x12 screws.
NOTE: The orientation of the fan is important. Make sure the sticker side is away from you when looking at the fan so that the air flow leads inside the column
Preparing Solder Joints and Wires
Take a soldering iron and start preparing the solder joints on the components in order to attach the wires to them.
Step Down Converter
- Prepare solder joints on the 4 corners marked IN- IN+ OUT- OUT+
- Solder a piece of BLACK wire (around 10cm long) to the IN-
- Solder a piece of RED wire (around 10cm long) to the IN+
ARDUINO
Prepare solder joints on the following tabs:
- Both GND pins (1 on each side)
- 5v pin
- D2 pin
- D5 pin
Tactile Button
Prepare solder joints on opposing pins. Check which pins have continuity when pressed with a multimeter
- Solder a black wire to one of the pins (around 10cm long)
- Solder another wire of any colour to the second pin (around 10cm long)
DC Jack
NOTE: Before soldering the pins on the DC Jack, check your power supply in order to see the polarity of the jack itself. These are clearly marked as in the photo, In this case, the outer parts is the NEGATIVE and the inner part is POSITIVE.
- Solder a black and red wire to the DC Jack pins according to the polarity of the power supply jack. Always check with a multimeter for continuity in order to verify which pin related to the position of the DC Jack input
Assembly: Tactile Button
- Insert the 3D Printer button extension in the slot of the base as shown in the photo
- Push the part all the way in until it protrudes from the base
- Push in the tactile button in the slot behind the button extension
- Use some hot glue to hold it in place
Assembly: DC Jack
- Slide the DC Jack into the slot adjacent to the tactile button slot as shown in the photo
- Push the DC Jack into the slot until the inlet is aligned with the hole in the base
- Use a dab of hot glue to secure it in place
Preparing Wire Lengths
- Place the step-down converter into position with the IN pads on the same side as the DC Jack
- Take both wires from the DC Jack and cut them to length, making sure they reach the pads on the step-down converter, leaving about 1cm extra so they are not strained
- Using a pair of wire strippers or a flush cutter, expose enough wire core for soldering
- Next place the Arduino into position like you did with the step-down converter
- Take both wires from the tactile button and repeat the process, making sure the wires are long enough to reach any area of the Arduino tabs
- Grab the LED column you assembled earlier and rest it on its side next to the base, with the wires running over the base
- Take both fan wires and cut them to length, making sure both wires are long enough to reach the DC Jack
- Take the 3 wires coming from the LED strip and cut them to size, making sure the wires reach the far end of the Arduino.
- Strip the ends of each wire as before.
Assembly: Step-Down Converter Part 1
Place the Step-Down converter on the edge of the base, you can use a small piece of double sided tape to hold it in place
- Solder the red wire coming in from the DC Jack onto the IN+ pad
- Solder the black wire coming from the DC Jack onto the IN- pad
Next, plug in the power supply into the DC Jack in order to power on the Step-Down converter (a red light should come on)
Take your multimeter and set it to DC voltage
Place the multimeter needles on the OUT- (black) and OUT+ (red) of the Step-Down converter. This should read the voltage coming out of the unit. We need to adjust this in order to calibrate the voltage to 5V output
While holding the multimeter needles in place, take a small flat-head screwdriver and start turning the little screw on the blue box of the Ste-Down.
Turn anti-clockwise to reduce the voltage output and clockwise to increase the voltage output.
Stop turning when the voltage is at exactly 5 volts
Assembly: Step-Down Converter Part 2
Cut two pieces of wire, red and black, about 7cm long
Cut the end sleeve on each end of both wires
- Take the red wire coming from the LED strip, combine it with the short wire you just prepared and solder them together on the OUT+ of the Step-Down Board
- Take the black wire coming from the LED strip, combine it with the short wire you just prepared and solder them together on the OUT- of the Step-Down Board
- Take the red wire from the fan and add that to the soldered red wires on the OUT+
- Take the black wire from the fan and at that to the soldered black wires on the OUT-
NOTE: For a better fit, solder the wires with an inward direction as shown in the photos
Assembly: Arduino
- Take the yellow wire coming from the LED strip and solder it to pad D5 on the Arduino
- Take one of the wires from the tactile button and solder it onto pad D2 on the Arduino
- Take the other wire from the tactile button and solder it onto tab GND on the Arduino next to D2
- Finally, take the Red and Black wires coming from the Step-Down converter and solder them to pads GND and 5v on the Arduino
The final result should like the photo. Use the schematic as reference
Final Assembly
Use the remaining two screws to secure the Ste-Down converter in place.
For the Arduino, you can place a little hot glue to keep it in place.
This should complete the major assembly. now onto the fun stuff
Arduino Programing and Testing
Take a USB to USB mini cable. Plug the mini part into the Arduino and the other end into your PC
Download the latest version of Arduino IDE here
- Open Arduino IDE on your PC
- Go to Tools -> Manage Libraries
- Search for FastLED library and install it
- Go to File -> Examples -> FastLED -> ColorPalette to run an example sketch
- On the line #define NUM_LEDS, Change the number next to it to correspond to the number of LEDs you have on the strip, in my case it's 100
- You can also adjust the brightness of the LEDs by changing the number on the #define BRIGHTNESS line, maximum being 255. a range between 100-120 should be more than enough
- Go to Tools -> Port and select the COM port your Arduino is connected to
- Go to Tools - Board and Select Arduino Nano
- Click on Upload
The Arduino light should come on, followed by the LED strip. This means that everything is working well and everything is in place. Complete assembly by locking the LED column in place, align the tabs on the column with the inlets on the base, twist slightly clockwise until it locks in place.
Finally, simply screw on the outer cover
Final Sketch Upload
If you were wondering why the tactile button is there, this is where it comes into play. The following sketch for the LEDs has multiple patterns created by Tweaking4All , all of which can be switched through by pressing the tactile button. the patterns are absolutely gorgeous, and the LED lamp was designed with these specific patterns in mind.
First, you will need to download the sketch from here.
- Open the sketch in Arduino IDE
- Adjust the number of LEDs as we did before
Next we will need to insert a couple of lines of code in order to be able to control the brightness as LEDs tend to draw in quite a lot of power, so having the brightness set to 100 will help keep it stable.
Under the line #define NUM_LEDS enter the following:
- #define BRIGHTNESS 100
In the void loop section, under EPROM.get(0,selectedEffect); enter
- FastLED.setBrightness( BRIGHTNESS );
That is it, now upload the sketch to arduino and you're completely done!
RESULT!
That's it!
I hope you enjoyed this build and please make sure to follow me here and on my Youtube channel for more upcoming projects!
Joe