Build a Halloween skull with living eyes and moving jaw.
Full instruction: https://www.instructables.com/Uncanny-Eyes-Halloween-Skull-Animatronic/
The eyes are inspired by Adafruit’s uncanny eyes. The code was adopted is an adaption of the TFT_eSPI example.
It contains 240px eyes instead of 128px to run on two round 1.28" TFT GC9A01 display modules with 240x240 resolution.
software prerequisits
hardware required
- 1x ESP32 (e.g. Expressif ESP32-WROOM-32D) (example)
- 2x 1.28" TFT LCD Display Module Round RGB 240*240, GC9A01 driver (example)
- realistic human skull (example)
you will also need
- jumper wires to connect everything, optionally a breadboard to test
- cables, female wire connector and crimping tool (to create Y-cables)
- a rotary tool, ideally with flex shaft, to open the skull and make space for the displays
- a power supply and USB cable
for a moving jaw you need
- small servo (9g)
- soldering iron
- to say goodbye to your USB cable mentioned above
ESP32 pin | TFT 1 | TFT 2 |
---|---|---|
23 | SDA | SDA |
18 | SCL | SCL |
2 | DC | DC |
4 | RST | RST |
22 | CS | |
21 | CS | |
+3V | VCC | VCC |
GND | GND | GND |
ESP32 pin | Servo | USB cable |
---|---|---|
26 | signal | |
GND | black | |
red | red* |
You could connect the servo’s red wire to the 5V pin, but…don’t. The displays will flicker during movement. Yes, you could add a capacitor to compensate this. It worked with 5000 μF to remove the flickering, but I decided to do it right.
The final solution will require you to cut open the USB cable and connect the red wire, if it is +5V, with the servo directly before it gets into the ESP32.
I used a jumper wire with one male side (to be plugged into the servo), ripped off the other side and soldered it to the USB cable.
- connect ESP32 and displays using a breadboard
- compile and upload code to the ESP32 board
- replace breadboard connection with Y-cables, female-to-double-female and test
- open the skull
- remove inner skull’s eye parts using the rotary tool to make space for the displays
Try to fit the displays with the connectors on top. You will need to remove less and it saves space for the servo. Repeat until the two displays fit. Once done…
- Fixate the displays in their final position, e.g. by using play dough
- Apply hot glue to fixate the displays
- Drill a hole at the skull’s back to be able to connect the USB cable
- drill a hole through the left mental foramen hole in the jaw
- imagine a line between the drilled hole and a servo arm inside the skull, cut it open
- glue the servo into the skull, plenty of hot glue will do
- connect a rigid wire
- to the servo
- to jaw
- move the servo to the closed position and connect both wires
- check and adjust angles
- secure the cables with hot glue if needed, so that only USB power supply exits the skull
- tidy up so that the wires do not interfere with the servo arm
- close the skull