0

$USD

$USD
PROJECTS IoT

E-Paper Weather Display With Photon and IFTTT

DFRobot Aug 27 2017 1416

If you have an E-Reader such as a Barnes & Noble NOOK or an Amazon Kindle then you're already familiar with e-paper. The e-paper display on your e-reader is what allows you to read it in direct sunlight without any glare. However, you also know that the e-paper screen takes a really long time to update. This means that you can't use it for gaming, but it's perfect for providing you with timely weather information wherever you need it! This super-simple project creates just that with minimal assembly and coding time. Let's dive in!

 

Step 1: The Parts!


 

This project has only four components, all of which can be obtained from DFRobot. Check 'em out below:


Other than a computer, this is literally all you need. Both the Photon and E-Paper display are highly integrated components, meaning that they need very little external support hardware to function. Go embedded systems! The display actually has its own integrated 32-bit microcontroller as a driver - this is part of the reason why it has a somewhat large price tag as compared to other displays.

 

Step 2: Assembly


 

Assembly is a piece of cake. The connections are as follows:

E-Paper -> Photon
1. RST -> Unconnected
2. Wake_Up -> D2
3. DIN -> TX
4. DOUT -> RX
5. GND -> GND
6. VCC -> 3V3


There is some setup for your Photon that you need to do. Particle provides a great resource for this that you can check out here: https://docs.particle.io/guide/getting-started/start/photon/
That's it! Now let's move on to flashing your SD card with the required images for this project.

 

Step 3: Preparing Your SD Card

I'm going to preface this part by saying that if you really don't want to use an SD card, you don't have to. The display has a few MB of memory that you can use to store images. However, the program that allows you to load in these images is a bit, well, janky. I had a really tough time getting it to install on Windows 7, Windows 10, and macOS in wine bottler, so I decided to just give up and use the SD card. Here's how you can prepare yours:

Plug your micro SD card into the provided adapter and plug it into your computer.

If you're on Mac you can utilize Disk Utility to easily format your card into the required FAT32 format. Name the card whatever you want. I'm sure Windows has a comprable program for formatting SD cards. If your card is new, it's also likely that it's already in FAT32.

Download the .zip file linked in this step, and extract it. Load all those bitmaps onto the SD card, eject it, and put it in your display. You should now be good to go!

Making your bitmap images in the correct format for the display is a little bit of trial and error. If you would like a tutorial on it let me know and I can create one. The biggest thing to remember is that the white pixels are actually the ones that are black on the display, and vice-versa.

 

Step 4: IFTTT: Get Connecting!

 

The way your Photon will be getting weather information is from IFTTT. This mainly out of laziness on my part; IFTTT + Photon is practically a thing of magic and works with an extremely minimal amount of setup. I won't be explaining the process of signing up for an account or connecting the Particle service to your IFTTT account - Particle already has great documentation.

The basic flow for IFTTT is that Weather Underground sends data to your Photon at the same time every morning. This is done in two separate applets - one that sends over the high and low temperature information, and another that sends over the condition information.

If you don't already have it, add the Weather Underground service to IFTTT. It will ask you a bunch of questions that help it to deliver accurate weather information.

Now click the button to create a new applet. Choose Weather Underground as the service, and select Today's Weather Report as the trigger. Set the time to whenever you want your Particle to receive weather information each day. Select create trigger, then choose Particle for the "then" part of your applet. Select publish an event.

The name of your event should be something unique that no one else is likely to use. If it isn't unique enough, you will get events from other peoples' services. We'll be sending over the temperature information in this applet, so have it include something about temperature. A possibility could be "NewTemperatureInfoUpdate."

In the data field you need to use exactly what is shown in the above photo. This is, not including the quotes, "{{HighTempFahrenheit}},{{LowTempFahrenheit}}". If it is not exactly like this then your particle won't be able to process the incoming data. Lastly, change the event type to public, and create the applet.

This is only half of what needs to be done. You also need to create the applet that passes the condition information. The Weather Underground part is exactly the same. Create a new applet, and setup the Weather Underground service section in the same way. Choose Particle again for the "that" section, and select publish an event. It's the same deal for the name of your event. Make it unique, and something that has to do with condition. A possibility could be "GotNewConditionInformation"

In the data field of your event you need to have exactly the following (without quotes): "{{TodaysCondition}}". Press create, and you should be all set with IFTTT.

 

Step 5: Flashing Your Particle

 

Luckily for you I did all the complicated setup to get the E-Paper display to interface correctly with your Photon. All you need to do is click on this link and copy the Particle Build app: https://go.particle.io/shared_apps/5995bb8f077992ee5d000c79
Once the app is copied to your Particle account you can perform the final setup. The only parts of the code that you need to change are lines 30 and 31. Change the name of the event to be the event that you created inside of IFTTT, and you're done! Flash you Photon and with any luck the above screen should appear.

Once the set time of your applet passes the display will update with the correct weather info. To make this update interval more frequent all you need to do is create more applets with the same event name. The clock will update every minute automatically. To change the time zone you need to configure line 26 with your UTC offset.

 

Step 6: Final Thoughts

You can mount the display however you like. As shown in the video at the beginning of this tutorial, I glued my Photon to the back of my display. This has the added benefit of acting as a little kickstand to prop up the whole project!


If you have any questions don't hesitate to comment below.

 

This project is made by Alex Wulff, a very talented electronic engineer, the original post is here.

 

More Particle Photon Projects: