Ever get tired of forgetting the fingering for a high B flat and embarrass yourself in front of your fellow band members? No? Just me? Well to help me memorize my flute fingerings (instead of practicing), I built a Haptic Flute Teacher to help me remember how to play each note. After reading this article about a haptic piano teacher, I tried my hand at making one for a flute. I used two Arduinos, a couple of buzzers, and a lot of wires to make this thing come to life. The Haptic Flute Teacher knows the fingerings for all the notes on the flute (including flats and sharps) and can teach you how to play the chromatic scale! To use this flute teacher, you put on the gloves and then you select the note or song on the LCD by pressing a button. When the desired note or song is displayed, hit the other button and the fingers that you would press down on the flute start to vibrate, showing you the fingering. By vibrating each finger, the idea is that the fingering for the note would become muscle memory. This project is mainly for people who somewhat know how to play the flute and need help memorizing fingerings for notes and songs. This project could also help those who do not have much coordination or hand injuries where they are unable to hold things still. Before attempting this project make sure you know the basics of Arduino and some circuitry. With the intro out of the way, let's get to the build process!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Part List
LCD display - to display the note/song
2 Pushbuttons - to choose what note/song to play
10 Vibrating Motors - to glue to the gloves
A pair of gloves - to mount the motors
2 330 ohm Resistors
1 10k Potentiometer
1 Passive Buzzer
A box to house the electronics as you practice
Hot Glue Gun
Your Brain (the most important)
Step 2: I2C Protocol
Since we are dealing with ten motors and the Arduino can only control the speed of the motors with PWM pins, we need more than one Ardunio to control all ten motors. Each Arduino has about 6 PWM pins so when we connect two Arduinos we have a grand total of 12 PWM pins. To connect the two Arduinos we use the I2C protocol. Put simply, this is a way of having one "master" Arduino control other "slave" Arduinos by sending data through the wires. Look at my fritzing diagram to set up the I2C protocol. Connect A4, A5, and GND of the two Arduinos. In the code, the master Arduino sends a value through the wires and the slave Arduino receives it. Depending on what the value is, the slave Arduino executes a different task. For example, if I want to play a low C on my flute, the master Arduino sends the value for low C through the wires (while also telling which fingers on the right hand to vibrate) to tell the slave Arduino to make the fingers buzz for low C. Here's more info on I2C protocol.
Step 3: Prep Your Motors
These motors are cheap and pretty bad. The wires will fall out of the motor easily and render them useless. You'll want to put a blob of hot glue where the wire connects to the motor to secure them. Then carefully strip the skinny wires of the motor and solder better wires to the motor wires. It's ok if one is defective or you end up breaking one because when you play the flute there is no key for your right thumb, so you only need 9 motors.
Step 4: Mounting Motors on the Gloves
First, put on the gloves and make sure they fit. Keep them on and grab your motors. Find a place where the vibrating motors will fit comfortably and the ends will spin without hindrance. Then grab some hot glue and while the glove is on your hand (or not if you can't handle the heat) glue the motors on the desired place on your finger. Then take the good wires you soldered on and glue them onto the length of the glove so they don't get tangled. Then take some longer wires that will ultimately connect to the Arduino (make sure they are long enough so that you can freely move around when they are connected to the Arduino (probably around arm's length)) and solder those to the wires connected to the motor. Twist the two wires of each motor together so you know which wires control each motor. Now that you got the motors and glove set up, we'll set up the control hub for the motors on the breadboard.
Step 5: Connect LCD
There are several different step-by-step guides showing you how to hook-up an LCD to an Arduino. Here's a link to the Arduino website telling you how to hook it up. The problem with the Arduino website is that the tutorial uses the PWM pins for the LCD which we need to control the motors. So, I changed which pins the LCD connect to so that I could free up the PWM pins for the motors. Check my diagram for what I did. Specifically, here is what I changed: rs = 7, en = 11, d4 = 5, d5 = 8, d6 = 12, d7 = 13. You use the 10k pot for the LCD display. Make sure you connect the LCD to the master Arduino not the slave Arduino.
Step 6: L293D Set-Up
Ok, so these chips are motor drivers. Each driver can control 2 motors, with the ability to reverse the motor's direction in the code. For my purposes, I have a lot of motors and not much room. Since it does not matter which way the motor turns (it buzzes regardless of the way it turns), I connected one end of each motor to ground and the other to the output pin of the motor driver, allowing the chip to control 4 motors instead of 2. Check my wiring diagram above how to wire them up. I also added the datasheet for more information on what each pin does on the L239D chip. For now, leave the input pins empty as I will cover that in the next step.
Step 7: Wiring Up Your Arduino to L293D Set-Up
Now take your three components (the glove w/ motors, L293D set-up, and LCD display w/ 2 Arduinos) and connect them together. The master Arduino will control the motors on your right hand and the slave Arduino will control the motors on your left hand. On the master Arduino connect: Rpointer motor to pin 3; Rmiddle = 10; Rring = 9; Rpinky = 6. For the slave Arduino connect: Lpointer = pin 11; Lmiddle = 10; Lring = 9; Lpinky = 6; Lthumb = 5. The wires from the Arduino connect to the pin of the L293D next to the pin the motor it controls is connected to. Check my fritzing for the exact spots. Also, you need to have your buttons set up here. These should be quick to set up, just follow my fritzing. I used 330 ohm resistors for the buttons. Connect one to pin 2 and the other to pin 4 both on the master Arduino. The one connected to pin 2 will choose the note and teh one connected to pin 4 will make the motors vibrate for the note that is displayed on the LCD.
Step 8: Code for Both Arduinos
We need two separate sets of code for each Arduino. I uploaded them to my GitHub. They each have the names of the Arduino that they are supposed to be uploaded to. Make sure you take a look through my code. If you have any questions they should be answered there.
Step 9: Powering It
Since the motors use a lot of power, I used 2 9V batteries to power it. It's probably not the best, but it worked for me. Connect the vin of both Arduino to the power rails of the breadboards and connect the ground of the master to the rails of the breadboards. And now you are ready to practice your flute!
Step 10: Some Extras
In my code, you may have noticed I have commented out a few lines. Those lines are for making the flute teacher play along with you through a passive buzzer. I did not have a buzzer so I simply added the feature just as something cool. Simply uncomment out my code and add a buzzer to an open pin on the Arduino. Now you have a play along teacher!
Place the electronics in a box or bag to make your flute teacher portable!
You can program more songs! Since I have each note as a method, you can simply add another condition in my switch statement and put the order of the notes of the song you want to play. To change the timing, change the delay between each note.
Let me know if you have questions or concerns in the comments below. Happy flute playing!
Participated in the