Merry Boxes & LEDs

Enter Your Project for a chance to win a Maker Tool Kit, an Oscilloscope Grand Prize for the project that brings the Most Joy to the Heart, and Gift to Gives!

Back to The Project14 homepage

Project14 Home
Monthly Themes
Monthly Theme Poll

 

My eldest daughter loves all things space and is constantly looking skyward at night wondering what planet she can see.  One night I taught her about constellations and she became obsessed with Scorpio and I made this small little display stand for her using some scrap outdoor solar LEDs.

Scorpio Display

 

 

As with most of my projects the objective quickly escalated--could I build something that had all 12 zodiac signs...and Orion...and the Little Dipper...and Alexa...and EVERYTHING!

 

Thus, the Magic Star Mirror was born.

 

Magic Star Mirror

 

I had various needs and wants:

 

  1. I knew I wanted multiple constellations, but I didn't want them all lit up at once.
  2. I wanted to re-use LEDs whenever possible, to save on wiring
  3. I also wanted the stars colors and luminosity to be roughly true to life
  4. I needed to do this in a format that was acceptable to display in a living area and not just my workshop

 

Step 1: Picking out the constellations

  1. Using Photoshop, I had layers made up of various constellations and did my best to overlap and re-use points as much as possible
    All Pixels

In that jumbled mess are Aquarius, Aquila, Aries, Bootes, Cancer, Capricornus, Cassiopeia, Cancer, Corvus, Cygnus, Gemini, Leo, Libra, Orion, Pisces, Sagittarius, Scorpius, Taurus, Ursa Minor, Virgo

 

    2. Once I had all the constellations mapped out, I transferred this map over to luan plywood and drilled each hole and painted the star field black

 

Step 2: Wiring it up

  1. I used a strand of generic WS2812b "neopixels" that came prewired to avoid having to solder each pixel individually.  I still had to do some soldering but not as much
  2. Each pixel was hot glued into place and the wires stapled down to secure them
  3. Powering the whole thing is a Wemos D1 Mini esp8266 board.  I went through several iterations of separate power supplies and supplemental power leads but in the end the most stable configuration was just powering it straight from the board.

 

Magic Star Mirror Wiring

 

Step 3: Software

  1. Surprisingly, this required as much Excel as it did Arduino -- first I had to make a look-up table of all the various constellations, their major stars, stellar temperature, and magnitudes
  2. I converted stellar temperature to RGB values, and for each constellation, scaled the stars' relative magnitudes so that the brightest would be 1000 and decrease from there, roughly similar to: 
    ConstellationPixelStar NameRGBMagnitude
    Orion0Rigel2002172551000
    Orion44Betelgeuse255201151780

     

    This then was used as a header file within Arduino.  I also wanted the Magnitude setting to be optional, to best see all points within the constellation regardless of how bright or dim they are in real life
  3. I initially tried the NeoPixel library and then migrated to FastLED for it's use of HSV values and fading capabilities.  Unfortunately on my esp8266 I kept seeing random flashes of disabled pixels and had to go back to the NeoPixel library
  4. Something fun I added was a "party mode" where the pixels would animate fun designs, in the end I wound up just using the "Fire" demo as it looked best on the wall.
  5. I also used the wonderful FauxESP to integrate Alexa so that the mirror's settings could be changed on the fly.
    1. All Lights - On/Off
    2. Background Stars - On/Off
    3. Twinkling Effect - On/Off
    4. Equal magnitude for all stars - On/Off
    5. Party Mode - On/Off

 

 

Step 4: Putting it all together

  1. To make it look more finished, I used two-way mirror film on plexiglass within a frame to at least give the facsimile of a mirror.  The mirror film I obtained from AliExpress and it arrived slightly crinkled which made the mirror not quite perfect, but who cares when you have a party mode!