Coin Hat Controller

The Coin Hat is a wearable game controller that uses the conductivity and capacitance of copper pennies to act as keyboard inputs with the help of the Circuit Playground Express. It turns an otherwise basic Tilley hat into a fun and challenging game controller that you can use to play a wide variety of computer games.

The Circuit Playground Express is sown onto the top of the hat, and each of the four pennies are connected through the use of conductive thread that is sown into the fabric of the hat as well. These coins use digital switches to perform their actions, and through the use of the CPX’s built in capacitive touch sensors, allows you to activate the switches with your bodies own electrical conductivity!

The inspiration for this project and its design comes directly from a hat that is very common in my home country, Australia. These hats have small pieces of cork suspended by string, mainly to ward off flies and other insects from the wearers face and head. I wanted to create something similar in design to this, but with an interactive component.

The conductive thread was sown directly into the fabric of the hat, and connected to the Circuit Playground Express by tying knots on each of the input pads. The copper pennies were drilled with a small hole to allow for the conductive thread to be tied around each of them and suspended off the brim of the hat. The USB input was position in such a way that it would run down the back of the wearers head, causing the least amount of interference with the coins.

Above is a short video detailing how the controller works to play games, such as Tetris and others. Unfortunately, no matter what changes I made to the code, I could not get the hat to work for Pong (literally every single version of pong, it worked fine for every other game though).

PARTS/MATERIALS LIST:

  • 1x Tilley Hat
  • 1x Spool of conductive thread
  • 1x Circuit Playground Express microcontroller
  • 4x Copper Pennies
  • 1x Micro USB cable
  • 1x Arduino IDE

CODE: https://gist.github.com/tizza555/1fa396e0fdc7e85c9816b02c1c87e762

SOURCE: https://learn.adafruit.com/circuit-playground-fruit-drums/cirkey-cirkey

This source from the Adafruit learning webpage was extremely helpful with regards to setting up the capacitive touchpads that allowed for the coins to be used as inputs. It was originally designed to be used as a “drum kit” of sorts, with each input resulting in a sound being output through the CPX’s built in speaker. However, I used the code only for it’s capacitive touch capabilities, as well as the very helpful on/off switch that is utilized through the built in slide switch on the CPX.

WHAT HAVE I LEARNED?

That capacitive touch is very finicky, and changes drastically depending on the environment in which it is implemented. For example, at home my capacitance threshold was about 530-750, whereas in class I had to change this number all the way down to 125. My best guess as to why this occurs is probably static electricity, moisture in the air, or external anomalies such as the amount of people in a room, or other electrical components within close proximity.

I also quickly learned that sowing the conductive thread into the hat would result in my head/hair activating the switches instead of the coins as I intended. I remedied this by wearing a bandana under the hat to prevent my hair or scalp/forehead from activating the conductive thread. In the future I could solve this problem by sowing the conductive thread onto a piece of felt instead of through the hat itself, preventing the thread from going through to the other side of the hat where it could touch my head.


Posted

in

by

Tags: