Weather Diorama

Oct 29, 2017 20:33 · 437 words · 3 minutes read Hardware Fabrication

Background / Motivation

This was my teams’ project for our Intro to Physical Computing midterm, where we were encouraged to use serial communication. Barak Chamo and Mai Arakida Izsak were the other team members, and contributed to this post.

After seeing Barak create his initial Fuji Diorama:

We thought it would be interesting to insert lights between the layers that could change the appearance of the scene depend on the time of day or weather. We had the idea to connect it to an api through a serial connection that would provide the current weather for the location the scene was taken, and we’d make the lights in the scene reflect the weather and time of day of the real location. This would provide a deeper connection to the real location for the observer.

For this project chose to convert Meditating Samurai, by Bacht:

Meditating Samurai by Bacht

Meditating Samurai by Bacht

We figured this diorama would be ideal because:

  • It would be easy to trace vectors for laser cutting the layers.
  • We could insert addressable leds between the layers and alter each layers colors independently.
  • We could make the sun also behave as a moon by backlighting it and altering its color.

Fabrication

We cut these layers both on white paper and on colored paper, to see how the scene would look under different lighting:

White papers with sunrise colors

White papers with sunrise colors

White papers with sunset colors

White papers with sunset colors

Colored papers with daytime colors

Colored papers with daytime colors

We decided to go with colored papers because they would more closely resemble the original. We put 5 strips of 10 WS2812 leds each between each layer.

Barak and Mai wiring up the layers

Barak and Mai wiring up the layers

The layers

The layers

Me (Dan) testing out the buttons

Me (Dan) testing out the buttons

With leds connected and turned on

With leds connected and turned on

We used a single WS2812 neopixel to represent the sun, and diffused it with some frosted paper.

Sunset

Sunset

Middday with clear skies

Middday with clear skies

Sunrise

Sunrise

Sunset

Sunset

Nighttime

Nighttime

The Hardware and Code

The system was built using Arduino, WS2812 addressable leds, and a lightweight node.js app that would fetch the weather via an api and provide it via serial to the Arduino. We created a simple physical computing interface with three buttons that would:

  • toggle the time of the day (sunrise, midday, sunset, nighttime)
  • change weather (clear skies, cloudy, rain)
  • request the current weather and time of day at Mt Fuji via serial communication

See the gist for The Arduino and Node.js code here.

When transitioning between conditions, the colors would fade to the new colors. This was done using the FastLED library’s blend function to lerp between colors. At nighttime, the sky would simulate stars sparkling by animating them to white or dark blue.