Close
0%
0%

FLOSS Book Serving System

An open-source ereader that can display books from an open, self-hosted server

Similar projects worth following
This (still unnamed) project aims to allow book lovers to read books from an ereader they can fully customize and read books from a server they fully control.

Paying Bills

PCBWay graciously offered to sponsor this revision of the board. With them I've had the flexibility to source parts from multiple trusted sources. They are also quite thorough with their file approval process to avoid any surprises once boards ship. Thanks PCBWay!

Introduction

NOTE: This is my best attempt to explain the project, but it's moving fast and constantly breaking. Read the project logs as I'll update them more than this description. For the most up-to-date info check the project's repository

The goal of the project is simple: democratize e-books. If you read the note above, you know this project is moving fast. If you read the project log, you know I'm still trying to decide what hardware platform to use. So I'm not going to talk about hardware beyond this statement: I'm using a Raspberry Pi to prototype everything, but I'd like to make a specialized e-reading single board computer. OK, now to the software.

Technical Stack

MuPDF

The heart of this project is MuPDF. A comprehensive document rendering library that supports just about every e-book format. It reads documents from the filesystem, lays out the document for the screen dimension, and outputs a pixel map. The library also compiles to 60+ MB so centering this project on a microcontroller is out of the question. This leads us to the next part of the technical stack.

lgpio

Using a generic Linux GPIO library like lgpio has eased developing this project during the supply shortage. SPI device communication, button polling, and driving the e-paper display happens with lgpio.

LVGL

Light and Versatile Graphic Library is designed for embedded systems. I could've used the Linux frame buffer to drive the e-paper display, but writing the GUI with LVGL allows me to easily port to a microcontroller if I can squeeze down MuPDF capabilities to a flash chip. Also, sending LVGL widgets to the e-paper display was much more straight forward than the frame buffer device.

Calibre

Just about every e-book lover reading this has heard of Calibre, an all in one e-book management software. You can read e-books, edit metadata, purchase e-books, and even self-host a book server. The latter is how Calibre comes into this project. The software allows one to run a web server that makes a book library available on a local network or on the world wide web with port forwarding. Put you don't need Calibre to serve books. In fact, there's an open spec for digital distribution.

OPDS

The Open Publication Distribution System is an open, decentralized way to present machine-readable catalogs to eReader clients. If that went over your read, OPDS is to e-books as RSS feeds are to podcasts. That's an oversimplification, but it's my laymen explanation.

OPDS is how the project fetches books from Calibre, and thus, the project can fetch books from any OPDS compatible server. The first commercial book marketplace I plan to integrate with is Libreture, a bookshop and e-book cloud library.

Conclusion

I'll repeat the above disclosure: all of the above is probably out of date by the time you're reading this. Check the project logs and project repository for the latest info.

MPEG-4 Video - 21.26 MB - 08/14/2023 at 21:21

