Magic Book Eye

6.0K9513

Intro: Magic Book Eye

I recently read a nice fantasy book*. It has an eye on the cover and other beautiful drawings by the author.

Something comes to mind with the new round OLED displays. Why should the eye be just a drawing?

The magical fantasy book should become reality! Let's go!


*Walter Moers - Die Insel der Tausend Leuchttürme / The island of a thousand lighthouses

STEP 1: Microcontroler & Wiring

Soldering is normally not necessary if you use cables and have large enough book with plenty of internal space. If you use a small book, it would be necessary to spare the cables and connectors by soldering short wires.

Follow the wiring list for an ESP32-Wroom:

VCC - 5V or 3V

GND - GND

SCL - 18 (SCK)

SDA - 23 (MOSI)

DC - 17

CS - 16

RST - EN

STEP 2: Software

The eye should look straight ahead most of the time and occasionally blink and look to the side as a surprise effect. To do this, we use the random function for the pauses and the direction of gaze.

The eye itself consists only of filled circles that change the center of the circle using the program. I deliberately used graphic elements rather than an eye image in order to retain the comic-like character.

You can experiment a little: Background in white, yellow or black, eye color in blue, yellow, orange, magenta, red or green.

The graphic speed of the display is not particularly fast. It is therefore necessary to make the eye blink and then immediately change the position of the iris. Smooth animation is not possible.


Download the sketch "Book-eye-1.ino"

STEP 3: Upload


Connect the ESP32 via USB with your computer and activate Arduino IDE.


Install libraries:

Sketch --> Include Library --> Manage Library --> type "GC9a01" --> install Adafruit_GC9A01A

Sketch --> Include Library --> Manage Library --> type "GFX" --> install Adafruit_GFX Library


Setup:

Board : ESP32 Dev Module

set the port

--> upload the sketch

STEP 4: Preparing the Book

My display has the diameter 3.7cm. A suitable hole is made in the middle of the book cover with a drill. If you don't have a suitable drill, you need to mark it out with a pair of compasses and cut it out cleanly with a penknife.

Then you define how much of the book you want to cut out. To do this, we open the first page and fix the book on both sides with wood strips and screw clamps. Now you can make cuts along the ruler and remove the paper in between. We do this until the space is large enough.

I use wood glue to fix the cut edges a little. It matches the color well, is slightly elastic and dries quickly.

STEP 5: Bring It All Together


We fix the display in the hole with hot glue. A wooden strip can be helpful.

Drill a hole for the cable in a suitable place on the back of the book. Close the book, connect the power bank - done.

12 Comments

That eye is SO fun. I'm going to try this and make it bigger.

Great idea, then go for it! I found a 3.4'' display on the internet, that should work. Alternatively you can use a rectangular display with a round mask, maybe with a 3'' lens in front of it, then it looks like a whale's eye. Let me know the result!

The "eye" really looks like one of the old eye tubes (for tuning, etc) can the display be programed to open/close like one of them?

This can certainly be simulated if I could find the fill.Arc command for the round display. You could also display this with a GIF file.

Imagine walking into your living room at night and seeing this

Why do you have to move the iris?

I guess I misunderstood. I thought you were forced to make the iris move. I couldn't figure out why that was the case. That's the only reason I was asking.

Why not? It makes the whole thing more lively,

This looks like a fun project for kids. I was thinking that the battery pack could be stored within the book to make it portable.

Excellent! I'd not seen the round displays before and this is such an awesome introduction. Thank you for sharing your work and good luck in the competition :-)

Thank you so much for your positive words!