Crystalfontz 3-Color ePaper Display (1.54”) Unboxing

For avid readers, electronic paper (ePaper) is a welcome publishing innovation thanks to lightweight e-Readers.  This display technology stands apart due to its low power consumption and its ability to retain full images without power.  Since the 1990s, its applications have expanded into battery-powered smart labels and smart badges that can periodically redraw themselves.  By 2020, the technology was even more accessible than before—even for developers with limited time and resources.

Using past experience with other display technologies, today I will be unboxing the Crystalfontz 1.54-inch 3-Color ePaper Display (part number: CFAP152152B0-0154). 

Paid Promotion Statement: I should note that Crystalfontz America, Inc. provided this ePaper display and the Adapter Board as part of this walkthrough.  With that in mind, I will be demonstrating how I got my own ePaper display working out of the box, how to upload custom images, and a few things to keep in mind while using the equipment.

Notice of Non-Affiliation and Disclaimer: As of the publication date, we are not affiliated with, associated with, authorized by, endorsed by, compensated by, or in any way officially connected with Seeed Technology, Arduino, Microchip, Atmel, Microsoft, or their owners, subsidiaries or affiliates.

The names: Crystalfontz, Seeed Technology, Seeeduino, Arduino, Microchip, Atmel, and Microsoft, as well as related names, marks, emblems, and images, are trademarks of their respective owners.

External Links: Links to external web pages have been provided as a convenience and for informational purposes only. Unboxing Tomorrow and Voxidyne Media bear no responsibility for the accuracy, legality, or content of the external site or for that of subsequent links. Contact the external site for answers to questions regarding its content.

Objectives

Today, we will use the ePaper display and a little additional hardware to print custom images.  These steps include:

  • Unboxing the Display and Adapter Board
  • Understanding the Display’s Basic Requirements
  • Setting up the Arduino Development Toolchain
  • Setting up the Seeeduino V4.0 board
  • Launching the Example Application
  • Creating Custom Graphics
  • Printing Custom Graphics to the Display

The Official Quick Start Guide

When in doubt, your best starting point is Crystalfontz’s official Quick Start Guide on the product webpage.  Here, you will find a single-page guide on getting your first application up and running.

An ePaper display showing a white, black, and yellow emoji.
Figure 1: Electronic Paper can Retain a Full Image Without Power

Material Resources

  • Crystalfontz Development Kit: CFAP152152B0-E2-2
    • Display: CFAP152152B0-0154
    • Adapter Board: CFA10084
    • Controller: CFAPN15062
  • (Alternative Kit) ePaper Display with Adapter Board: CFAP152152B0-E2-1
  • 3.3-volt Arduino or Arduino-compatible board (Seeeduino V4.0 was used here)
  • USB cable
  • Jumper wire assemblies (8 total) (female-to-female used here)
  • (Recommended) Male Long Centered Breakaway headers, 0.1-inch
  • (Recommended) Soldering iron and solder
  • (Recommended) Safety glasses for soldering
  • (Recommended) Anti-Static Workspace

While you can buy the display separately, I recommend purchasing the adapter board (CFA10084), or the full development kit.  The adapter is more than just a breakout board, as it generates the -20 volt and +22 volt rails required by the display.  

In this demo, I will be using the ePaper Display with Adapter Board (CFAP152152B0-E2-1), plus an Arduino-compatible Seeeduino V4.0 board.

Use 3.3-volt Arduinos Only

The adapter board requires 3.3-volt power and data.  Do not use 5-volt logic or your adapter board may be damaged!  In the case of the Seeeduino V4.0, this is an easy step thanks to its on-board voltage selector switch.

Software Resources

Today’s project will use the Arduino Integrated Development Environment (IDE) to run an example application (called a sketch).

  • Arduino IDE (version 1.8.13 is used here)
  • Microsoft Paint or similar bitmap editor
  • Crystalfontz Free Arduino-Compatible Example Code (We will download this later)
  • Main source (CFAP152152B00154.ino)
  • Look-up Tables (LUTs_for_CFAP152152B00154.h)
  • Example Graphics (Images_for_CFAP152152B00154.h)
  • Crystalfontz Free Bitmap Conversion Tool (bmp_to_epaper.exe) (We will download this later)

Crystalfontz’s free example Arduino application is designed for Atmel AVR-based boards.  Other boards may require code modification.

Download the Example Application

The example code contains useful Arduino wiring instructions that we will use early.  So, start by downloading it first.

