BrickPi Bookreader

Wouldn't it be nice of someone read you a book aloud when you were feeling lazy to read it yourself?

Have you ever wanted to get that Kindle Book into another format, or just copy the text? Have you ever wanted to get all of your highlights or notes off your Kindle?

BrickPi Bookreader

In this project we make an ebook reading robot with the BrickPi.

We use the BrickPi to control the LEGO Mindstorms to turn the pages, a RaspberryPi camera to take pictures of each page, and the Raspberry Pi to convert the text to speech. The result is an e-book reader that can store text, search for selected text, or read the ebook aloud to you.

Step 1: Parts Required:

Step 2: Introduction

If you want to digitize a book, there are mechanisms available. However, most are too big, too error prone or too expensive for personal use.

The BrickPi Bookreader strikes a balance by using the Raspberry Pi to do the heavy processing and the BrickPi as the interface to the real world, controlling the NXT motors to handle page turning.

To make an automated system that reads a book aloud we need a few tools (some that already exist):

1. A software setup which can take a good picture of a page, perform Optical character recognition(OCR) on the image to convert it to text, and a Text to Speech(TTS) engine that can read the text aloud.

2. A mechanism which can turn each page, automating the system.

For step 1, we have some open source software that does the job very well. With the Raspberry Pi as the brains of the operation and the official Raspberry Pi camera as its eyes, the size of whole setup is considerably smaller than Google’s.

The second part is a bit tricky. When we started, we assumed there were be some decent projects out there that did the page turning.

So after digging around we found nothing so we set out to build our own. The biggest challenge of the project was creating a good page turning mechanism. After some research we found the Google Book Scanner, which turns the pages well but is beyond the scope of almost anyone but a corporation. We also foundScanbot, which works well but requires a lot of moving parts with a lot of precision timing. Building the contraption with LEGO’s is naturally easier.

Instead of diving straight into building a mechanism for turning the pages on a physical book, we decided to build a platform which could read from the Kindle app on a Nexus 7.

Step 3: Setting up the camera

The first thing to get our Bookreader up and running is to get the Raspberry Pi camera up and working. The Raspberry Pi camera packs a lot of punch, there are a lot of options, it’s easy to set up, and the image quality is acceptable for our project.

After connecting the camera, there is one more thing to do: change the focus of the Raspberry Pi camera. The Raspberry Pi camera comes with its focus fixed at infinity, and since it is a fixed focus camera you have to manually change it. Here are some helpful links to do focus the camera:

Step 4: Testing the camera

After setting up the camera, take a test image to see that it is properly focused. In rig we built, we have the camera about 10.5 inches above the tablet (choose a height which is comfortable for you and take a few test images to check if the images are clear and the whole screen of the tablet is captured).

Now fix the camera into it’s adapter next to the Ethernet Jack. Here is a great guide to setting up the Raspi Camera. It should be helpful in setting up bot the hardware and software.

After the camera is set up , test it to see if it works:

raspistill -o image.jpg

If the camera is initialized properly is you’ll see a new file image.jpg in your present folder. Open it to see the image.

Now secure the camera at the desired height and place your tablet or book under it. Take an image. You may need to readjust the focus of the camera and angle at this point.

Black text on white background works the best so select that from the text options and keep the text size sufficiently large. The larger the text is, the better results will be from OCR.

Step 5: Setting up the Text To Speech

For the TTS, we are using eSpeak. It works fine for our purposes: the voice is a little robotic, but it does the job. Here is a definitive guide to TTS on RPi.

BrickPi Bookreader picture

First test if the audio is working on the Raspberry Pi. Plug a headphone or speakers in the audio jack and run the following command:

aplay /usr/share/sounds/alsa/*

If you are able to hear the sounds, move to the next step! If not, this tutorial may help you setup the audio.

 

For more detail: BrickPi Bookreader


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top