Introduction: Weather Forecast Cloud
This project makes a weather cloud using a Raspberry Pi Zero W. It connects to the Yahoo Weather API and depending on the forecast for the next day changes colors.
I was inspired by the Wisconsin Gas Building that has a flame on the roof that changes depending on the forecast. Its an iconic landmark in Milwaukee, WI.
The following poem goes with it.
When the flame is red, it’s warm weather ahead!
When the flame is gold, watch out for cold!
When the flame is blue, there’s no change in view!
When there’s a flickering flame, expect snow or rain!
I thought a cloud would look nicer on the wall. For the code if the forecasted high for the next day is greater than 10% warmer it will be red, if the forecasted low is more than 10% colder it will be gold. But just in case both criteria are met the color red will always win. If neither criteria is met the cloud stays blue. If there is any rain or snow in the forecast it will blink.
Step 1: Update 2019
It looks like Yahoo has discontinued this API that I used for this. So currently this guide will not work for that portion. More info can be seen at https://developer.yahoo.com/weather/
Step 2: Parts Needed
- Neopixels Strip - 60 LEDS per meter
- Sawtooth Picture Frame Hangers
- 3M SJ5302 Clear Bumpon
- 1/2 in. x 6 in. x 3 ft. S4S Oak Board
- 1/8" Hardboard
- 1/8" Acrylic White Translucent
- 1/8" wood dowel
- Watco Natural Danish Oil Wood Finish also Dark Walnut optional for some of extra clouds
- Wood Glue
- Hot Glue Gun
- Staple gun
- Silicone Cover Stranded-Core Wire - 25ft 26AWG - Red, Black, and Blue
- Raspberry Pi Zero W
- Micro SD Card
- USB Cable White - or cut apart one you got laying around
Step 3: Cutout the Parts
I have included the svg file for cutting these out. As you see there is 4 layers. You may see in the rest of the guide that i have my parts flipped because I had a cut mishap on the top layer and flipped it to hide the blemish.
On layer 2 & 4 there needs to be a 1/8 deep inset between the inner path and middle path. That will allow the diffuser and backplate to be recessed in. I used translucent acrylic for the diffuser and hardboard for the backplate.
This was the preview image on my Shapeoko3 before cutting the parts out. We reuse the inside clouds later in the guide, so don't trash them.
The cloud shape used was from softicons.com since my drawing skills are not as good.
Step 4: Assemble the Cloud
Once the parts are cut you can glue it together, only two pieces need the glue. The 1/8 dowel is then put in the holes to help align. I didn't use any glue in those so I could remove them once the layers are glued together.
Use some clamps to keep the parts tight together while drying. Wipe away any excess glue that spills out from the seams.
While the glue is drying I took the scrap pieces from the inside and sanded them down with 150 grit and then 220 grit. I then applied a wipe on stain. I used Watco Danish Oil in Dark Walnut for some and Natural for the others. With a clean cloth put some stain on and just wipe on the clouds. Set aside and let dry. Make sure to properly hang out cloth to dry so it doesn't combust from the oils.
It is also a good time to stain the top layer. This way you aren't getting stain all over the diffuser later on.
Stain the main cloud
Once the glue is dry you can then sand and stain the main cloud using the natural danish oil.
Step 5: Add the Neopixel Strip
To determine the amount of the strip needed I set it inside and made sure it reached all parts. I ended up using 19 strips. But after gluing realized I should have used 20.
I then removed the rubber sheath around the strip since I didn't need that part. Now I needed to add wires to the strip to attach to the Pi Zero.
I've found it works better if you pre-solder the end on the strip along with the ends of the wire.
Now solder the wires to strip.
With the back inset plate on apply a dab of hot glue to a few spots to hold the NeoPixel strip to the edges of the cloud. Try to keep the strip as close to the back plate as possible. As you can see here I should've used another LED on the strip.
Step 6: Add the Diffuser and Top Layer
Set the diffuser layer in the inset and apply a light amount of glue around the the top.
Now same as before attach the top layer and clamp it down. Make sure to align it to the other layers as best as possible and wipe away in excess glue.
Step 7: Solder It Up
Wiring is pretty simple for this.
GPIO 18 on the Pi to Din Neopixel
5V from Pi to 5V Neopixel
GND from Pi to GND Neopixel
Before soldering the USB cable we need to drill a hole for it. My cord was a tad under 3mm so I drilled a hole using a 3mm bit making sure not to drill in to the neopixel strip.
Cut off the end off that doesnt have the Male end that plugs in to the computer. Then remove some of the shielding to access the wires. We only need the Red(5V) and Black(GND) wires.
Here is how it should look all soldered up.
Step 8: Setup the Pi
First thing needed is a sd card the the operating system loaded. I used Raspbian Jessie Lite.
Use a program such as etcher.io to burn the image to the sd card. Once that is complete we will need to add two files to the boot directory so the pi will have ssh enabled and the correct wifi information.
Open the wpa_supplicant.conf file with a text editor and put your wifi ssid and password in it. Then add the file to the sd card. To enable ssh we just need a file labeled ssh with no extensions put on the sd card also.
A better explanation of this can also be found on this guide at adafruit.com
Connect to Pi
I use a program called putty and SSH in to the Pi. Some documentation on doing this can be found on the Raspberry Pi website.
One difference is there they have you find the IP of the pi. I have found it easier to just use the hostname to connect which is raspberrypi.local
Install libraries needed
First we need pip so run this command
sudo apt-get install python-pip
Now we can install requests.
pip install requests
Next we will install the items needed to use the NeoPixels. These steps are take from a guide titled NeoPixels on Raspberry Pi from the Adafruit website.
sudo apt-get install build-essential python-dev git scons swig
After that we run these commands
git clone <a href="https://github.com/jgarff/rpi_ws281x.git"> https://github.com/jgarff/rpi_ws281x.git > cd rpi_ws281x scons
Then
cd python sudo python setup.py install
Now the required libraries should all be installed.
Get the program on the Pi
I would recommend getting the files from the GitHub repository as the code may change or be fixed at some times. https://github.com/keebie81/Weather-Forecast-Cloud
You can cut and paste the contents into a new file or use WinSCP to transfer the files.
If cutting and pasting you will want to make a new file using this command
sudo nano cloud.py
Then paste in the contents of cloud.py
Once you there you might need to change a few values. If you used a different amount of NeoPixels or GPIO pin
If the amount of NeoPixels used is different change LED_COUNT. Same if the GPIO pin used is different change LED_PIN
Also on line 72 you need the change the location, unless you want the forecast for sheboygan.
Run the code
Once you got your changes made you can test out the code.
sudo python cloud.py
The cloud should light up now and in the terminal window you should see it output what today's high and low is along with tomorrows high and low.
Set to auto run at startup
To configure auto start I followed this guide from the Raspberry Pi website
This is the line of code I added to the rc.local file.
python /home/pi/cloud.py &
Step 9: Finish Assembly
I used a marker to measure and try to find center as best as I could. I then attached the sawtooth hangers and then two rubber bumpers.
To attach the Pi I went back to my trusty hot glue gun and put a dab of hot glue on the back of the Pi and attached it to the back panel.
I used a screwdriver to create a space in the staple.
I then bend the staples over to hold the back plate in.
Finish up small clouds
The small clouds each need a hanger and two bumpers.
Step 10: 3d Printing
I have also included the STL files for if you do not have access to wood CNC machine. The Autodesk Fusion 360 design file is also included. That way you can modify the design to optimize for printing.
Attachments
Step 11: Final Thoughts
This project came out pretty well. I really like the look of the oak compared to the MDF in another project I did. I would have liked to do this with a esp8266 board but my skills with the Arduino IDE and JSON isnt as good as with the Pi.
Some future additions to this project would be a 7 segment display behind the diffuser so it could show the current temperature also.
I have also put the files up GitHub and added code for if you have a Pimoroni Blinkt, Pimoroni Unicorn PHAT or a Raspberry PI Sense Hat