Go to the Crystalfontz webpage for CFAP152152B0-0154, and then look for the “Software Source – Arduino / Seeduino Demo Sketch” link.  Download and scan the .zip file, and then open the .ino sketch file using the Arduino IDE.

Figure 2: The Free Example Application can be Found on the Crystalfontz Website

If you are not buying your Seeeduino directly from Crystalfontz, you should upload their example program to your board now, before we connect the ePaper display or the adapter board.

Unbox the ePaper Display and Adapter

The display and adapter board shipped in the usual protective packaging.  This delivery also includes the jumper wires that will interface the adapter board to the Arduino-compatible board; which I already had in my possession.

Figure 3: The Crystalfontz 1.54-inch, Yellow, 3-Color ePaper Display, Adapter, and Jumper Wires

Retrieve the ePaper Display

The display accepts 152 x 152-pixel images, which our upcoming software will map to the array of thin-film-transistors (TFTs) that make up the active portion of the display.  In this case, the display came with a splash screen already visible.

Figure 4: The Display with Attached Zero Insertion Force Connector

Power and data are delivered to the display through a thin, zero insertion force (ZIF) connector.  This is a 24-position connector with a fine pitch of 0.5 mm.  Because this spacing is quite small, it’s one of the reasons why I recommend using the adapter board if it’s your first time using this display.

(Conditional) Solder the Adapter Board’s Jumper

Some Crystalfontz ePaper displays require that you first solder a small jumper on the ePaper Adapter Board before use.  Today’s display is one of them.  To tell if your ePaper display needs a soldered connection, see the official Crystalfontz look-up table, and then act accordingly.

Figure 5: The Adapter Board with Solder Added to the Jumper

Connect the Display to the Adapter Board

Make sure your display and your adapter board are facing the same direction.  That is: the graphical part of the display and the components layer of the adapter board should both be facing the same direction when you connect them.

To insert the ZIF ribbon cable, first unlatch the adapter board’s ZIF connector.  Unlatch it by flipping the black latching tab upward by about 45 degrees.  Do not force it to go further.

With the tab now unlatched, you can now insert the ZIF ribbon cable into the ZIF connector as shown in Figure 6 below.

Figure 6: (Left) The Black Latching Tab is in the Down/Locked Position, (Right) The Tab is in the Up/Unlocked Position

Lock the ribbon cable in place by latching the black tab back down into its locked position.

Wire the Adapter Board to the Arduino Board

Now its time to wire all 8 of the jumper wires from the Adapter Board to the Arduino/Seeeduino.  The Adapter Board pin names are all clearly marked by the board’s printed silkscreen, but the Arduino’s connections require a quick look at the official example application at the Crystalfontz website.

Follow the Source Code’s Pin Assignments

Taking a peek at the main source file (CFAP152152B00154.ino) reveals a pinout table near the start of the source code.  Use it to wire up the adapter board as follows…

Reference the original source code file directly for possible changes to the pin assignments.
Figure 7: The Pin-Out Table as of September 2020

Wire up all 8 wires according to what you see in the source code, and you should have something like this…

Figure 8: A Modified Seeeduino V4.0, Jumper Wires, Adapter Board, and Display in a Ready-to-Use State

Note that I inserted male long center breakaway headers in the Seeeduino’s yellow headers to make the jumper wires connect.

With that out of the way, go ahead and attach the USB cable between the Arduino and your computer and then start the Arduino IDE.

(Seeeduino Users Only) Add Seeed Boards to Arduino Boards Manager

If you are using a Seeeduino board, you will probably need to download support for it before it will selectable in the Arduino IDE.  See Seeed’s official guide on how to add their boards to the default Boards Manager.

In my example, this required navigating to:

File –> Preferences –> Settings

Then, I added the following address to the “Additional Boards Managers URLs” field:

https://raw.githubusercontent.com/Seeed-Studio/Seeed_Platform/master/package_legacy_seeeduino_boards_index.json

…This should immediately let you search for Seeeduino boards under:

Tools –> Board —> Boards Manager

Locate the board the best describes your own board, and then follow any on-screen prompts to install support for it.  You may need to restart the Arduino IDE or momentarily unplug and re-plug the USB cable for changes to take full effect.

Upload the Example Application

If you haven’t already done so, now is the time to upload Crystalfontz’s example application to the Seeeduino/Arduino.  To do so, open the example sketch in the Arduino IDE, and then navigate to…

Tools –> Boards

Select your Arduino or Seeeduino model.  Then navigate to…

Tools –> Port

Select the appropriate COM port, or use Windows Device Manager to locate the correct one.