Download

  • PCB Layout for GDEY042T81-FT02

    Guyrandy Jean-Gilles6 天前 0 comments

    The latest PCB revision is on it's way to fabrication and there are lots of changes to note.

    Read more »

  • Bringing Up GDEY042T81-FT02

    Guyrandy Jean-Gilles11/09/2023 at 00:35 0 comments

    I'll skip to the happy ending. I can drive the display, the back light, and can read data from the touch screen, but achieving those milestones took much much longer than it should've. This update won't have much info on the actual e-reader project but is more a rant reflection on mistakes made while bringing up GDEY042T81-FT02 so I, and hopefully you, don't repeat them. Buckle up.

    Read more »

  • The First Attempt at Portable Power

    Guyrandy Jean-Gilles11/02/2023 at 13:19 0 comments

    The boards with lithium polymer charging are back and I've got mixed news: they mostly work. I ordered two (sponsored) designs from PCBWay: a dedicated lipo charger and a eReader carrier board with integrated lipo charging.

    Read more »

  • A Much Needed Refactor

    Guyrandy Jean-Gilles10/20/2023 at 04:49 0 comments

    I'm still waiting on the latest hardware revision to manufacture, so in the mean time I've been refactoring the code to be more modular and follow separation of concerns. The requirement that forced this task was writing firmware for the GDEY042T81-FT02 touchscreen sub-assemblies from Good Display. Previously, the project relied on the structure of code from Waveshare for the GDEW042T2. Moving away from Waveshare's structure to thin abstractions will make porting Good Display's vendor code to this project much easier.

    Here's an example. The project now has an abstraction layer for the e-paper aptly called "display.c/h" that contains the following function:

    Read more »

  • Touchscreen Assemblies Have Arrived!

    Guyrandy Jean-Gilles09/29/2023 at 06:46 0 comments

    I ordered GDEY042T81-FT02 earlier in September and didn't expect it to ship for ages, but they've arrived in just 2 weeks! I also ordered the DESPI-C03 development board also made by Good Display to ease development.

    Read more »

  • Power Management Layout (Sponsored by PCBWay)

    Guyrandy Jean-Gilles09/26/2023 at 15:47 0 comments

    Paying Bills

    PCBWay graciously offered to sponsor this revision of the board. With them I've had the flexibility to source parts from multiple trusted sources. They are also quite thorough with their file approval process to avoid any surprises once boards ship. Thanks PCBWay!

    Update

    I've avoided adding a battery solution since I wanted to focus on prototyping the e-reader features. The previous version of hardware and software had the minimal feature set an e-reader requires, so I finally bit the bullet and implemented portable power. I decided not to implement power on the HAT version of the hardware as that's uncommon for that form factor. I consider that version of the hardware done with buttons as inputs. Once I have touchscreens, I'll do a revision of the HAT.

    With respect to portable power, my goal was to keep the device as thin as possible which effectively required a lithium polymer battery. Sparkfun sells a 1250 mAh lipo battery that perfectly fits the carrier board.

    Read more »

  • Sourcing a Touchscreen

    Guyrandy Jean-Gilles09/11/2023 at 15:49 0 comments

    Last log I mentioned a 4.2" e-paper, touchscreen, and front light assembly. I've recently bought four directly from the manufacturer. The expected lead time is 45 days, but since it's shipping from China I wouldn't be surprised if these displays end up as a Christmas present.

    While waiting for the above assembly to come into stock, I tried to source second options and there really isn't anything else that's as cost effective. First off, the mode e-paper sizes (for this application) are 4.2", 6", and 7.5". So I'd need to find a touch screen in one of those sizes. Adafruit sells a 7" touch screen which could be used for a 6" display in a non-ideal situation, but ideally the touch screen and e-paper are the same size. DFRobot also sells a 7" touch overlay but that seems to specifically be for the LattePanda. Orient Display sells a 4.3" capacitive touch screen but it's end-of-life. Newhaven Display sells a 4.3" resistive touch screen, but the bounding box doesn't fit the one used in this project (96.7mm x 55.5mm vs 84.8mm x 63.6mm). NKK Switches' FT series could be used for 6" and 7" displays, but just the touch screen would equal the cost of the 4.2" e-paper, touchscreen, and front light. The only reasonably priced 6" e-paper display I could find, that's not from an ethereal eBay seller, is GDE060B3 from Good Display which is $30.

    NOTE: I'm an not criticizing anyone who buys parts from eBay. But I want to source parts from traceable suppliers so other people can easily duplicate this project.

    There's a purchase page for a 6" e-paper, touch screen, and front light assembly from Good Display but it's sold out and I'm not sure it's still being produced. Even if it was, I can't find how to drive the IC, HX8705-B.  It seems like it does not have a built in display buffer and I can't find a development kit or even a recommended application circuit. At $60, it's right on the cusp of what I'd call affordable for a hobbyist project, but if I can get my hands on one, it could make for some fun hacking.

    So I currently only have one option in stock: GDEY042T81-FT02 from Good Display which cost $28 each. According to Good Display, they manufacture this part about once a quarter. Certainly not ideal, but it's a reliable source for the time being.

  • Carrier Board PCBs are in!

    Guyrandy Jean-Gilles09/04/2023 at 06:28 0 comments

    The computer module 4 carrier boards are back from the manufacturer and they work!

    The design is 6.5mm thick and probably as thin as it'll be using off the shelf modules. Last log I mentioned the lack of portable power. It's about time it was incorporated into the design. I'd like to use a thin, off the shelf battery available from multiple distributors, but that might be asking for a unicorn. I'll let you know how my search goes and if you have any suggestions please let me know!

    Also, since this is a portable device, I want book lovers to be able to add, remove, and edit URLs to fetch books using only the eReader. This effectively requires a virtual keyboard and thus a touch screen. Good Display sells a kit of a 4.2" raw e-paper panel, backlight, and touchscreen but it's currently out of stock. According to representatives from Good Display, the kit will be available a week after the writing of this log.

    In the meantime, I'll focus on a portable power solution. Once that is complete and a touchscreen, and ideally backlight, is implemented, I'll probably focus on refactoring the code.

    For the most up-to-date software, hardware, and road map, please visit the project's repository.

  • Compute Module 4 Carrier Board Layout

    Guyrandy Jean-Gilles08/21/2023 at 03:11 0 comments

    So far the hardware of this project has followed the Raspberry Pi Hat form factor. The last PCB was about as slim as I could get it following that spec and using tactile switches as inputs.

    As I said in the last project log, I'm not set on sticking to the Raspberry Pi platform, but Pi form factors are standard, so the easiest way to slim down the hardware with minimal software changes is to produce a carrier board for the compute module 4.

    This layout wasn't as simple as replacing the 2x20 headers connectors with 100 pin Hirose connectors. The carrier board needed to handle power input, SD cards, and USB traces. You'll notice a USB C and USB micro connector. The former is for 5V power and the latter is for USB client connections. I could've routed both in a single USB C connector but I don't want to be debugging USB right now. The layout is stolen from Shawn Hymel and it worked for him so why try something new.

    I have compute modules with eMMC but they are still hard to source and I want to be able to use SD cards if need be. Routing the SD card traces and the 24-pin ribbon cable connector resulted in a sea of vias. That plus the USB data traces should have lead me to a 4 layer board, but I'm a frugal engineer and routed everything on two layers. Hopefully it all works.

    Notice the lack of battery hardware. If this was a final production layout I would've taken the time to implement portable power, but that will come in a later board revision.

    For the latest software and hardware files, please visit the development branch of the project's repository.

  • Initial Commit

    Guyrandy Jean-Gilles08/14/2023 at 16:22 0 comments

    If you haven't figured out already, I'm not very good at naming things. I don't have a name for this project yet, or this project log, but the goal is simple: give e-book lovers control over their library.

    Read more »

