Before I begin this write-up, I have to give credit to John Park for the idea of using a Circuit Playground board with a snow globe. He showed the idea on an Adafruit Show and Tell livestream. I thought it looked so cool that I wanted to make my own version.Demo Video
A video for the project is also on my YouTube channel:Part 1
The Circuit Playground Express is a great board for this project. It has a ring of NeoPixels on board so you don't need to pack in a lot of writing in the small space underneath the snow globe. The Circuit Playground Express (CPE) also has many other sensors though and I thought it would be great to take advantage of the built-in speaker to get some yuletide chiptunes going and to also utilize the accelerometer to trigger these light and sound effects whenever you shake the snow globe.
Using all of these modules though could make the code a bit complicated for a project that is fairly simple. Because I didn't want to spend a lot of time on the code I decided to try out MakeCode since it uses visual coding blocks similar to Scratch. This makes it really easy to tie the different CPE modules together.
For my snow globe I decided to go for a Peanuts theme, since this is actually going to be a gift and the recipient loves the Peanuts; especially Charlie Brown and his tiny Christmas tree. Since it's the Peanuts, I went for the classic Linus and Lucy theme from the cartoon for the music. For music nerds, I stuck with the version that's in C rather than the original that's in A flat since I personally find music in simpler keys to sound nicer in chiptune-style sounds (a lot of flat notes can make it sound a little muddy) such as the speaker on the CPE.
For the code, I decided to write a function to hold all the music and light information. After each note I have the rainbow light animation go forward by one frame. I then call that function every time the CPE is shaken. This is a little bit more in-depth than you need to go in MakeCode. I could have just put all of the music and light commands under the Shake command but I wanted it to be more compact so I went with the function. I'll have the .uf2 file available on GitHub as well as the exported link to the MakeCode GUI for the code.Part 3
That's basically all there is for electronics and code for this project. It's very simple and I think people that have zero coding experience but want to add some fun lights or sound to an otherwise non-electronic project would enjoy using MakeCode. And for people with more experience, it makes for quick making.
The real challenge actually came with putting together the snow globe portion. Your mileage may vary depending on your globe, but I followed the directions that came with mine. First, I glued the figure, in this case a plastic Charlie Brown ornament from a discount store, to the base of the snow globe. They suggested E6000 glue, which I had on hand and used. It's a great all purpose glue. I let it dry for over 24 hours because I felt like it was still a bit tacky after the initial 24 hour period.
Next was to coat the figure and base with a resin material called Envirotex. I had never used it before but decided to use it since it was suggested on the snow globe directions. It's basically a water sealing material that gives off a nice gloss afterwards. A few tips though if you ever use it. Use disposable materials to mix and apply it. I used two small plastic drinking cups to mix it and I am still making slow progress in removing the leftover resin despite following the cleaning instructions. The only disposable cups I had were bathroom cups, which have a wax coating inside and you can't mix it in anything that has a wax coating so if I did it again I would make sure to have some paper party cups on hand. Also for mixing a popsicle stick would come in handy. I used an old dinner knife that's actually broken but the same cleaning issue is occurring there as well.
For drying, the directions say to let it sit for 8 hours. I let it sit for over 24 hours because even after about 12 hours I thought it felt too tacky. The glossy finish and feel were a lot better after a 24 hour period:
But after all that comes the fun part: assembly!
I used distilled water to fill my globe and filled it up about halfway to test displacement with the figure and base to account for overflow as I continued to fill. Once I was at a good level, I added the glycerin and glitter. The glycerin is to give the water a little bit of thickness and allows the glitter to float a bit more. I didn't stir them in and looking back I wish I had. They did eventually become evenly dispersed with the shaking but I think it would have made the assembly a bit easier mainly because seeing Charlie Brown coated in the glitter despite the initial shaking made me stress out that I had messed up the entire project. I also would have added a little bit more glycerin. They suggested 1/2 tsp in the directions but I think 3/4 or even a whole tsp would have been a bit better.Part 5
And one final tip: at first I had some minor leaking from the globe. To fix this, I placed the globe upside down, balancing it in the base, and put a ring of E6000 glue around the edge and let it dry for 24 hours. After this, all leaks were gone. I recommend doing this even if you don't see leaks initially to ensure that you have a tight seal.
After all of that you have a fully functional snow globe! At this point the electronics are really just gravy (but really delicious and magical gravy). The CPE board fits perfectly in the base of my globe and I'm able to fit a battery as well to power it. The lights and sound come thru nicely, but I do have to set the volume to max in MakeCode to have it penetrate the thick by design plastic (because water). I also have the brightness on the NeoPixels set pretty high so that maximum shimmer occurs. Because of all of this, I've had some issues with battery life. Using all of those modules is pulling a higher amperage than I planned so I need to invest in a larger capacity battery. Currently I'm getting about 10 shakes before I notice degradation. When I'm at full power though, the effects are really magical.
Overall I'm very happy with this project. It was fun to get back to my crafty roots and to experiment with MakeCode. I think that this could be a fun way for makers who are a bit hesitant to begin adding electronics to their projects to dive in. If you're making this with kids, I'd recommend having them pick what they want to put in the snow globe and then taking care of the gluing and resin for them so that they can jump back in for the fun globe assembly part without having to wait really long periods of time for things to dry. Also because of time if you're making one as a gift please keep the time frame in mind. You'll need about 3-4 days of drying before it's all set and where you're dealing with water I wouldn't try to rush any of these processes since they all contribute to the stability of the snow globe. And speaking of water, of course anytime electronics are near water there is a small risk so please be smart and be careful. But don't let all of that scare you away because the end result is really amazing.