Crystalfontz’s example code should compile and upload without any modifications.

Watch the Example Application

If you have everything configured correctly, Crystalfontz’s example code will re-draw the splash screen.

The redrawing process is quite different from LCD displays, as the image will blink the new image in.  The full process will take a few seconds.  Once the new image is set, you can power off the Arduino or even disconnect the display entirely and still see the original image!

The splash screen will be followed by a white, black, yellow, and checkerboard pattern, plus a few partial ePaper updates.  For the first run-through, I recommend having Arduino IDE’s Serial Monitor active and set to 9600 bps so you can verify things are working.

There is a 20-second dwell time between test images, which is easily adjustable via the “#define waittime” directive in the main .ino file.  The source code commentary recommends at least a 2-minute dwell time between images for final-use applications.  For demonstrations like this one, the shorter 20-second interval is fine for now.

(Optional) Enable and Disable Default Patterns

Back in the source code, you can disable any of the default test patterns by writing a zero to it.  This also includes the checks for bitmaps on an optional SD card.

Figure 9: Write a “1” or “0” to Enable or Disable a Test Screen, Respectively

Disabling these test patterns will effectively remove it from the loop() portion of the Arduino application if you recompile.

Draw Your Custom Bitmap Image

Now it’s time to draw our own image to the ePaper display.

To get started, you will need a bitmap image editor.  Your image should be sized 152 pixels x 152 pixels. The bitmap file should use 24-bit encoding.  For Microsoft Paint under Windows 10, this seems to be the default setting.

