• Theory of Operation, Demo Video and Features

    sjm430604/03/2024 at 14:08 0 comments

    First off, huge thanks to NextPCB for sponsoring this project.

    https://www.nextpcb.com

    Below is a quick text log of generally what I went over in the video in case you prefer reading:


    So let's start with what an eink display (from here one referred to as EPD, ElectroPhoretic Display) is and how it generally works. EPD's are characterized by their high contrast, almost paper-like appearance, generally grayscale or monochromatic (though now color versions are starting to come out), lower operating power during updates and bistable image retention. On the downside they are quite expensive due to being patented technology and their refresh rate is much slower than other display types. Below is a crude sketch of the cross section of an EPD.

    Here you can see that inside the EPD are tiny capsules containing clear viscous fluid as well as tiny charged pigmented balls that are black and white. The balls of each color are oppositely charged. On the top and bottom of the display are clear electrodes arranged in a grid pattern. When a pixel's electrodes are controlled with a positive and negative waveform on opposite sides the colored balls of opposite charge are attracted either to the top or bottom. The magnitude, polarity and time of the pulses can be tightly controlled through the controller. The pattern of the waveform is stored in non-volatile memory known as LUTs (Look Up Tables) inside the display controller and is a sort of "magic sauce" that many manufacturers wont disclose.

    In order not to permanently damage the display by polarizing the materials in the layers and thus getting the colored balls "stuck" in either position the waveform is designed to average out the drive polarity so that there's a net zero charge balance. This is the reason that updates take awhile and there's multiple flashes of opposite colors and inverted frames in a full refresh. It's possible though to do a partial or quick refresh by omitting balancing frames in the sequence, at the potential cost of contrast, ghosting and display lifetime. I've yet to implement a quick refresh for my display but I plan on doing so to make setting the time much quicker and less painful.

    EPDs with more colors exist which have additional larger colored balls, taking advantage of slower movement through the viscous fluid to make controlling them "independently" of the smaller balls possible. These however take even longer to update and grayscale isn't really possible so dithering is necessary.

    So the first thing I did when I received the display was to design the pcb shown below.

    It has all of the required circuitry to drive the display, charge a lipo battery via USB C, keep time with an I2C real time clock chip, and finally a smattering of user I/O to control the clock. The microcontroller is the venerable atmega328p and with only 2k of ram it obviously cant double buffer the display, so my graphics library is written to run on smaller chips with limited resources. Next up was porting my graphics library to work with the new display. I referenced arduino test code provided by BuyDisplay (the manufacturer of the EPD module) to initialize the controller and then set about tweaking my code to update the new display. Below is some demo graphics and fonts showing what my library can do.

    I've implemented bitmap and string support along with multiple fonts.

    So there was one major mistake I made, when I designed the pcb footprint for the USB C connector I used I forgot to isolate the bottom layer mounting pads so when I set the top plane on my pcb to ground and the bottom to vcc I inadvertently shorted the two together. Luckily I realized this before powering the board up the first time and was able to use my cnc to isolate the bottom pads from vcc. This route is visible on the bottom pcb to the right, just under the USB C connector.

    Above you can also see the small CR2032 I'm temporarily using to keep the RTC time while the clock is unplugged.

    So in the...

    Read more »