Introduction: How to Make a Wireless Air Piano Glove

Purposes and functions:

Our wearable technology project is to create a wireless air piano glove with synchronized lights using basic electronics, a micro-controller such as a HexWear, and a laptop with Arduino and Max 8 software. The uses of our project are to play piano notes through a Bluetooth speaker by moving the fingers without being connected to any stationary system or actual instrument, as well as to scroll through a selection of instrument choices so that all their notes or sounds can also be played via the wireless glove on command.

The way that this project works is that when wearing the air piano glove, each of the four connected fingers contains a flex sensor that determines if a finger is being bent. When a finger is being bent, the LED on that corresponding finger lights up informing the user this finger has been sufficiently bent, and using Max 8 software, a corresponding note will play from the computer. Thus, each finger corresponds to a unique note and the user will be able to wirelessly play music form an external source via this glove on their hand. Using Max 8 software, this does not limit the glove to only play piano music, other unique sounds are able to be played from each corresponding finger allowing any user to manipulate whichever types of sounds they please.

List of required materials:

Step 1: Build the Circuit

The main circuit is one that involves several voltage dividers in parallel. It also includes flex sensors, which are resistors whose resistances change based on the degree of bending in one direction. When a flex sensor is bent, its resistance increases from about 25 kΩ up to 100 kΩ, and the voltage read across it increases as well.

However, since our design uses four flex sensors, four LEDs, and a bluetooth mate we also have to use a port expander due to the limited number of ports available on the HEXWear. We connect the four flex sensors via analog inputs on the HEXWear, the Bluetooth mate to the TX and the RX pins, and connect the MCP23017 port expander to the SDA and SCL pins which will then power the LEDs.

See the attached circuit diagram for greater detail. (Note that the Vcc in the diagrams corresponds to the Vcc pins on the HEXWear. These can be connected in parallel if not enough pins are available, or an external power source of a similar voltage is also another viable option)

Step 2: Installing Additional Libraries:

Due to the fact the we used a HEXWear, additional libraries need to be installed in order to properly use the Arduino software. Please use the following instructions to do so:

1) (Windows only, Mac users can skip this step) Install the driver by visiting Download and install the driver (the .exe file listed on Step 2 at the top of the linked RedGerbera page).

2) Install required library for Hexware. Open the Arduino IDE. Under “File” select “Preferences.” In the space provided for Additional Boards Manager URLs, paste click “OK.” Go to Tools -> Board: -> Board Manager. From the upper lefthand corner menu, select “Contributed.” Search for, and then click on Gerbera Boards and click Install. Quit and reopen Arduino IDE.

To ensure that the library is installed properly, go to Tools -> Board, and scroll to the bottom of the menu. You should see a section entitled “Gerbera Boards,” under which there should at least appear HexWear (if not more boards like mini-HexWear).

Step 3: Creating the Arduino Sketch

The Arduino sketch reads voltage values across the series resistors in the circuit and decides whether or not an established threshold has been met. If the threshold is passed, the HexWear lights up the relevant LED and sends an ASCII code signal to the laptop, which can be read and mapped to a note by Max 8 in a later step. Using the corresponding wiring configurations in the circuit diagrams all the necessary pins on the HexWear have been properly defined.

We noticed the threshold value noted in the sketch was not always consistent across different HEXWears. One recommendation we have is to use the serial plotter to determine the analogue value read from the flex sensor and denote how this value changes from when it is unbent compared to being bent. Then you are able to use this to define your own threshold value that correctly responds to the behavior of the flex sensor in your circuit.

Step 4: Create the Max 8 Patcher

The Max 8 patcher maps keyboard inputs or signals received through the Bluetooth channel of a laptop to instrumental note outputs. The Max 8 patcher that we used in our project is attached and available for download.

When using Max, follow these steps to connect your bluetooth mate to Max:

  • Confirm that the sketch is locked (the lock on the bottom left should be closed)
  • Confirm that the “X" above the metro object is turned off (gray not white)
  • Hit the print button going into the serial object and look at the available ports on the Max Console
  • Determine the correct port by the one labeled bluetooth module, and if multiple are available try each until you can confirm which one is working
  • Throughout this process your bluetooth module should be blinking red and when it is properly working it will change to a solid greed
  • Keep trying until the green lights appears on the bluetooth
  • Once you’ve connected, lock your sketch and hit the “X” above the metro object to start listening to the bluetooth communications.

Step 5: Soldering the Port Expander, LEDs, and Bluetooth Mate

Due to the vast amount of wires and other electrical components on our project expected to fit on glove, the following soldering steps are left more open for interpretation for the user.

To robustly connect the MCP23017 port expander we soldered its connections to a thin circuit board that we were able to place on our glove. We soldered wires onto our LEDs and then soldered the respective ends to ground or the circuit board connecting it to the correct labeled pins of the port expander. We then used this same breadboard to connect the power to our bluetooth mate in parallel with the power we supplied to the ninth pin of the port expander.

We used the heat shrink and some electrical tape in any of the locations where there was exposed wire. We attached photos to give a better sense of how we did this ourselves, but note that you are free to use whichever technique is most effective for you.

Step 6: Soldering the Flex Sensors

Similar to the previous step, this step is not as constrained and the soldering can be done however one feels is the most effective.

To allow for the greatest freedom of movement for our project we soldered wires to both ends of our flex sensor and then used heat shrink to cover up any parts of the exposed wire similar to how we had done with the LEDs.

Step 7: Connecting to the HEXWear Including Using an External Source

To connect this plethora of wires directly to the HEXWear we used crimp connectors and then screwed these directly onto the different ports of our HEXWear. This way we ensured a direct connection to each of our ports and were able to easily remove if we wanted to create new projects for our HEXWear.

We also connected a small external power source that could hold three AAA batteries to provide sufficient power for our HEXWear. We pinned this external power source to a wristband to ensure it was always connected and did not significantly inhibit movement.

Step 8: Attaching Everything Onto the Glove

Lastly, you will want to properly attach everything to your glove so your product truly is wearable. You will want to connect each flex sensor to a corresponding finger, negating the thumb due to the impracticality of its usefulness, and connect the corresponding LED that lights up to the flex sensor on that same finger. The most effective way we found to ensure proper bending of the flex sensor was tape, but stitching it onto the glove by using an extra piece of cloth will work just as well.

You will then need to connect the HEXWear, port expander, and bluetooth all to the same glove. We noticed it was also very effect to pin the external power source to a wristband to allow for greatest mobility and not inhibit mobility/wearability. As for the other components, we recommend using twist ties to wrap up any excess wire to consolidate space.

Be sure that you have strong soldered connections and no exposed wire so that there is great flexibility and freedom to put components where they need to be so that the product is as aesthetically pleasing as possible.

Step 9: Debug and Enjoy

Throughout this process there is great possibility for error, so we recommend checking that you components work as expected consistently throughout the process. This means consistently using the serial monitor on the Arduino sketch to confirm that your flex sensor readings are consistent, checking that after anything is soldered there is a strong connection and it still properly works, and that there are no exposed wires. Due to the large amount of electrical components in a very small place exposed wires will be your greatest enemy.

Once you have successfully built a working glove, enjoy! Have fun goofing around with your project and feel free to switch your piano sounds for any other samples you wish to have a truly unique wearable technology instrument!