Grand Prize in the
Internet of Things Contest 2017

Runner Up in the
Untouchable Challenge

Second Prize in the
Lights Contest 2017
80 Comments
1 year ago
I grew up in Muskegon, MI and we had the WZZM 13 Weather Ball in Grand Rapids. Basically the same exact thing as the flame you're talking about.
"Weather Ball Blue, colder weather in view.
Weather Ball Red, warmer weather ahead.
Weather Ball Green, no change foreseen.
Weather Ball Blinking Bright, Rain or Snow in sight."
And I strangely had a dream last night about it, weird since I live in Florida now, and wondered if I could use one of my spare Pi Zeros to make a model Weather Ball for local weather.
Ha, so this is just perfect. Thanks for steering me in the right direction.
Question 4 years ago
Hi Keebie
It is very unfortunate that Yahoo's update to its API has caused our little clouds to stop working. Our students really enjoyed this project and we would be interested in contributing to get it working again!
Do you think it would be easiest to stick with Yahoo's API or use another like openweather to save having to rewrite too much?
I see yahoo's API now uses authentication and requires an app to be submitted to them so it looks like changing API's will be a sizable job either way but thought I would start by posting here.
Huge thank you for all your efforts!
4 years ago
It is a cool idea, but
I tried everything but it doesn't work and keep sending me
Un known library adafruit_neopixel
Reply 4 years ago
Sounds like the correct libraries might not be installed. Also it looks like Yahoo removed the API used for this project at beginning of this year. https://developer.yahoo.com/weather/
Question 4 years ago on Introduction
Awesome project!!
I've already bought most of the supplies to build mine, but I just found out the LED strip I got has 4 wire connections. Now I've got no idea of how to build the circuit, can someone give me a little help? haha
Thank you very much!
4 years ago
Hey, could you help me out? I followed it all to a T, but when I try to run the code with sudo python cloud.py I get an error:
Traceback (most recent call last):
File "cloud.py", line 1, in
import json, requests
ImportError: No module named requests
I've verified and reinstalled the requests pip. It shows in "pip list" too.
Any help appreciated!
Reply 4 years ago
Figured it out!
If you're on MacOS/Linux make sure to use the: "sudo easy_install -U requests" command to install instead of "pip install requests" and it'll work like a charm.
Great project.
Reply 4 years ago
Ahh. I had only ever tested it on the Pi
4 years ago
Nice. I like the screwdriver & stapler trick!
Question 5 years ago
Would a cheaper LED strip like the one I've linked work for this project? Thanks!
https://www.amazon.com/INVOLT-Individually-Addressable-Waterproof-Decoration/dp/B072Q93T6H/ref=sr_1_11?ie=UTF8&qid=1520134256&sr=8-11&keywords=WS2812B
Answer 5 years ago
yes
6 years ago
I think you can make it use a battery so it can be recharged and connect to the internet via wifi. to eliminate the wire
Reply 6 years ago
Yes, I could use batteries but then I would need to make it bigger possibly to fit alkaline batteries. Lipo batteries would require an Adafruit powerboost 500c or 1000c to charge. I did not have one at the moment, but lots of un-needed usb cables
Reply 5 years ago
Could this be scaled up in size using your same instructions just maling everything bigger and adding more LEDs inside? Or would things need to be changed?
5 years ago
I have built one of these using a raspberry pi b but I am having some problems with the colour not changing.
I worked out analogue audio was messing with the GPIO ID# right after boot but after disabling that there is still something stopping it from updating, any ideas?
Reply 5 years ago
When you run the program from terminal window does it give any errors? The program should run and print out todays high, low, the weather code for tomorrow, tomorrows high and low. Then once every hour it will rerun that update again.
Reply 5 years ago
Hi Keebie thanks for your reply. I have fixed the problem with not seeing updates it was still to do with analog audio in the end. Disabling the analog audio altogether did the trick.
I am now having trouble selecting the correct location. Trying to show details for this location https://weather.yahoo.com.au/local-forecast/qld/burleigh-heads. Would I be correct in entering as "burleigh heads, au" in cloud_neopixel.py?
Reply 5 years ago
Anyone else built one of these in Australia? Still having a fair bit of trouble getting it to pickup correct location. Many thanks!
Reply 5 years ago
I replied to your uery above. but also from the documentation for the api this is the variables needed for location
The location of this forecast. Attributes:
Reply 5 years ago
You need to enter it as burleigh-heads, qld