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: Parts Needed

Step 2: 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 3: 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 4: 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 5: 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 6: 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 7: 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 8: 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 9: 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.

Step 10: 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

Comments

author
Patel+Darshil made it!(author)2017-07-14

Congratulations on winning IOT Contest!!!!!

author
keebie81 made it!(author)2017-07-17

Thanks!

author
Henry+Page made it!(author)2017-07-14

What are the actual dimensions of the cloud? I know it's 2 inches high but i'm not sure about the width and the length of the cloud? Please may you help me with this?

author
keebie81 made it!(author)2017-07-17

Im measuring about 5.5" wide and 3.4" tall

author
Henry+Page made it!(author)2017-07-16

Does it have to be blue wire?

author
keebie81 made it!(author)2017-07-17

The wire can be any color as long as is soldered to the correct connections

author
WarenGonzaga made it!(author)2017-07-16

Great job buddy!

author
Derpy_Potatoes made it!(author)2017-07-13

This is possibly the coolest thing I have seen regarding weather. I really like that idea, where there are colors that match up with weather. Really smart! Congrats on being a finalist, hope you win!

author
Henry+Page made it!(author)2017-07-05

Would a Laser cutter work?

author
keebie81 made it!(author)2017-07-05

Possibly. Not sure the thickness it can cut. Might need more thinner layers though.

author
Henry+Page made it!(author)2017-07-04

I'm not entirely sure on how i'm supposed to cut the cloud shape out of the oak board. What tool am I supposed to use, etc?

author
keebie81 made it!(author)2017-07-05

I used a shapeoko3 with a 1/8" downcut endmill. You could also use a scroll saw and a sander to clean up the edges

author
RayK39 made it!(author)2017-06-10

I was curious if the power output was strcitly 5v? My LED lights are only 12v and wanted to know a little more about how you were able to power it? Can I hook up the power seperate for the Pi and the Lights? Would that cause me any headaches? Worst case I can buy some 5v LED lights.

Thanks,

Ray Ketcham

author
keebie81 made it!(author)2017-06-12

Seperate power should be ok with the grounds for both shared. What voltage does the signal need to be though for those LED's to change colors. That may be where issues happen, the pi is cutting it close with 3.3v for the signal when at 5v for the LED's. Thats why when use more some guides recommend a level shifter for the signal pin to bring it to 5v

author
doodlebugger made it!(author)2017-06-05

Nice project but I built it using the Adafruit neopixel string which seems to need to be set up differently - anyone else done the same and got it working ?

author
keebie81 made it!(author)2017-06-05

Should be the same. The digital, GND, and 5V pins may be a different order on the strip.

Also I updated the code yesterday. I found some new errors. I added the updated file and also at github https://github.com/keebie81/Weather-Forecast-Cloud

When you run the python program before setting it to run at startup are there any error messages?

author
doodlebugger made it!(author)2017-06-05

Wondering if I've blown the Zero up running the LEDS through the device rather than from a different source (as you showed) - it appears to run ok and gets the weather for my chosen location which I checked watching it on screen. The LEDS come up steady blue with a code 11 which I think should actually cause a flickering blue (rain is forecast) ... I have another Zero so I'll try that but with the supply feeding the LED strip rather than relying on the supply to the Zero - it was only after reading the material on the Adafruit site that I realised what I might have done.

Probably irritating stupidity on my part !!

author
keebie81 made it!(author)2017-06-05

I dont think that would have done it. I also powered mine via the usb when I was testing and had the neopixels soldered to the board. Let me do some tests on my setup when i get home and see if i get it to flicker, the flickering is it changing brightness, may be hard to see when not diffused

author
doodlebugger made it!(author)2017-06-06

The Adafruit site suggests that the Zero supply doesn't have the capacity and also offers a slightly different level shifting power supply for it - I'm running 30 LEDS but guessing that they aren't anywhere near full brightness - the pin-out is ok and I'm not getting errors when it fires up

author
keebie81 made it!(author)2017-06-07

Full brightness would be each one at (255,255,255) none are set that bright. Gold is the brightest at (75,115,0) but that is still quite low compared to full brightness. I found that when at 20 level shifting wasnt needed. A larger project may need it since theres more to travel through for the LEDs

author
doodlebugger made it!(author)2017-06-08

Interesting, I found that LED_FREQ_HZ = 800000 only caused the last few LEDs to flash occasionally, but setting that to 400000 appeared to make it work, at least, the string went to blue but didn't appear to flicker even though the forecast was wet. I did confirm as well as I could that it was picking up the right forecast by changing the towns and then confirming that the data a) changed and b) seemed to resemble the data from other sources. My suspicion is that the operation is a bit subtle - I'm in the middle of trying to hit a deadline for something else but will experiment further next week.

author
Random-Guy made it!(author)2017-06-03

Really cool!, although I would recommend using "Wunderground" instead of Yahoo

