Working with STM32 and E-Ink Display Part 1: Introduction and Environment Setup

The 2.15-inch E-Paper display is a low-power, high-contrast screen that mimics the appearance of printed paper, making it ideal for battery-powered and sunlight-readable applications. In this guide, we will explore how to interface it with an STM32 microcontroller, covering the basics of E-Ink technology, hardware connections, and environment setup.

In this guide, we shall cover the following:

  • Introduction.
  • Connection.
  • Environment setup.

1. Introduction:

. E-Ink displays, often referred to as electronic paper, are a unique type of display technology that aims to replicate the look and feel of real printed paper. Unlike traditional displays, they do not rely on constant backlighting but instead use reflective properties of ambient light, which gives them a highly natural and comfortable viewing experience.

2. At the heart of E-Ink technology are millions of microcapsules, each containing positively charged white particles and negatively charged black particles suspended in a clear fluid. By applying an electric field, the controller moves either the white or black particles to the surface of the capsule, forming the visible image. Once arranged, the particles remain in place without further power, which is why E-Ink screens are incredibly power-efficient.

3. This bistable property of E-Ink is one of its most important technological features. Bistability means that an image remains on the screen even when the power is completely removed. Energy is only consumed during the refreshing or updating of the display content, which makes these displays extremely attractive for battery-powered and portable applications.

4. In addition to bistability, E-Ink displays are reflective rather than emissive. Instead of producing their own light like an LCD or OLED, they rely on external light sources, such as daylight or room lighting. This results in excellent readability under direct sunlight and reduced eye strain compared to bright backlit screens.

5. E-Ink technology has also evolved to support multiple levels of grayscale and, in more advanced models, full color through the use of additional filters or advanced particle arrangements. While color E-Ink is less vibrant than LCD or OLED, it is sufficient for applications like charts, e-books, signage, and low-power dashboards.

6. When compared to traditional LCD technology, E-Ink has both advantages and trade-offs. LCDs rely on a constant backlight shining through liquid crystal cells that twist to block or allow light. This design provides fast refresh rates and the ability to show video or complex animations, but it consumes significantly more power, especially when displaying static images.

7. Another difference lies in readability. LCDs tend to struggle under direct sunlight because their backlights compete with external light, often causing glare or poor contrast. E-Ink displays, on the other hand, perform best in bright environments since more ambient light improves readability. This paper-like behavior is a key reason why E-Ink is widely used in e-readers and low-power displays.

8. Power consumption is another key point of comparison. A static image on an LCD still requires continuous refresh cycles and backlighting, draining the battery even if nothing on the screen changes. In contrast, an E-Ink display consumes almost no power while showing a static image, making it ideal for applications like electronic shelf labels, information boards, or devices that need weeks or months of standby life.

9. Of course, E-Ink also has limitations when compared to LCDs. Refresh rates are relatively slow, making them unsuitable for video playback or real-time animations. Additionally, while monochrome E-Ink is sharp and efficient, color E-Ink displays tend to be more expensive and have lower brightness and contrast compared to modern LCD or OLED panels.

10. Despite these limitations, E-Ink technology fills a unique niche in the display world. Its combination of ultra-low power consumption, sunlight readability, and eye-friendly design makes it the perfect solution for devices where static or semi-static information is displayed most of the time. In this guide, we will use a 2.15-inch E-Paper display with an STM32 microcontroller, exploring its connections, setup, and practical use cases.

FeatureLCD (Liquid Crystal Display)E-Paper (E-Ink Display)
Power ConsumptionHigh, requires constant backlight and refreshVery low, only uses power when updating content
ReadabilityPoor in direct sunlight, glare issuesExcellent in direct sunlight, paper-like visibility
BacklightNeeds constant backlightReflective, uses ambient light
Refresh RateFast, suitable for video and animationsSlow, mostly for static or semi-static content
ColorFull color, vibrantMostly monochrome, limited color options available
Eye ComfortCan cause strain over long periodsComfortable, similar to reading printed paper
Use CasesSmartphones, TVs, monitors, handheld gamesE-readers, signage, low-power IoT displays
Power-off BehaviorScreen goes blank without powerImage remains visible without power (bistable)

2. Connection:

3. Environment Setup:

Open STM32CubeIDE after selecting the workspace and create new project as following:

Select the MCU:

Give the project a name:

Make sure the Targeted Project Type is STM32Cube, Language is C and binary type is Executable.

Next, head to connectivity, SPI1 and enable it in Transmit Only Master mode. PA5 and PA7 will be set to SPI1_SCK and SPI1_MOSI respectively.

Keep the parameters as is. Just make sure the data size is 8-bit and maximum speed is about 2Mbps.

Next, Set GPIOs as follows:

GPIO PinDirectionNames
PA0OutputCS
PA1OutputDC
PA4OutputRST
PB0InputBUSY
PC1OutputPWR

Next, from Project Manager tab, select Code Generation and enable Generate peripheral initialization as a pair of .c/.h file per peripheral as follows

Save the project and this will generate the project.

In part 2, we shall start developing the library and write to the E-Paper.

Stay tuned.

Happy coding 😉

Add Comment

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