E-ink is a fascinating technology, partly due to its low power properties. Being able to render an image to a screen and keep in there indefinitely without power is a powerful thing with huge possibilities.
The motivation for this project came initially from a simple desire to work with e-ink. The idea for the project came a little later. I wanted something that could sit in a central location in my flat and persistently display useful information. I didn't want the inconvenience of wires so it had to be battery powered and also I didn't want to charge the battery regularly; every three months or so would be acceptable.
HardwareI chose a 7.5" e-ink screen from Waveshare with a Raspberry Pi HAT. The mainboard I wanted to use was a Raspberry Pi Zero, as I had one spare. In order for the battery to last as long as I wanted I knew I needed a way to turn the Pi on and off at set times. To achieve this I used a Sleepy Pi 2, this is a Pi add-on board for power management with an onboard Arduino for programs.
The battery is a 2,000mAh lipo from Adafruit and I also got a custom made picture frame from eFRAME to house everything in. The battery delivers 3.7 volts but the Sleepy Pi expects 5 volts so I used a voltage regulator to step the voltage up.
SoftwareMy preferred language is JavaScript so that's what I chose for this. I wrote a Node application to pull in the data I needed and also produce a Bitmap image to be displayed on the screen.
I decided on the following data:
- News headlines.
- Tube status for the Metropolitan line and the Jubilee line (the two lines I live near).
- Word of the day - from the OED.
- Crypto currency prices - for Bitcoin, Litecoin and Ethereum
- Weather
For generating the image I used the node-canvas library which is a Node implementation of the canvas element. With this, I also used my own library called Shapely which abstracts away a lot of the complexity of canvas related code.
SetupWhen I finally put it all together, one of the challenges I encountered was a clash of GPIO pins between the screen and the Sleepy Pi. The pin that the screen used for data was the same as the one that the Sleepy Pi used as a signal for rebooting. Causing obvious problems. I resolved this by updating the screen code to use a different GPIO pin, which worked, the only problem is that I can no-longer plug the HAT directly onto the GPIO pins; I have to wire them in individually.
I uploaded a sketch to the Sleepy Pi that instructs the PI to power on for 2.5 minutes every 6 hours. This means the Pi is on for 10 minutes per day and given that the battery is 2Ah this could mean roughly 90 days between charges.
When the Pi powers on, it will immediately run the Node application for pulling in data and generating the image. The screen will then be refreshed with this image; taking about 6 seconds for a full refresh. It will then do a git pull to ensure the code is up-to-date.
ConclusionOverall I'm extremely pleased with how this came out. I keep it in my kitchen, next to my Echo. I glance at it before I leave the house in the morning and have a quick skim of the headline and check the weather. The word of the day is also a really nice addition. The Tube status is possibly not that useful as this is something that can change in a moment, so unless a screen update has just occurred I usually assume the status is out of date.
One thing I particularly like about this device is its unobtrusiveness. It just looks like a framed piece of paper, it has no backlight and doesn't make sounds, it simply sits in the corner autonomously updating itself throughout the day and requires no interaction other than a glance.
Comments