Introduction: RGB LED Mini Lamp

About: Hi! I'm a French maker student in IT loving building things or use existing things to tweak them.

Hello,

Have you ever wanted custom illuminated and controllable small RGB lamps? Well at least I did and that's why in this tutorial I'll explain how to reproduce this one which is pretty easy & quick to make, the longest part being waiting for your 3D printer to finish the plastic parts :)

Supplies

To build this project you'll need the following tools:

  • 3D Printer
  • Soldering Iron
  • Scissors

You'll also need the following components:

  • 25g of PLA (any color / variants should do the trick)
  • 12 bit WS2812B RGB LED Ring
  • 3x Wires, I recommend to use Dupont/Breadboard wires for easy prototyping/replacing
  • Or JST wires
  • JST sockets
  • Tracing paper
  • 1x Microcontroller board to control the LEDs (I used a NodeMCU ESP-12)

Step 1: Printing the Bottom Part

The first part to print for this project is the bottom part in which you'll put the LED ring.

I personnally use the following settings to print them in Cura:

  • Layer Height: 0.2mm
  • Infill Density: 20%
  • Infill Pattern: Cubic
  • Printing Temperature: 210°C
  • Bed Temperature: 60°C
  • Enable Retraction: True/Checked
  • Generate Support: Enabled/Checked
  • Support Structure: Normal
  • Support Placement: Everywhere
  • Support Overhang: Angle: 45°
  • Support Pattern: Zig Zag
  • Support Density: 20%
  • Enable Support Brim: True/Checked
  • Build Plate Adhesion: None

The print of this part should take ~3 hours.

If the print has a bit of strings around the plots such as in the example photo you can easily remove them by hand or by using pliers.

Step 2: Printing the Top Part

The second part to print is the top part used to attach the light diffuser (a small circle of tracing paper).

The settings I used in Cura to slice it are the same as the bottom part and you'll find the STL file attached to this step.

It should take ~1 hour to print.

Note that if you don't intend to put a surface on the lamp you can skip this part and use only the bottom one.

Step 3: Soldering the LED Ring

Now it's time time to prepare the LED ring and for this you simply need to either solder the wires you'll want to use or a JST socket like on the picture.

The pins you need to solder are these ones:

  • DI: It's the input data pin you need to connect to your microcontroller board to control the LED colors
  • 5V: The 5V (or positive) wire of your DC power supply (I recommend you at least a 0.8A/800mA one if you use a USB charger)
  • GND: The ground (or negative) wire of your DC power supply

The DO (Data Output) pin is only used if you want to daisy chain multiple LED rings/strips or else you can let it unsoldered.

Step 4: Assembling the Bottom Part

Well this one should be easy, you just need to open one of the socket holes on it by removing the support (you can use scissors or pliers to help) and put the LED ring in the bottom part using the 4 support pads to to fix it.

Step 5: Assembling Top Part

To assemble the top part simply follow these small substeps :)

  • Cut a circle of tracing paper the same size than the lamp (personnaly I just used the bottom part as a guide to draw & cut a circle of the same size)
  • Put the circle of tracing paper on top of the bottom part
  • Insert the top part of the lamp pushing the plots through the tracing paper

Voilà you're done!

Step 6: Connecting the Microcontroller Board

Now it's time to connect the lamp on your microcontroller board.

If you're using a NodeMCU ESP-12 (based on a ESP8266) board you'll have to do the following connections:

  • DI (LED ring) -> D7 (NodeMCU)
  • 5V (LED ring) -> VV (NodeMCU but more commonly named 5V on other boards)
  • GND (LED ring) -> G (NodeMCU)

Step 7: Flash a Sketch and Enjoy!

Everything's assembled and connected? Means it's time to add the final touch and flash our board with a sketch to control our LEDs and we're done! =)

There're plenty of them on the Internet as the WS2812B LEDs are very popular, personnally for this example I adapted the ColorPalette example (attached to this step) from the FastLED library for this specific board and LED ring so you can just copy & past it directly to upload from the Arduino IDE for this board and you can enjoy the animation!

Here we are, hope you enjoyed this =)

Colors of the Rainbow Contest

Participated in the
Colors of the Rainbow Contest