Steampunk Weather Monitor

I wanted to build a weather monitor on my own for a long time. When I saw the epaper displays from Waveshare I thought this would definitely be the way to go. This instructables describes how to build a weather monitor with an epaper screen and a Raspberry Pi Zero W underneath the hood. The weather data is gathered from Openweather.org.

Step 1: The Hardware

For this project I used the following components:

  • 1 Raspberry Pi Zero W for 17.76€ on Exptech.de
  • 1 SanDisk Micro-SD card 16GB for 7.99€
  • 1 Waveshare 7.5inch e-paper display for 47.11€ on Exptech.de
  • 1 Waveshare Universal epaper panel driver hat for 6,75€ on Exptech.de
  • 1 picture frame for 10cmx15cm pictures with 2cm depth to place the electronics inside
  • 1 USB cable + USB power supply
  • some nice steampunk accessories like gears and tin corners from your local craft store

The overall cost should be around 85€.

Electronics

Putting the hardware together is pretty straight forward. The panel driver hat comes with female headers so you need to place male headers on the Raspberrys GPIOs before you can place the panel driver hat on it. Connect the panel driver hat to the e-paper display with the flat cable. Further instructions on installing the driver hat can be found on the Waveshare Wiki.

Picture frame

Use the glue gun to place your steampunk elements on your frame. After that take the cardboard and the cover out. You will need to adjust the size of the cover to fit the display. Use a pencil and a set square to draw the new borders. Cut out the new frame with a scalpel or a cutter. Use some sticky tape to place the display centric to the cover. Now put cover and display back inside the frame. Put the cardboard back in place and thread the flat connection cable between the cardboard and the wooden frame to the backside of the frame. At last add a deepening for the cable by using a grasper. Connect the USB cable with the Raspberry and fixate it in the deeping with hot glue.

Step 2: The Software

Install Raspbian

Download the current Raspbian version from https://www.raspberrypi.org/downloads/raspbian/ and install it on the micro sd card. Installation instructions can be found on Raspberrypi.org.

A very painless way to uploadr your image to the SD card is to use Etcher.

Enable SSH and Wifi

In order to access your Raspberry from your computer you need to enable SSH and WIFI. For this you first need to take out your SD card of your computer and put it back in so it gets remounted. Now you should see a new USB device with a /boot directory. Create a new empty file called ssh in the /boot directory. This enables SSH support for the Raspberry. To enable and configure WiFi you also need to create a file called wpa_supplicant.conf. Add the following lines to this file:

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant
GROUP=netdev
update_config=1

network={
ssid="WIFI_SSID"
scan_ssid=1
psk="WIFI_PASSWORD"
key_mgmt=WPA-PSK<br>
}

Adjust the WIFI_SSID and the WIFI_PASSWORD to your needs.

Now place the sd card in your Raspberry and power up. For further instructions on headless Raspberry setup have a look at Taron Foxworth' blog post about Getting Started with the Raspberry Pi Zero W without a monitor.

Install the necessary software

Now SSH into your Raspberry Pi. On Linux or Mac just bring up the terminal and type the following command. If your on Windows you will need to use Bash or Putty for this.

$ ssh pi@raspberrypi.local

You will be asked for a password. The default password for the Raspberry is raspberry.

Now we need to install some software. We will need Python3 and the Python package manager pip. Also some additional fonts.

$ sudo apt-get update<br>$ sudo apt-get upgrade

$ sudo apt-get install -y python3 python3-pip python3-smbus python3-serial python3-dev
$ sudo apt-get install -y fonts-freefont-ttf wiringpi git<br>$ sudo pip3 install pillow requests

The next installation steps for the Waveshare display components are a bit tricky. Please follow the official instructions in the Waveshare wiki.

Run the weather script

Clone the weather script from Github.

$ git clone https://github.com/stlehmann/rpi_epaper_weatherstation.git weather
$ cd weather

Now we are nearly there. We just need to set some environment variables that tell the script which location we want to get the weather information and which API key to use. The API key is needed to access the weather information on OpenWeathermap. You can obtain one by registering to Openweathermap.org.

$ export OWM_LOCATION="Berlin,de"
$ export OWM_API_KEY="yourapikey"
$ python weather.py

This should start the script and after a while you should see the weather information for your location on the display.

Share

    Recommendations

    • PCB Contest

      PCB Contest
    • Epilog X Contest

      Epilog X Contest
    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest

    10 Discussions

    1
    None
    Sascha PeterB

    13 days ago

    Hey I did the exactly same Thing. What refreshtime have your Display? Mine (waveshare Black White and Red) was around 4-7 seconds. And is it possible to refresh a Part of the frame in a short er time? Maybe you figured out such Update mechanism.

    2 replies
    0
    None
    MrLeehSascha PeterB

    Reply 12 days ago

    I update the display every 5 minutes. The refresh takes approx. 2 seconds. The 3 colors display takes much longer than the black/white display. That is why I decided for the black/white display. I didn't discover a way to refresh only a part of the frame. This would indeed be a great improvement. Let me know if you find out about it.

    0
    None
    Sascha PeterBMrLeeh

    Reply 12 days ago

    Ahh ok, that will be the difference. Yeah when I figured out s.th. To Update partial sections then I will share this to you.

    1
    None
    HollyMann

    24 days ago

    Looks awesome! Great job. I have a rasp. pi but it is being used already - retropi for gaming. I love how your instructable turned out.

    2 replies
    1
    None
    MrLeehHollyMann

    Reply 23 days ago

    Thanks for your kind comment. Happy you like it. Having one Raspberry doesn't keep you from getting another one, though :)

    0
    None
    HollyMannMrLeeh

    Reply 23 days ago

    So true!!! :) Your instructions are very helpful. My only issue is my wifi and internet in general is horrible. I only have 550kbps dsl that i cant use. And I have satellite internet that is barely 1mb...so I dont know if I can add another device to it without issues...but it would probably be fine. :) We will see. Maybe I will do this in the future.

    0
    None
    emilyboda

    Question 24 days ago

    I am making something *exactly* like this at the moment. When you put the screen in the picture frame, did you worry about bending the flexible circuit board attached to the screen? The Wiki it seemed to caution against that, but if I can't bend it I'm going to need a really large picture frame to fit the screen into.

    How long have you had the project like that and has being the flexible circuit card caused any issues for the screen?

    3 answers
    0
    None
    MrLeehemilyboda

    Answer 24 days ago

    Honestly, I didn' t worry about the flat cable too much. If you bend it carefully it is fine. Just make sure not to bend it around hard edges.

    0
    None
    emilybodaMrLeeh

    Reply 24 days ago

    Thanks for the heads up! This makes my life a lot easier :) Another question: when you were testing did you screen ever come up with a bunch of static when you were refreshing things? There was a point where every time I tried to clear the screen it would come up with a bunch of black and white dots making a static-y pattern. I think it may have been because I was refreshing the screen to frequently (like once every couple minutes).

    0
    None
    MrLeehemilyboda

    Reply 23 days ago

    Refreshing the screen every couple of minutes should be fine. I'm refreshing every 5 minutes. No problems so far. Only the typical: screen goes black and white before refreshing. But at the beginning it didn't work at all. I had to double-check the connection cable to make it work. Does you pattern disappear after the refresh?