- The code for this project works only with our 128x128 pixel OLED and TFT displays and 240x240 pixel IPS TFT displays. Other displays such as our 160x128 TFT or various PiTFT displays ARE NOT SUPPORTED AT ALL, period, not even sorta.
- Any recent Raspberry Pi board with the 40-pin GPIO header should work. The very earliest Pi boards — Model A and B, with the 26-pin GPIO header — are not compatible.
- A Raspberry Pi 2 or greater is highly recommended. The code will run on a Pi Zero or other single-core Raspberry Pi boards, but performance lags quite a bit. Pi 4 works now, which was previously incompatible.
Before committing to any particular hardware, think your project through. There are some decisions to be made…
- One display or two? You don’t have to connect two displays…some of the most creative variants of the “Teensy eyes” had only a single eye.
- OLED, TFT LCD or IPS TFT displays? OLEDs have a wide viewing angle and excellent contrast and color saturation, but they’re somewhat pricey, and have a finite lifespan (albeit many thousands of hours). TFTs make good economy displays if you’re okay with the slightly washed-out appearance. IPS TFT displays are in-between in cost and super sharp!
- What model of Raspberry Pi to drive it? The latest multi-core boards have enough performance for buttery smooth animation…but their size and power draw might make them best for stationary displays, like maybe a Halloween window prop. Costume and portable installations may fare better with the diminutive Pi Zero, though the animation will be much less smooth.
- Will the animation be running autonomously, or do you plan to control the eyes with a joystick and buttons? Will the pupils react to light? These require additional components.
There’s one more factor to consider: how do you want everything connected? Think about your intended installation. Is it temporary or permanent? Is space at a premium or do you have ample working room? These can influence your choice of wiring and connectors.
The breakout pins along the edge of each display board are wired up to matching pins on the bonnet boards. But you need the correct row for each display type…
If using OLED display(s): use the “upper” rows (with the word “OLED” between them).
There are 11 pins on the OLED breakout boards, which map directly to the 11 pins on the bonnet board.
Make absolutely certain the wires are in the same order. “SI” and “G” on the display board should go to “SI” and “G” on the bonnet, and each pin in-between…no wires should cross.
If using TFT or IPS display(s): use the “lower” rows (with the word “TFT” between them).
There are 11 pins on the TFT breakout boards, which map directly to the 11 pins on the bonnet board.
Make absolutely certain the wires are in the same order. “Vin” and “Lite” on the display board should go to “Vin” and “Lite” on the bonnet, and each pin in-between…no wires should cross.
There’s a common trope in science fiction stories: that there is no “up” or “down” in space. Wiring these displays is a little like that…it doesn’t matter if the wires or headers come out the front or back of the display breakout board, or use straight or right-angle pins…as long as those wires get from the display to the bonnet in the same positions and order, everything’s good.
(As for up and down: right now the software assumes the displays are oriented with the breakout pins along the top edge; other rotations are not currently handled.)
Here’s a probable layout for a non-portable installation. Straight header pins have been soldered to the bonnet board and the displays, projecting “up” and “back,” respectively. Two 11-pin female-to-female ribbon cables then join everything.
This might be easiest to assemble (and disassemble), and the straight header pins on the displays make them easy to re-use in breadboard projects later.
…but that’s not the only option.
This TFT display has right-angle header pins on the front of the board (front, back, doesn’t matter as long as the wires connect in the same order). This makes it very slim, but also a fair bit taller.
And this OLED has an 11-pin ribbon cable directly soldered to the board, no header pins at all. Again…front or back, ribbon could go straight out or can double back across the board…it all depends on your construction and space needs, as long as the pin order is followed. This is the most space-efficient, but requires patience and ace soldering skills, and isn’t easily re-used in other projects.
If using “rainbow” ribbon cables: these have 10 colors, while the displays use 11 wires…this means the cables will have the same color wire along both edges. Therefore, DO NOT rely on a visual mnemonic like “black wire is ground” or “red wire is Vin,” because your cable may have two black wires, or two reds, or two anything. Instead, make sure to manually follow the first wire all the way from the bonnet to the display, make sure they line up right, then install the remaining wires in order.
If you’re really economizing for space, here’s a secret: only 7 wires are really needed…it’s just easier and less error-prone to solder a header at each end and plug all 11 wires straight through. If using the OLED display, the SC, SO, CD and 3V pins can optionally be skipped. If using TFT, the 3v3 SO, CCS and Lite pins can be skipped. Make certain the exact same pins are skipped at the bonnet end, don’t mix them up!
To ensure a clean signal from bonnet to displays, aim to keep your wiring short and tidy. Electrical interference can lead to animation glitches…we’ll explain on the next page how to dial that back if needed. It’s possible to use long ribbon cables (even a couple meters), but it invites problems with interference or signal reliability.
For optional features like joysticks, light sensors, blink and halt buttons, see the “Customizing the Hardware” page.
When finished soldering, you can peel the clear plastic covering off the displays. It’s meant to protect them in shipping and during soldering. But unlike the screen protector on a phone or tablet, it’s not optically pure and makes the display look cloudy.
The project thumbnail image shows lenses and 3D-printed enclosures. These were a carry-over from an earlier project that used 1.5" acrylic cabochons, before we started carrying proper lenses which provide better optics and have a mounting flange…but we don’t have enclosure designs for those, you’d need to model something yourself.