Interactive Christmas Diorama

by repaha in Circuits > LEDs

1191 Views, 3 Favorites, 0 Comments

Interactive Christmas Diorama

IMG_1533.jpeg
IMG_1534.jpeg

This is an interactive Christmas diorama which, when you press a button/switch, lights up with Christmas colors and music!

Supplies

Nano RP2040 Connect - https://store-usa.arduino.cc/products/arduino-nano-rp2040-connect-with-headers

Fake Snow, I used this one: https://www.michaels.com/original-buffalo-snow-value-bag/10486569.html?r=g&cm_mmc=PLASearch-_-google-_-MICH_Shopping_US_N_Decor_N_Smart_BOPIS_N-_-&Kenshoo_ida=&kpid=go_cmp-9982373278_adg-101811088278_ad-433378147587_pla-1354852366984_dev-c_ext-_prd-10486569&gclid=CjwKCAiA78aNBhAlEiwA7B76p1cH6evnZdHgazTZ02u8D7C7-KIQpEcBGKZSxsiOHe4cBu4sTEa25xoCIMkQAvD_BwE

USB Data Cable: https://www.adafruit.com/product/592

Adafruit Neopixel LED Digital Light Strip - https://www.adafruit.com/product/1376?length=1

Any speaker. I used this cheap one - https://www.amazon.com/Speaker-Portable-Hamburger-Amplifier-Laptop/dp/B07XDB4JVH/ref=sr_1_6?crid=28CFFI3T0SXVY&dchild=1&keywords=hamburger+mini+speaker&qid=1635361776&sprefix=hamburger+mini+speaker%2Caps%2C73&sr=8-6

3 Male to male Wires - https://www.adafruit.com/product/1956?gclid=CjwKCAiA78aNBhAlEiwA7B76p7ycwCAFMvbvd6DqHPm5YTc2LwBoPXvP1XgRUckrGLln1dwzTENEyBoCHUMQAvD_BwE

4 Male Wire to alligator clip - https://www.adafruit.com/product/3448?gclid=CjwKCAiA78aNBhAlEiwA7B76p5Uohr1k2xAHK0dvsoocSmyfVU4JLqQJdpg6cnOCp7J-w_AedXfUrxoCDocQAvD_BwE

Assistive Tech Switch: https://www.amazon.com/AbleNet-Big-Red-Twist-Switch/dp/B00CQASPEK/ref=asc_df_B00CQASPEK/?tag=hyprod-20&linkCode=df0&hvadid=193991302028&hvpos=&hvnetw=g&hvrand=14464467112350118460&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9002072&hvtargid=pla-334682974474&psc=1

Tape

Any fast acting adhesive: https://www.amazon.com/Gorilla-Super-Glue-Gram-Clear/dp/B001IY82FM/ref=asc_df_B001IY82FM/?tag=hyprod-20&linkCode=df0&hvadid=193151859311&hvpos=&hvnetw=g&hvrand=16070138533950100397&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9001997&hvtargid=pla-307086842855&psc=1

Breadboard: https://www.adafruit.com/product/64?gclid=CjwKCAiA78aNBhAlEiwA7B76p02yTiiA2e6Z-dCW4QFT65NqwOrGJitmlXLBGFvlnIu7vHCf8ENqqBoCUJ4QAvD_BwE

Wood, 3ft by 1.5ft of 3/8 inch thickness

Miniature Pine Trees: https://www.michaels.com/tiny-treasures-mini-green-sisal-trees-by-ashland/10677911.html

3d Printer

3D Printing

IMG_1528.jpeg

I 3d printed a couple of characters to go in my diorama: a snowman and a reindeer. They aren't essential, but here are the links to the files if you want to print them as well:

https://www.thingiverse.com/thing:195839

https://www.thingiverse.com/thing:3166322

Setting Up Your Arduino Nano

I recommend watching the following video for details on how to set up your Arduino with the necessary libraries and Circuit Python. This will make sure that our code will run properly.

https://www.youtube.com/watch?v=Fqc_KI7BNxY&list=PL9VJ9OpT-IPSsQUWqQcNrVJqy4LhBjPX2&index=24&t=26s

Setting Up Your Audio

Image 12-9-21 at 12.37 PM.jpg

I downloaded audio versions of YouTube videos, one of "Frosty the Snowman Song | Christmas Songs for Kids" and one of "Santa Claus is coming to town". The method I used is:

  • Go to your chosen YouTube video
  • in the url, change "youtube" to "yout"
  • Download as a .WAV File
  • Download the free audio editor "Audacity": https://www.audacityteam.org/download/mac/
  • Edit the files as desired, and export them as .wav files with 22kilohertz and 16 bits per sample.
  • I put the files in a folder called "holiday_sounds", and I recommend using the same name because you won't have to change any code later on
  • Copy the "holiday_sounds" folder over to your Arduino

I've attached below the files I constructed for this project.

Setting Up Your Code

I've attached the code below. Essentially, when a switch or button is pressed, the board will randomly select one fo the two songs, and then play it. While playing it, an animation plays so that the LED strip lights up in Christmas/Winter colors. Save the file below onto your Arduino with the exact same name.

There are comments in the code about how to edit it if you have different song/folder names.

Downloads

Building Your Cabin

IMG_1536.jpeg

I began by measuring out and cutting 4 equal pieces of wood. For me, these were 3 inches by 4 inches. Then, using the adhesive, I constructed a rectangular prism with no top/bottom by using adhesive to connect the pieces. Then, measure and cut two pieces which are 4 inches by 4 inches for the roof, and one piece which is 3/8th inches by 3/8th inches by 4 inches for the center of the roof. Then, seal these together as pictured. Now, this piece is detachable so that you can easily modify the contents of the cabin. I put the wall piece onto a base of wood which was approximately 1.5 by 2 feet.

Setting Up the Arduino Nano Breadboard

Image 11-4-21 at 2.45 PM.jpg
IMG_1526.jpeg

I recommend checking out this video on how the breadboard and pins work:

https://www.youtube.com/watch?v=rSF_b8ab2gU&list=PL9VJ9OpT-IPSsQUWqQcNrVJqy4LhBjPX2&index=25

After you've seen that, set up the board according to the picture and diagram above. The Strip signal goes to D2, the power goes to VIN, and the ground goes to GND. For the speaker, use one alligator clip/male pin from GND and go to the base of the cord, and one alligator clip/male pin from D3. Finally, use one alligator clip/male pin from GND to the base of the metal at the end of the switch, and one from D5 to the tip of the metal at the end of the switch.

Finishing the Cabin

IMG_1527.jpeg

Now, place your cabin walls on the wood base and place your speaker and breadboard/Arduino inside them. Then, I wrapped my LED strip around the cabin walls and sealed it on with tape as pictured. Then, make sure that your switch cord is coming out the back, and place the roof over the cabin.

Final Steps

IMG_1534.jpeg

Now, you get to set up the diorama however you wish! Check out the photo for my setup, I used fake snow, the 3d prints, and miniature pine trees to give it a wintery feel.

Completed Product!

Christmas Diorama Showcase

Check out this video for a walkthrough of the completed product in action!