Now you can take a little piece of the outdoors and place it on your nightstand. The Storm Glass actually recreates the weather conditions outside to give you a weather forecast for the day. It does this by checking the weather periodically online, and if it's a rainy day you can expect to see some rain falling in the Storm Glass Lamp. If it's partly cloudy you should see some clouds forming and some sunshine interspersed here and there.
This project was inspired by the open tempescope, but it was adapted for off-the-shelf parts. An added bonus is that it costs much less too.
The Storm Glass lamp is powered by a $10 Raspbery Pi Zero W micro-controller which has built in wifi to check the weather, and some IO pins that allow you to control the various parts. Ready to dive in? Here is what you need to get started:
- Raspberry Pi Zero W (Make sure it has the W for wifi and Bluetooth support)
- Speaker Bonnet from Adafruit for easy connection and sound
- Glass water bottle
- Mini ultrasonic USB diffuser/humidifier
- Mini 5V water pump (Brushless for quiet operation.)
- 12 Neopixel LED ring
- 2.5 amp micro USB power supply
- 4GB Micro SD card or greater
- Two TIP 120 transistors
- Two 2.2K resistors
- Lots of hot glue
- Tubing for moving water about
- Some 3D printed parts
All the parts run off of 5v so no power converters are required, and it conveniently can be controlled via the raspberry pi. In-all it shouldn't cost more than $80 in parts.
Step 1: Print the Parts
I designed a base where we can house the Raspberry Pi microcontroller as well as some speakers for sound. It also holds a microphone and the extra electronics that we put together for the motors to interface with the Raspberry Pi. (More on that later.)
We also have a bottom cap with the integrated supports to hold the speakers and electronics in place. It press fits into the bottom of the base, and it has an allowance for the power cord to route through.
The top cap press fits over the glass bottle. This part is critical as it contains all the holes for the water to flow out of to produce the rain effect. It also connects to the tube which brings the water up to the lid. It does need to be removable to fill it up with water as needed.
We also have the second glass cap that does quite a lot. It is the main body that houses the ultrasonic diffuser, the lights, a small water reservoir, the holes for the drainage and the rain tube, and on the bottom it interfaces with the pump. It also press fits into the body which allows you to assemble the glass and then press it all together without screws.
In total there are five printed parts. The two glass bottle lids, the base, the bottom cap and a small retaining ring that is used to hold the ultrasonic mister into place.
Step 2: Sanding and Finishing
For finishing I used a belt sander to remove all the 3D printed ridges from the parts. Then I gave them a finish sanding by hand. After a few coats of paint it really started to look great. Unfortunately, I sprayed an acrylic finish over it and for whatever reason it bubbled a lot so I ended up sanding some of it off. Either way I got my parts and I was happy enough with them so on to the next step!
Step 3: Connect Electronics
Don't let the wires fool ya. This really isn't as complicated as it looks. We have the raspberry pi with the IO pins. The speaker bonnet plugs right into those, and it conveniently has all the solder points on it for easy soldering of the other components.
The Neopixel LED ring was connected first. It requires a positive 5V as well as a ground connection and a signal connection that has to be connected to a PWM enabled pin. I used pin 13 because it uses a separate channel from the speaker bonnet. (More on this later.)
The LED neopixel lights are a lot of fun to work with. These lights can be programmed to display any color and animation you could imagine. They also put out a descent amount of light. Seriously, don't stare too long it kind of hurts.
Then you just place the LED ring and the diffuser into their corresponding places. Don't forget to cut a little piece of foam to act as a wick for the diffuser. (I just used some felt rod and shoved it into the little hole under the diffuser.) I also poured some hot glue on top of the LED ring to water proof it. I also used the heat gun to re-melt it and get the glue to flow better. Then I pressed the diffuser retaining ring into place.
It's not really good practice to connect things directly to a raspberry pi, but since it's just $10 I thought I would give it a try. From what I read connecting to the 5v DC and GND on the Zero is like connecting directly to the power supply. The Pi Zero does not have the same voltage regulation and protection that the others do. I calculated that the setup would pull about 2.5 amps so we are really running at the limits of the Raspberry Pi and the power supply.
With that said, the rain pump and cloud generator need to be controlled by one of the output General Purpose Input Output (GPIO) pins which only output 3.3V so we need to amplify that signal by using a transistor. I used a TIP 120 Power transistor to switch the higher 5V on and off. (Notice I used a 2.2K resistor on the base for each GPIO pins on the Raspberry Pi Zero.)
You definitely want a resistor here our you may draw too much current from the output pins permanently damage them. It's also probably a good idea to put a diode on the pump motor to eliminate any voltage spike from flowing back into the GPIO pins. I also had some problems with the ultrasonic driver board which sometimes caused some interference. I tried bridging the power leads to the board with a ceramic capacitor with great results. I admit I omitted the capacitor on the cloud generator and the diode for the pump in the final build, but I would recommend you at least consider adding them. Then again if something burns up it's just $10 bucks. I know, I know, sometimes I like to live on the edge.
The rain maker is a tiny 5v centrifuge pump I got online, which pumps water along some glass tubing and into the lid where the rain fall from. I simply used copious amounts of glue to hold it in place under the bottom cap which houses the water reservoir. I then soldered the leads to the motor to the +5 V on the speaker bonnet, and then the ground was soldered onto the small transistor board I put together. I kept getting small leaks so I just glued the whole motor on as well as the tubing that connects to the top.
The cloud generator is an USB powered ultrasonic diffuser/humidifier. I just pulled out the guts and got rid of the rest. Make sure to keep the electronics which create the ultrasonic signal which drives the diffuser. I connected the positive and negative on the ultrasonic driver board to the +5v on the speaker bonnet and the ground was soldered onto the small transistor board just like the rain pump as shown in the schematic. I then un-soldered the leads to the piezo transducer on the humidifier and used an older headphone wire to wire it up along with the Neopixel ring so that I had plenty of wire length to work with.
Then to keep things from shorting out I used some heat shrink tubing to encase the transistor and electronics as well as the ultrasonic driver PCB for the cloud generator.
Now pat yourself on that back that was the longest and hardest part of the build.
Step 4: Put It All Together
Here is where it all comes together. First there is a little prep work that we need to do. Harvest the water bottle glass. The water bottle is perfect for this project because it has a nice glass container where the weather can be housed. The caps just unscrew and you now have a nice glass container.
Now that we have the parts in order we can put it all together like so:
- Glue the bottom end cap onto the glass container (We assembled this in the previous step)
- Place the glass tube into the corresponding holes where the pump is connected
- Carefully line the top cap up with the tube and press fit it into place. (We still need to add water so don't glue it just yet)
- Connect the speakers and the USB microphone
- Feed the electronics through the base
- Press the glass tube into the base
- Carefully tuck in all the electronics and wires onto the bottom cap
- Press the bottom cap into place while making sure to run the power wire through the slot at the base
- Open the cap and fill it up with water then close the cap
- Go make yourself a delicious sandwich (you deserve it) and the excitement begins!
Step 5: Programming and More
I am not going to run you through how to install Raspbian on the Pi. There are already a number of tutorials for that. Like this one: https://www.raspberrypi.org/documentation/installa...
Once you are set up with the Raspbian you can write python scripts and run them. I won't go into the details here either since it is already well documented online.
Then it's time to write and run our script. You will need an API key from weather underground. You can get that here: https://www.wunderground.com/weather/api/
Once you have your API key add it to the appropriate place on the code that I have attached. You will also need to fill out your location as shown in the script.
This is a very basic script that just pulls the weather from weather underground. Then it runs the corresponding weather function to simulate the weather in the weather cube.
This is just a start. Truth is I am new to programming and this is my first attempt at anything like this. I used bits of code from here and there as well as my own custom functions. If you have a better way of doing this please let me know so I can post it and pass it on. Make your own custom animations and add more weather options. With the integrated speakers you could also eventually add effects like thunder clap when the lightning goes off etc.
I also have the Alexa digital assistant installed so I can connect to home automation or internet of things (IoT) devices. Check out my other instructable on how to do that.
Since it has bluetooth and wifi on board you could also connect to your smartphone, play music, or anything else you could imagine. Maybe once I get better at programming I can add this functionality and post it. For now we have a weather simulation lamp that is pretty cool in it's own right.
Step 6: Enjoy the Weather
If you've made it this far then it's time to enjoy the fruits of your labor. Sit back, put your feet up, and relax while you watch the sunset in the comfort of your own home!
Until you see it in person you simply won't get the full effect. The pictures really don't do it justice. Here are a sampling of various weather conditions:
Lightning Storm, Rain, Sunny, Partly Cloudy, Sunset, Sunrise, etc.
This thing is stunning, and I really enjoy watching it!
A few things I learned or that I would recommend:
- Instead of running constantly I should have programmed it to run for 15 minutes each hour to tell me the current weather.
- It may be good to add a tiny bit of alcohol or something to keep algae and other disgusting creatures from growing in the lamp.
- It may be good to apply some rainx or something like it to the inside of the glass. It takes quite a while for fog and rain to clear from the glass.
- For whatever reason I am unable to use the Alexa assistant when the weather is running. The assistant responds, but the sound it quite terrible. (I believe it is interference with the PWM for the LEDs even though I used a separate channel)
- I would like to add snow, and I think I could use the double glass wall to incorporate a saturated crystal solution to do that. I will post it when/if I get it working.
If you like my project please consider voting for me in the lights contest!