Wear an eyeball on your hat! This is an intermediate-level wearables project built using the one Electronic Animated Eye built using Teensy 3.1/3.2 and an OLED or TFT display. The result is a compact bowler with electronics built into the ribbon band. This hat could be a spooky upgrade to a Clockwork Orange costume and much more!

This iteration does not use the 3D printing files provided earlier in this guide, but rather a more gasket-like shape 3D printed in SemiFlex flexible filament and sewn onto the hat (the cabs I found at the plastics store were 1.25" rather than the recommended 1.5"):

As an alternative to 3D printing, you can cut a piece of rubber or leather to hold the cabochon in place.

In addition to the items listed in the overview, you will need:

  • bowler hat
  • scissors
  • needles and thread
  • tailor's chalk or marking pen

Solder a ribbon cable to your display (OLED shown) as directed on the wiring page, however you can be a bit more relaxed about the wire slack lengths and positioning than the hard plastic 3d enclosure calls for since these wires will be hidden and protected in the band of the hat.

Fold the ribbon cable at a right angle to send it out one side toward the hat's ribbon bow. Cut the ribbon cable to length to reach the approximate center of the bow.

Solder up the connections according to the wiring instructions and test out your circuit. Shown here is the flickering effect you'll get with an OLED on video only -- it looks fabulous to the naked eye. The flickering can be mitigated slightly by adjusting your camera shutter speed, but go with a TFT if your primary goal is to capture crystal video!

An optional small change in the code yields better animation. With only a single eye to render, screen updates can occur twice as fast and the animation is super buttery smooth. In the file config.h, look for these two lines of code and delete or comment out one, leaving the other enabled (depending on which 'select' pin you've wired up):

  {  9, 0, 0 }, // LEFT EYE display-select and wink pins, no rotation
  { 10, 2, 0 }, // RIGHT EYE display-select and wink pins, no rotation

Also, with no photocell in the circuit, you can comment out this line a bit further down in the file; the pupil will change size on its own rather than in response to light:

  #define LIGHT_PIN      A2 // Photocell or potentiometer (else auto iris)

Mark the center front of the hat with tailor's chalk or a pen, then trace your cabochon or gasket to transfer the circle outline to the ribbon.


Carefully cut out the cab-sized circle from the ribbon with sharp scissors.

Slide the display into the ribbon band behind the round cutout, routing the ribbon cable off to the side.

Stow the Teensy 3.1/3.2 and lipoly backpack into the ribbon bow and tuck in the ribbon cable slack behind the band. 

The battery can be tucked into the ribbon band near the back of the head, with its wires headed into the bow area for plugging in.

Position the cabochon on the display and sandwich it in place with the 3D printed (or leather or rubber) gasket.

Stitch the gasket's four holes to the hat through the mounting holes of the display (OLED shown). It can be handy to use two needles pierced through the front with pliers, then pull them through to the inside of the hat and tie a knot.

The feather accent serves to obscure the circuit from view-- feel free to glue it in place if you like!

This hat is not weatherproof!If it rains, power down and stow your hat. Use the original 3D enclosure and stitch it on for a more protected display, and consider shrinking large heatshrink tubing over the PCBs.  Want to ruggedize this design? There are some tips in this video:

This guide was first published on Sep 07, 2015. It was last updated on Mar 08, 2024.

This page (Bowler Hat Project) was last updated on Mar 08, 2024.

Text editor powered by tinymce.