Pixel-level image editors like Microsoft Paint or the Graphical Image Manipulation Program (GIMP) are probably the easiest for this task.  For the best color accuracy:

  • Make all black pixels fully black (Red = 0, Green = 0, Blue = 0)
  • Make all white pixels fully white (Red = 255, Green = 255, Blue = 255)
  • Make all yellow pixels fully yellow (Red = 255, Green = 255, Blue = 0

…this last part (yellow pixels) is important because other shades of yellow may be encoded as white pixels.

If you need additional shades, consider checkerboard dithering, Halftone, or the Floyd–Steinberg Dithering Method. When viewed from a distance, these can fool the eye into seeing additional shades.  To demonstrate, here is a custom image…

Figure 10: A Bitmap Image can use Dithering to Simulate Different Shades of Yellow at a Distance

Save your bitmap.  If you are offered additional bitmap options: choose the following settings:

  • Format = 24-bit bitmap (R8 G8 B8)
  • Run-Length Encoded (RLE) = Disabled
  • Do not write color space information

The final 152 x 152 bitmap image should be around 67.8 kB. 

Download the Crystalfontz Bitmap Converter

Back at the Crystalfontz website, locate the page to download the free Bitmap to ePaper Converter (as part number: “BMP-to-ePaper”).

Figure 11: The Crystalfontz Free Bitmap to ePaper Conversion Tool

Download and scan the package.

Unzip the package, and you should be left with a single Windows executable (.exe) file called “bmp_to_epaper.exe.”  Run it, and after a possible security prompt from Windows, you should see the following interface…

Figure 12: The bmp_to_epaper.exe Application

Click the “Browse” button.

Navigate to your custom 152 x 152 bitmap image.  Select it, and you should see new options appear in the converter…

Figure 13: The Converter Program with the Custom Graphic Successfully Loaded

My display is the black/white/yellow variant, so I will choose settings accordingly.  If you have a different display, you may need to use a different configuration from the one shown here.  Today, I have selected:

  • Convert to = ePaper
  • Inverted = unchecked
  • RLE = unchecked
  • 2 Dim Array = unchecked
  • Black/White = 1-bit
  • Red = N/A
  • Yellow = 1-bit

Click the “Convert” button.

After acknowledging the change, you should now see a header file (.h) in the same directory as your custom graphic.  This file contains the unsigned arrays that contain your custom graphic.

Now copy that header file to the same directory as your CFAP152152B00154.ino Arduino sketch file.

Add your Graphic Header File to the Sketch

Back in the Arduino IDE, add your new graphic by navigating to:

Sketch –> Add File

In my case, I named my custom graphic “custom6.bmp”, so the header file was automatically named custom6.h.

Modify CFAP152152B00154.ino

In the main source file (CFAP152152B00154.ino) add the following…

#include “custom6.h”

…where you should replace custom6.h with the name of your own custom header file.

Use the Image-Drawing Function

Now we have to use the Load_Flash_Image-To_Display_RAM() function to print the arrays within custom6.h to the ePaper display itself.  This function accepts 4 parameters:

  • width_pixels = The width of the image in pixels = 152
  • height_pixels = The height of the image in pixels = 152
  • *BW_image = Label to the custom image black and white array
  • *Y_image = Label to the custom image yellow array

Note that the converter program will assign your custom graphics the names: “Mono_1BPP” and “Yellow_1BPP” by default, regardless of the bitmap name.

At the very start of the loop() function, add the following block of code…

//power on the display
powerON();

//load an image to the display
Load_Flash_Image_To_Display_RAM(HRES, VRES, Mono_1BPP, Yellow_1BPP);

Serial.print("refreshing custom ");
while (0 == digitalRead(EPD_READY));
Serial.println("refresh complete");

//for maximum power conservation, power off the EPD
powerOff();
delay(waittime);

Upload the Updated Sketch

Click the “upload” button, and your new graphic should appear within several seconds…

Figure 14: The Custom Graphics Array has Successfully Simulated 3 Shades of Yellow

Note that my custom graphics header file contains two arrays at 2,888 bytes per array.  This will consume quite a bit of the ATmega328P’s internal flash memory, so expect to only fit around 3 custom images unless you get creative with your flash memory use.  RLE is one method for getting more bitmaps onto the limited storage space.

Optimizing Custom Graphics

If you want to scale down much larger images to fit the 152 x 152 display, applications like GIMP use anti-aliasing methods to avoid “jagged” pixels.

Note that the bitmap conversion tool may interpret many shades of yellow and gray as white, which may encode unexpected white pixels in your image.  To correct them, recolor the affected bitmap areas carefully and then re-upload.

Figure 15: Consider Re-Coloring Pixels that go Unexpectedly White after Bitmap to Header File Conversion

Re-color your pixels carefully, and you should be fine.

Closing Remarks

For larger ePaper displays and other color varieties, visit the official Crystalfontz website or the contact page.

The pixels of an ePaper display have physical properties that are quite different from the LCD displays I was used to.  Yet the example code and the adapter board made the ePaper display just as easy to work with. 

Figure 16: A Custom Bitmap Containing QR Code: “Thanks for Watching”

What ePaper may lack in refresh rate, it makes up for in low energy consumption.  With this technology, devices like e-Readers, smart labels and smart badges can achieve astonishing battery life from very modest power sources.

Overall, the ePaper display worked perfectly without any technical problems.  The adapter board was especially helpful in simplifying the interface between the Seeeduino V4.0 and the display.  And if I had to guess, having it probably reduced my development time by at least a week or two.

References

[1]Crystalfontz America, Inc., “CFA-10084: ePaper Adapter Board 24-pin Rev. 0v1,” 2018. [Online]. Available: https://www.crystalfontz.com/products/document/3976/CFA-10084_0v1_Schematic.pdf. [Accessed 6 Sep. 2020].
[2]Crystalfontz America Inc., “Crystalfontz ePaper with Adapter – Quick Start Guide,” Crystalfontz America Inc., [Online]. Available: https://www.crystalfontz.com/products/document/4393/ePaperGettingStarted.pdf. [Accessed 11 Sept. 2020].
[3]Crystalfontz America, Inc. , ” 3-Color ePaper Display with Adapter Board, Part Number: CFAP152152B0-E2-1,” Crystalfontz America, Inc. , [Online]. Available: https://www.crystalfontz.com/product/cfap152152b0e21-3-color-epaper-with-adapter-board. [Accessed 11 Sept. 2020].
[4]Crystalfontz America Inc., “Why does my ePaper display not work with my ePaper Adapter Board?,” 10 Oct. 2019. [Online]. Available: https://www.crystalfontz.com/blog/why-does-my-epaper-display-not-work-with-my-epaper-adapter-board/. [Accessed 11 Sept. 2020].
[5]Seeed Technology, “How to Add Seeed boards to Arduino IDE,” Seeed Technology Co., Ltd., [Online]. Available: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/. [Accessed 29 Sept 2020].

Important Notice: This article and its contents (the “Information”) belong to Unboxing-tomorrow.com and Voxidyne Media LLC. No license is granted for the use of it other than for information purposes. No license of any intellectual property rights is granted.  The Information is subject to change without notice. The Information supplied is believed to be accurate, but Voxidyne Media LLC assumes no responsibility for its accuracy or completeness, any error in or omission from it or for any use made of it.  Liability for loss or damage resulting from any reliance on the Information or use of it (including liability resulting from negligence or where Voxidyne Media LLC was aware of the possibility of such loss or damage arising) is excluded.