Pi Zero ePaper Badge

This is a quick project I cobbled together only days before the Pi Party. It’s an epaper badge showing my name and information, but also a slideshow of my recent Pi projects.

Hardware

The following hardware components are used in this project:

Because the Zero LiPo is not stack-compatible with the PaPiRus display (the JST connector bumps into the RTC battery), I soldered the power connection to the Pi Zero using some ribbon wire. A switch connected to the Zero LiPo’s EN and GND pins makes it possible to turn the power on and off without having to disconnect the battery.

A 3D printed plate allows me to fasten all components using spacers, and includes two “ears” with rings to attach a lanyard to. A slot at the top prevents the backside of the GPIO pins from bumping into the plate and some slots at the bottom are used to fasten a battery using zipties or velcro straps.

The 3D model for the plate can be found on thingiverse: http://www.thingiverse.com/thing:2175935

Software

As with most projects, the Pi needs to be set up first. I’ve written a guide on how to do this easily without the need to connect a screen or keyboard: Headless Raspberry Pi Setup with Raspbian Jessie

Once the basic setup is taken care of, a few additional things need to be done. The first one is to enable SPI and I2C. This can easily be done using the “raspi-config” utility, and using menu 5 “Interfacing Options”.

Next, is the installation of the PaPiRus software, which has improved quite a bit since the last time I used it. Only two commands are required:

  • installation of the software:
  • configuration of the display size:

Finally, to be able to display images on the PaPiRus, some conversions are required. GIMP can make these conversions easily and is available for free for Windows, Linux and OSX. I found the “threshold” function to be the best way to create a good black and white image.

Following steps need to be taken:

  • resize images to resolution of display: 2.7″ = 264×176
  • use threshold function to find the right balance between black and white (Colors > Threshold)
  • convert to 1-bit color scheme (Image > Mode > Indexed > 1-bit palette)
  • save as *.bmp (where * is a number starting at 0, so “0.bmp” then “1.bmp”, etc …)

Using SCP, upload all converted images to a folder of your choice onthe Pi:

The images can now be used by the PaPiRus.

Code

A folder containing 1-bit black and white pictures is read by the script. The script then waits for button presses in order to display the desired image(s).

In my case, the buttons have been programmed to perform following actions:

  • button 1 displays a single image, my logo
  • button 2 displays a single image, my social links
  • button 3 cycles through all my project photos, changes on every press of the button
  • button 4 cycles through all images automatically (logo, links & projects), as a slideshow

Upload the code to the Pi using SCP and ensure it is run at boot time using a cron job:

The full code can be found below:

6 thoughts on “Pi Zero ePaper Badge”

  1. Hi Frederick !

    Really nice project !
    Just a little question : You just soldered the Zero LiPo to the GPIO 5V and Ground of the PiZero and it is working fine for both the PiZero and the PaPiRus ? Or did you have to solder somewhere else to power the PiZero ?

    Thank you for motivating us to make things. 🙂
    Charles

    1. Hi Charles!

      The Pi Zero is indeed powered via the GPIO pins, as would be the case if you would slide the ZeroLipo board over those pins. The PaPiRus is then powered from the Pi Zero, also via the GPIO pins.

      The Pi Zero has no polyfuse etc … like the Pi 3 for example, so powering via GPIO or via microUSB is the same.

  2. That’s great , thanks !

    I’ll build one (with a little speaker, if i can fit it alongside a little mono class D amplifier from Adafruit). 😉

Leave a Reply

Your email address will not be published. Required fields are marked *