author
keebie81 made it!(author)2017-06-03

Why? Yahoo is working well for me and I didn't need to create an account

author
Random-Guy made it!(author)2017-06-04

I find Wunderground clearer and easier to use, but if you find Yahoo more comfortable, I won´t get in your way!

author
keebie81 made it!(author)2017-06-04

Yeah to each there own. Im using openweather for another project since I prefer the way it returns the times. Each service has its pro's and con's depending on the project.

author
binaryben made it!(author)2017-06-01

Love it! My only tiny gripe is used a $10 Pi zero to do what a $2.50 ESP could have done. But seriously still, good work!

author
keebie81 made it!(author)2017-06-01

The Pi Zero was easier for me to use, besides I have lots of them. I can SSH in to it after assembled and update the code if I need to. I am also more proficient in coding using python. The esp can do micropython but it is more involved to setup and I was having issues figuring out the code using the Arduino language.

author
SergioR117 made it!(author)2017-06-02

You can also update the esp code via WiFi. Just look for "OTA update".
Also nodemcu are nice board to start on esp.
Nice project. I would add a rainy cloud with plexiglass stripes below, and one with a sun. And a sun alone... :)

author
keebie81 made it!(author)2017-06-02

I have some parts on order to have a lightning bolt, rain drops, or snow flakes pop out below the cloud. along with a seven segment display to show current temp

author
diy+by+griggsy made it!(author)2017-06-03

Absolutely love the design of the cloud, it is really cute and minimalistic

P.s. Could you post an add-on with how to add the seven segment display :)

author
keebie81 made it!(author)2017-06-03

Its on the list, I just got a display and some servos for some additional features

author
mrw122015 made it!(author)2017-06-03

Very Cool and Unique! Good Work!

author
singingbadger made it!(author)2017-06-02

very cool! we had a similar macro on the Hancock Tower in Boston in the 70's, but it must have been somewhat lower tech. I also used to make low-tech (no tech?) versions using cobalt chloride solution on paper or felt - they didn't blink, but went pink for fair, blue for precipitation, and violet for change.

author
laith+mohamed made it!(author)2017-06-02

Lovely work

author
HerrRouge made it!(author)2017-06-02

This is just cool. Favorited!

author
Dustin+Bess made it!(author)2017-06-01

any video of it in action?

author
NepgearGo made it!(author)2017-06-01

Nice.
One suggestion: you can add a USB charger or 120v/240v to 5v transformer into the cloud and have it hardwired into the wall like a wall light to make it feel more permanent.

author
jec0435 made it!(author)2017-06-01

So uh, what did you use to cut out the clouds? I don't see any info on how that was done? I'm guessing a laser cutter? (which most of us probably don't have). Your cuts looks far better than a jig saw could do I'm guessing. ;)

author
thor58 made it!(author)2017-06-01

You could use a scroll saw for that and after the layers are glued up: good old sandpaper.

author
keebie81 made it!(author)2017-06-01

yeah, my scroll saw skills arent very good yet. Still practicing, I also wanted to finish this in the weekend so I went with the easiest method I have.

author
keebie81 made it!(author)2017-06-01

Sorry, I kinda glossed over that a bit. I used a shapeoko3 to cut these with a 1/8" endmill. I will see about updating that. I need to cut some more so I will see about some photos to add with

author
heIIo made it!(author)2017-06-01

I, too, made a weather beacon based on the Wisconsin Gas Building. Details of build and source files may be found at http://fh.io/ambient-weather-beacon/

beacon-banner.jpg
author
keebie81 made it!(author)2017-06-01

Nice!

author
thor58 made it!(author)2017-06-01

Other than for the wood, what are the costs?

author
keebie81 made it!(author)2017-06-01

10$ for Pi Zero W

30$ for LED's, comes with around 240 LED's on strip. So plenty extra for other projects. A 5$ pimoroni blinkt might also work, havent tested in the case yet to see if it is enough color

16$ for translucent white acrylic 12"x12" sheet

7$ for the oak wood at home depot

5$ for hardboard

8$ish for the stain

then theres the small items such as wire, glue, picture hanging parts(can be salvaged from an old frame), old usb cable

Tools used could be a wood cnc mill or a scroll saw, sandpaper to sand.

author
thor58 made it!(author)2017-06-01

Great!
Thank you.

author
Essienutis+ made it!(author)2017-06-01

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

author
keebie81 made it!(author)2017-06-01

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

author
Debiuk made it!(author)2017-06-01

I just visited The PiHut (UK) and the new model of the Raspberry Pi Zero W now comes with built in WiFi and Bluetooth. Would this mean you could make this and connect wirelessly? Like others, I am not keen on the cable.

author
keebie81 made it!(author)2017-06-01

It is using the wifi. The cord is just for power. I did not have a chance to test my lipos to see how long it would last. You can alter the code to use less neopixels and lower brightness to also conserve battery