How to Create a Cool Weather Forecast Cloud with Raspberry Pi

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

How to Create a Cool Weather Forecast Cloud with Raspberry PiMAKER:keebie81/Translated by: Fun Without End

Wouldn’t it be cute to have a colorful cloud in your bedroom? Just like a sunshine doll, it tells you today’s weather. The cloud is built on Raspberry Pi Zero W, connected to the Yahoo Weather API to get weather information, and then changes colors to indicate weather changes.

I think hanging the cloud on the wall at home would look very nice.The color changes of the cloud represent the following weather information:

  • If the temperature the next day is 10% higher than today, it will turn red.
  • If the temperature the next day is 10% lower than today, it will turn gold.
  • If both conditions are met, it will remain red.
  • If neither condition is met, it will remain blue.
  • In case of rain or snow, it will blink.
Friendly reminder: The Yahoo API used in the project may be interrupted. So keep an eye on updates. More information can be found at:https://developer.yahoo.com/weather/

Materials List

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

Raspberry Pi Zero W × 1, Micro SD card × 1, USB cable (white) × 1, Neopixels LED ring (60 LEDs/m) × several serrated frame hooks (double holes) × several 3M adhesive feet × several 1/2″ S4S oak boards × several 6″ S4S oak boards × several 3″ S4S oak boards × several 1/8″ hard fiberboards × several 1/8″ white translucent acrylic boards × several 1/8″ wooden dowels × several Watco wood finishes × 125ft 26AWG red wire × several 25ft 26AWG black wires × several 25ft 26AWG blue wires × several wood glue × 1 hot glue gun × 1 stapler × 1

Cutting the Cloud

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

All cutting templates are in the svg file. As shown in the figure, the cloud has a total of four layers. In the second and fourth layers, there are 1/8″ deep recesses between the inner path and the middle path.

This is to embed the diffusion layer and the back panel. The diffusion layer uses translucent acrylic boards for light diffusion, and the back panel uses hard fiberboard.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

As shown in the figure, this is a preview image on Shapeoko3 before cutting. It will be reused later, so please keep it.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

The source of the cloud shape:http://www.softicons.com/web-icons/vector-stylish-weather-icons-by-bartosz-kaszubowski/cloud-icon

Assembling the Cloud

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

1. Glue the cut components together, just need to glue the two middle layers together.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

2. Insert 1/8″ wooden dowels into the holes for alignment. The dowels are not fixed with glue, so once used, they cannot be removed freely.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

3. While drying, use clamps to hold the components together and wipe off excess glue.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

4. While waiting for the glue to dry, I removed the components from the inside and sanded them first with 150 grit sandpaper and then with 220 grit sandpaper. After wiping clean, I used deep walnut wood finish to brush the surface, making it smooth and keeping it dry.

This is a good time to paint the top layer without dirtying the entire diffusion layer.

5. Paint the main cloud. After the glue dries, sand and paint the main cloud with wood finish.

Installing the Neopixel LED Ring

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

1. Place the light strip in the cloud to determine the required length, ensuring the light strip covers the entire cloud. After measuring, nineteen light strips are needed, considering the parts to be glued, it is best to leave some length, finally twenty strips were used.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

2. Remove the rubber protective tape around the light strip, then add the wires to the power strip to connect to the Raspberry Pi Zero W.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

3. It is better to solder the ends of the wires to the ends of the light strip in advance.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

4. Solder the wires to the light strip.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

5. Apply a little hot glue on the back panel to secure the NeoPixel light strip to the edge of the cloud. Try to make the strip as close to the back panel as possible. As shown, I should use another LED on the light strip.

Installing the Diffusion Layer and Top Layer

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

1. Place the diffusion layer in the position shown in the figure and apply a small amount of glue around the top.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

2. Secure the top layer. Make sure it aligns as closely as possible with the other layers and wipe off excess glue.

Soldering

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

1. As shown, the wiring method is very simple.

Connect GPIO pin 18 of the Raspberry Pi to Din Neopixel, connect 5V of the Raspberry Pi to 5V of Neopixel, and connect GND of the Raspberry Pi to GND of Neopixel.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

2. Before soldering the USB wire, you need to drill holes for it. My wire is 3mm thick, so I used a 3mm drill bit to drill the hole, making sure not to drill into the neopixel light strip.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

3. Cut off the end of the male head that is not plugged into the computer. Then remove some unnecessary wires. The project only needs the red wire (5V) and the black wire (GND).

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

4. The appearance after soldering is complete.

Setting Up the Raspberry Pi

Download the operating system to the SD card. I used:https://www.raspberrypi.org/downloads/raspbian/

Use the etcher.io program to burn the image to the SD card. Once done, add two files to the boot directory so that the Raspberry Pi can enable ssh and provide the correct wifi information.