View all 10 project logs

Enjoy this project?

Share

Discussions

Helen wrote 10/24/2023 at 19:07 point

This is a fantastic idea! I can't even imagine how long it took you to implement this. For a writer who constantly works with many books while creating research papers for students at https://edubirdie.com/ the ability to set up an open source e-reader and access the books from your own server would be pretty helpful. I'll keep an eye on the project updates. Good luck

  Are you sure? yes | no

Cyril Hrubis wrote 10/20/2023 at 08:19 point

Just FYI I working on widget library and software stack that runs, among other things, on 1bpp e-ink. And I do have quite a bit of apps in the development, including terminal, dictionary, music player and more. See https://github.com/gfxprim

Here is a dictionary running on RPi with waveshare e-ink shield: http://metan.ucw.cz/outgoing/gpdict-eink.jpg

Also note that gfxprim library has hardware independent driver for e-ink display and I'm going to add support for more displays. There is Linux spidev driver and Linux gpio driver and the display driver is build on the top of these two:

https://github.com/gfxprim/gfxprim/blob/master/libs/backends/linux/gp_linux_spi.h

https://github.com/gfxprim/gfxprim/blob/master/libs/backends/linux/gp_linux_gpio.h

https://github.com/gfxprim/gfxprim/blob/master/libs/backends/linux/gp_display_waveshare_7_5_v2.c

And there is also an abstraction for lazy display updates that makes slow e-ink somewhat usable with interactive work such as terminal.

  Are you sure? yes | no

Guyrandy Jean-Gilles wrote 10/20/2023 at 15:02 point

Cool project! Can the library target micro-controllers? Looks like there's a hard Linux dependency.

  Are you sure? yes | no

Cyril Hrubis wrote 10/20/2023 at 15:29 point

There is an work-in-progress port to FreeRTOS that I play with just for fun, however to be honest I think that having an Linux OS beneath make things much more easier if you want have even basic apps, such as music player and book reader. Not to mention for stuff like IRC client one needs a network stack...

  Are you sure? yes | no

Guyrandy Jean-Gilles wrote 10/20/2023 at 21:05 point

Yeah, a proper OS has made things much easier. At this stage in the project I'm trying to keep dependencies to a minimum. Thanks for sharing the library though!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates