Introduction: Mini Display Case With RGB Light

This instructable will show the process of making a miniature display case with a RGB light. Why a miniature display case you might ask? Well this idea sprung to mind when we were asked to think of a project that we wanted to make during a Fablab course I was following. I've always wanted to show off some of my 3d prints in a small case so this seemed the right opportunity

For this project I will be using the following parts

- Arduino Uno/Nano (Uno only when it's really needed)
- WS2028 RGB leds (I have a bunch of these and I think they'll look great.

- Acrylic/MDF for the enclosure.

Step 1: Constructing the Case

We'll be making the enclosure for our project first. I've drawn up some plans in Tinkercad and converted those to flat svg images to cut out on the laser printer.

By using Inkscape to fix the STL that Tinkercad outputs - Our FabLab uses RGB(255, 0, 0) as a cutting a color and 0.1mm line thickness - I got 3 seperate files that I used to print out the walls. Sadly I lost my original SVG files in a recent laptop crash but I've managed to retrieve the original STL files that I derived my SVG files from. They are attached to this step. Also I have the original model viewable over here: https://www.tinkercad.com/things/6dQwoG4XviE-brave...

You might have noticed a bottom and top section are missing. The parts were supposed to be included but also got lost in the laptop crash so I improvised and made the lid by hand. The downside to this is that I couldn't get my finish as good as I wanted but for a prototype it's good enough. You can notice this especially on the lid which also doesn't use an optimal hinge.

I'm using sheets of plexiglass that I cut (poorly due to time constraints) to create the windows for the display. I'm using super glue to fix them to the MDF of the case

---BIG WARNING---

Super glue (Cyanoacrylate) sticks to EVERYTHING, this includes sticking your fingers together but also ruining your plexiglass (like you might be able to see in the photos of the final product. Please be careful when using it and always use it in a ventilated room when you do since it might also react with the material your using and release vapors.

---BIG WARNING---

The bottom panel has a single hole for the 5mm WS2028B to shine through. Next up is assembling the electronics, don't worry it's simple!

Step 2: Programming

The code for getting the rainbow effect is pretty easy. I'm just using Digital Pin 9 to send all my data to the WS2028B led and control a simple color fade. This could be expanded by you to include other nice effects to showcase your project. Just start up your Arduino IDE and copy paste the code below and hit upload! If you're just running a single LED you can just power it off the Arduino, when you're using more keep in mind you might need a bigger power supply.

<p>#define PIN 9<br>Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800);</p><p>void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}</p><p>void loop() {
  rainbowCycle(60);
}</p><p>// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;
  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
    for(i=0; i< strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
}</p><p>// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}</p>

Step 3: Enjoy and Some Notes

This project started it's life as mini coin pusher but due to the mechanisms involved it quickly evolved/devolved into a display case for 3d printed parts. I might build bigger versions of this in the future when I do bigger 3D prints and refine the design.

This project was partially made in and for the FabLab over at Rotterdam Hogeschool check them out when you're in the area they've got loads of cool tools and machines to make your project come to life!