Open the wpa_supplicant.conf file with a text editor, enter the SSID and password of the wifi. Then add the file to the SD card to enable ssh. We need to create a file labeled ssh since the SD card has no extension.

You can refer to the specific details at:https://shumeipai.nxez.com/2017/09/13/raspberry-pi-network-configuration-before-boot.html

Connecting to the Raspberry PiUse putty and SSH programs in the Raspberry Pi. You can visit the following website to find the relevant operation documentation.

https://shumeipai.nxez.com/2013/09/07/using-putty-to-log-in-to-the-raspberry-pie.html

The only difference is that you can find the IP of the Raspberry Pi. I found it easier to connect to the host using raspberrypi.local.

Installing Required LibrariesInstall pip by running the following command:

sudo apt-get install python-pip

Install the requests module:

pip install requests

Next, install the projects required for NeoPixels. The instructions for these steps come from:https://learn.adafruit.com/neopixels-on-raspberry-pi?view=all#software

sudo apt-get install build-essential python-dev git scons swig

Run the command:

git clone https://github.com/jgarff/rpi_ws281x.git
cd rpi_ws281x
scons

Next step

cd python
sudo python setup.py install

Now, all required libraries are installed.

Deploying the Program on Raspberry PiGet the files from the GitHub repository:https://github.com/keebie81/Weather-Forecast-Cloud

You can cut and paste the content into a new file or use WinSCP to transfer files:https://winscp.net/eng/download.php

If you need to cut and paste, use this command to create a new file.

sudo nano cloud.py

Then paste the content into cloud.py.

Next, you may need to change some values if you used a different number of NeoPixels or GPIO pins.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

If the number of NeoPixels used is different, change LED_COUNT. If the GPIO pin used is different, change LED_PIN.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

On line 72, you need to change the location if you used sheboygan to predict the weather. After running the code with changes, you can test the code.

sudo python cloud.py

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

Now, the cloud should light up, and in the terminal window, you see it outputting today’s and tomorrow’s highest and lowest temperatures.

Setting to Run Automatically on BootConfigure auto-start by adding the following code to the rc.local file.

python /home/pi/cloud.py &

Download the required code from the project file repository.https://make.quwj.com/project/232

Completing the Assembly

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

1. Use a marker to find the center and make a mark. Then, I installed the serrated frame hooks and two rubber pads in place.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

2. Use hot glue to secure the Raspberry Pi in place. Put a small amount of hot glue on the back of the Raspberry Pi and then attach it to the back panel.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

3. Leave space for the staples with a screwdriver.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

4. Fix the bent staples to the back panel.

How to Create a Cool Weather Forecast Cloud with Raspberry Pi

5. Add hooks and two rubber pads to each cloud, and all the clouds are complete.

3D Printing

If you do not have access to woodworking CNC machines, STL files are provided below. Including design files from Autodesk Fusion 360. You can also modify the design and optimize the print. Download the STL files from the project file repository.https://make.quwj.com/project/232

Author’s Afterword

I originally wanted to use the esp8266 development board to implement this project, but my skills in Arduino IDE and JSON are not as good as those of Raspberry Pi. In the future, this project will add some features, such as displaying the current temperature on a seven-segment display behind the diffusion layer.

I will place the files on GitHub and add the code, so if you adopt Pimoroni Blinkt, Pimoroni Unicorn PHAT, or Raspberry PI Sense Hat, you can use it.https://github.com/keebie81/Weather-Forecast-Cloud

Source: Fun Without End

Recommended Reading

Is TSMC really an “American ally”?

What kind of company is ARM?

Harbin Institute of Technology and Harbin Engineering University banned the “engineering artifact” MATLAB, the impact of the US entity list deepens on campus

4 statements! 3 reversals! The Arm China leadership change storm is still ongoing

The mystery of Arm China’s leadership change: Is the head Wu Xiongang reported?

How to Create a Cool Weather Forecast Cloud with Raspberry Pi
Focus on industry hotspots, understand the latest frontiers
Please pay attention to EEWorld Electronic Headlines
http://www.eeworld.com.cn/mp/wap
Copy this link to the browser or long press the QR code below to browse
How to Create a Cool Weather Forecast Cloud with Raspberry Pi
All the following WeChat public accounts belong to
EEWorld (www.eeworld.com.cn)
Welcome to long press the QR code to follow!
How to Create a Cool Weather Forecast Cloud with Raspberry Pi
EEWorld Subscription Account: Electronic Engineering World
How to Create a Cool Weather Forecast Cloud with Raspberry Pi
EEWorld Service Account: Electronic Engineering World Welfare Society

Leave a Comment

×