This project was one that was completed in May of 2017 in my school's research program. It uses motion capture of a hand (or an object) to move the mouse on a computer and even has the capabilities to click the mouse.
Here is my abstract:
For my research I am going to work on a touchpad mouse. I got inspiration from this idea when I walked into a store one time and I saw a laser keyboard. The concept was a tower that projects lasers in a keyboard pattern and can detect what you are typing. This was a very interesting concept to me and I wanted to expand upon it with a mouse. The goal here is not to save space, but instead to get farther in creating a bridge between humans and computers. I have done a lot of research with motion capture in arduino but nothing was really close to how I am picturing achieving this goal. The way it should function is detecting a finger without having any accelerometers or gps. I plan to achieve this by using a pixy camera that is positioned on an angle on a tower. It will detect the motion through outputting the change in x and y and use sine and cosine to detect how much movement is actually happening on the table in delta x and y. It will then move the pointer on the computer dependent upon these changes. The pixy camera records in 50 frames per second which is one frame for every 20ms. This is very good for what I am trying to do because the refresh rate will be very small. Another addition to the project is the integration of a Piezo Element. The element is very inaccurate so i will put a fishing weight on top for more accuracy along with a breadboard with an amp to make it more sensitive. Another addition that may need to be added is a ping sensor on the bottom in order to get another reading of the change in x. I’m not really sure about this however we will have to see dependent upon the reliability of the device. There will need to be a lot of work on the software side of things involving possibly tweaking a mouse computer driver to work with my device. The arduino code will include a lot of calculations that will assist the arduino in delivering an output. My invention is a computer mouse that you can control with just moving your hand around. It uses an arduino in conjunction with a pixy camera along with a piezo element for the clicking circuit. The code uses one of two programs. The first one developed works simply off the change in x and y. The second program developed uses a tolerance in the shape of a box. When the hand goes outside the box, the mouse will move. The farther away from the box, the faster the mouse will move.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts List
- Arduino micro/ leonardo
- Pixy Camera
- Piezo Element
- Operational Amplifier
- 1m resistor
- 160k resistor
- 100k variable resistor
- 10uF capacitor
- 5V1 Zener Diode
- MicroUSB cable for pixy
- USB cable for Arduino
- Excess wire for breadboarding/ extending leads
- PVC pipe or wood to house the product
- A computer with Arduino IDE installed and Pixymon Installed
Step 2: Assemble the Click Amplifying Circuit
I found this circuit online on the website http://davidhoulding.blogspot.com/2014/02/high-sensitivity-vibration-sensor-using.html. This used a vibration input to power a buzzer using an arduino. I originally did this circuit on a breadboard because I was using an arduino micro, however i later decided to do it on a PCB and soldered it in order to make the subcircuit more permanent.
Note: You can ensure the circuit is working by using a Voltmeter like shown in the video by putting one probe on the output and one on the ground or you can run the test code that is also be attached to this step. Make sure to adjust the variable resistor in order to adjust the sensitivity.
Step 3: Build Housing/ Mount Pixy Camera
For this step you are going to need to build the entire structure of the project. I did this using 2 pieces of PVC, an elbow, and a circular piece of wood. I used the default mounting brackets in order to mount the pixy to the pvc.
Step 4: Setting the Pixy Up
After mounting the pixy you have to make sure everything is ready to go plug the pixy into your computer and load up pixymon. Make sure everything is in focus by twisting the lens on the camera. After everything is ready to go hold down on the pixy camera until a red light shows up. Look on the screen and put your hand (or the object wanted to move the mouse) into view. When it is completely filled with mesh press down the button on the camera again. You can mess with the pixy settings to make sure the sensitivity is right for the signature (pixy's term for the object set).
After doing this you have to install the pixy library into your arduino IDE. A tutorial can be found at this link: http://cmucam.org/projects/cmucam5/wiki/Hooking_up_Pixy_to_a_Microcontroller_(like_an_Arduino).
Step 5: Attaching the Pixy to the Arduino and Running the Code
Alas, you are almost finished with the project. After testing to make sure everything is working you need to attach the cable that comes with the pixy camera to the arduino. On the micro, the direction the 6 pin cable goes seems a little counterintuitive. After attaching in mount the arduino onto the housing and upload the code attached.
There are two versions of the code. Version 1 is one that relies purely on location. Version two basically sets an invisible box around the center of the pixy and moves at a speed dependent upon the distance from the box. Version 1 is a constant speed while Version 2 is an acceleration. I suggest using version 2 because majority of the testing was done on that version of the code.
Step 6: Final Step
Mount the vibration sensor to the bottom of the housing and run the leads up either by soldering or attaching extra wire. Attach it to the breadboard or PCB and make sure to run the output into the right pin on the arduino (check the code for reference). You can change the pin in the code.