loading

This is a project I've been working on for a couple of months. It uses a gyroscope sensor to detect how the glove moves, and move the cursor accordingly, and flex sensors to detect if your fingers are bent and activate the left and right mouse buttons. When you click, the glove buzzes a motor to simulate feedback, as if it were an actual mouse click. If your ring finger is not bent, the cursor will not move, this feature allows you to adjust the position of your hand easily. The microcontroller I used for this project was the Adafruit Bluefruit Feather (I intended to use Bluetooth and make it function wirelessly), but Adafruit's Pro Trinket is a cheaper alternative. In the GIF, I'm playing Skyrim with the glove, the ring finger sensor allows me to easily pan around, and the glove makes the game feel a lot more interactive!

Gyroscope Sensor -

https://www.parallax.com/product/27911

Cheaper Adafruit Model (accelerometer)-

https://www.adafruit.com/products/2019

Flex Sensors - You will need a flex sensor for each finger you intend to map

https://www.adafruit.com/products/1070

Adafruit ProTrinket - I suggest the 3V version, it's all you'll need to power the flex sensors

https://www.adafruit.com/products/2010

Vibrating Motor - The one I used was from RadioShack

https://www.adafruit.com/products/1201

10K resistor (Brown Black Gold) - at least 3, used with the flex sensors

Step 1: The Flex Sensors

The flex sensors are really what ties this project together. In the previous edition of my mouse glove, I used tinfoil on my fingers as a sort of contact sensor with my thumb, but the flex sensors are a lot easier to use, and they were fairly easy to incorporate into my design and code. Like with all of their projects, Adafruit supplied an extensive tutorial on the proper use of flex sensors. You'll need the resistors here, but Adafruit explains that.

https://learn.adafruit.com/force-sensitive-resisto...

The sensors were sown into the glove, and glued at the tip so they could not slide out, so far this method has been very successful, although if you plan to solder the sensors to wires, you'll want to go ahead and do that before you glue them in. I also added some extra glue to the headers, so that I wouldn't have any problems in the future with a crossed wire.

An example of some code you could use with the flex sensors:

int ringPot = analogRead(A0);

if(ringPot < 750) //less resistance, as finger is bent more, test this with serial output, until you find an acceptable limit

{

//insert function here

}

Step 2: The Motor

The vibrating motor was a very simple addition to the glove, I just had to connect the positive end to a GPIO pin (and the negative to ground), and then I used PWM to operate it, but digitalWrite(HIGH) will work just as well.

An example of some code that you could use to activate the buzzer:

if(ringPot < 750) //statement from previous step

{

digitalWrite(BUZZER, HIGH); //turns motor on

delay(25); //waits 25 ticks

digitalWrite(BUZZER, LOW); //turns motor off

//function to click mouse

}

/*don't forget to declare the motor in your setup and use a constant variable to declare BUZZER as a pin*/

Step 3: The Code

Since I wouldn't recommend the gyroscope I used, I won't post the code I wrote for the glove. Fortunately I found a tutorial on Adafruit that explains how to use an accelerometer with the Arduino Mouse Commands and an I2C connection (Unfortunately I didn't see this before I made my glove).

https://learn.adafruit.com/pro-trinket-usb-hid-mou...

This is a link to the official Arduino MouseKeyboard reference that I used. It has a Mouse.move() and a Mouse.press() function, both of which I used in my code.

https://www.arduino.cc/en/Reference/MouseKeyboard

Step 4: The Final Touches / Fully Operational

Finally, I used heat-shrink tubing to strengthen my soldering connections, and prevent them from wearing out. As you can see in the picture, I used a breadboard to make the connections to the microcontroller, but Adafruit also sells some pretty cool permaboards that would work well also, if you were interested in a more permanent project.

https://www.adafruit.com/products/1609

https://www.adafruit.com/products/1518

If you do plan to use a non-flexible board, I would suggest only using one long strip of hot glue to attatch the board to the glove, this prevents the board from pulling on the fabric. I spread the glue from the knuckle of my index finger, down to the bottom right of (the top of) my hand.

<p>It is very clever. I would definetly use it (if i had VR) while playing FSX:</p>
<p>amazing!</p>
<p>This is a very clever invention I will definitely try it in the future</p>
<p>voted in both competitions, great project and thanks :)</p>
good work<br>
good work<br>
<p>voted, great work</p>
<p>Thank you, I appreciate that</p>
<p>Thank you, I appreciate that</p>
<p>really awesome project, well done!! do you use any resistors for the flex sensors or they don't need it? also, if you have time, check my message :)</p>
<p>Yes, I used 10k ohm resistors</p>
<p>That is so cool! While I'm not really into gaming, I can definitely tell that it really helps! :)</p>
<p>Awesome controller!</p>
<p>Thanks!</p>

About This Instructable

4,659views

151favorites

License:

Bio: I'm a pretty awesome guy. Really, that's all you need to know.
More by ShoelessJo3:Halloween Surprise Candy Bowl MouseGlove 2.0 - for Everyday Use and VR 
Add instructable to: