3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

DIY 3D Controller

DIY 3D Controller
Make a 3D interface using an six resistors, aluminum foil, and an Arduino. Take that, Wii.

The basic goal here was to make a 3D hand-position sensing system that most people can build, while still preserving some semblance of functionality. To get an idea of possible applications, check out the demo video. If you think you can build one that is simpler and equally accurate, or slightly more complex and more accurate, share in the comments!


DIY 3D Interface: Tic Tac Toe from Kyle McDonald on Vimeo.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Materials

Materials
«
  • 2690918640_257b724fba.jpg
  • 2690118127_ae3d9c2d2c.jpg

Tools

Materials

  • (3) 270k resistors
  • (3) 10k resistors
  • Solder
  • Wire
  • Aluminum foil
  • Cardboard

Optional:

  • Tape (e.g.: scotch)
  • Shielded wire (e.g.: coaxial cable, ~3')
  • (3) alligator clips
  • 3-pin header
  • Zip-tie
  • Shrink wrap tubing or hot glue
« Previous StepDownload PDFView All StepsNext Step »
182 comments
1-40 of 182next »
May 20, 2011. 5:10 PMavillanueva1 says:
I had problems with the code, the processing tell me that i have an error ArrayIndexOutOfBoundsException 2, am i doing something wrong?
Jun 11, 2011. 8:47 AMjimmy dean says:
I am also getting the same error. It is pointing to this line in setup:

serial = new Serial(this, Serial.list()[serialPort], 115200);

Has anyone solved this yet?
Jun 11, 2011. 9:11 AMjimmy dean says:
Ok, I figured it out.

If you were getting that error from the serial line, you have to make sure that the serial variable at the top is the correct serial port. If you look above the error, it should show the serial port that you are using. Mine was com4 so it showed:
[0] "COM4"
Therefore in my situation I had to change the serial variable to 0.

I also got that error randomly sometimes when I would run the program. I think that came from the board sending data before the program starts receiving it and then the program starting halfway through a line. To fix this I just made sure to hit the reset button at the same time I hit run on the processing code and it solved my problem.

Hope that helped :)
May 21, 2012. 11:07 PMAccount1212 says:
Hey, i know it's been awhile, but i am having a related issue, and i thought you might know how to fix it. See i switched the variable to 0, and it works, but 0 is for com1, and my arduino is plugged into com3. Com3 is 1, but whenever i change the variable to 1, the code doesn't run.
May 14, 2012. 2:31 PMArduino Guy says:
My sensor is not sensing my hand if it is farther than 3 cm away form any plate... can this be the result of using unshielded cable? or is it something else.
My readings are around 3500 an all plates and they rise if my hand is within 3 cm.
May 21, 2012. 2:31 PMArduino Guy says:
Well.. My arduino has a battery pack and a xbee... so thats the problem Ill try connecting it to ground, what a stupid mistake. I will let you know my results.
May 14, 2012. 2:43 PMArduino Guy says:
Also I forgot to add, my wires are ~5-10 cm, the third one longer.
May 2, 2012. 6:14 AMsamblam says:
Hi there,
I just made the 3d controller and im now trying to make it work. Im new to processing so when I tried to 'just drop the folder TicTacToe3D' in the folder I found under sketch->show sketch folder it wasnt opening. so i just dragged the 3 .pde files on the screen and pressed Run.

This gave an error
in line 54: if(parts.length == sensors) {

'Cannot find anythin named "sensors"'

Does anyone know what is the problem and what is the solution?

Thanks,
Apr 5, 2012. 12:06 PMtinker234 says:
nice job would alrger scale be praxcticle for movemnet of the whole body
Mar 19, 2012. 9:04 AMrandomg says:
Nice work!

If I understand this correctly, you got this to function as a 3d mouse? Is that correct?
Mar 6, 2012. 6:00 AMratchai says:
Hi, your work is a great study for me. I have to revise my hi-school physic lecture.
But the change of capacitance is really big enough to be measured by micro controller? That is awesome!
I don't really understand how the hand can act as ground. The capacitor can be made by 2 conductive plates, right? but we have only one plate with hand here. Would you please clarify me?

Thank you for good work and
Thank you for reply in advance
Feb 4, 2012. 3:30 PMpierceRom says:
To anyone who actually got this to work ,

Does changing the aluminum foil to actual Aluminum plates work ?? I know they both conduct electricity but crinkled foil break easily unfortunately =/

Feb 5, 2012. 1:13 AMjonRomero says:
i just finished building the circuit and made sure nothing short circuited, but nothing is changing even when i press the Space button. The arduino code is fine and the Processing code too is good to go. However The only warning message i get is


WARNING: RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
[0] "COM3"

Does anyone know how to fix the RXTX Version mismatch ???
Jan 31, 2012. 10:29 PMpierceRom says:
Hi there !!! im totally new at this whole electronics thing and I wanna try this project but i ran into a bit of problem.

I have built the board and everything but my problem is with the code. Where exactly is the code for the arduino ?? Or is the program " Processing" code suppose to upload the code into the arduino ?? Sorry if this question seems noob but im really new at this =(

Thank you soo much for any help !!
Feb 1, 2012. 7:48 AMpierceRom says:
Thank you sooo much for the quicky reply !! So the interface code goes into the Arduino and the TicTacToe code goes into Processing ??

But shouldnt there be a camera in the code somewhere so i can interact with the TicTacToe game in 3d ??? Where would that code be ??

Sorry once again if my questions seems completely retarded , im really new at all this unfortunately =
Feb 2, 2012. 5:46 PMpierceRom says:
Last question i promise !!

It seem that there were two files " Interface" and "Tic Tac Toe " in the download section .

So the interface code goes into the Arduino board and the TicTacToe code goes into Processing ??

Sorry but could you clarify that a little bit ??? Many many thanks for your help !!

Cheers

Pierce
Dec 26, 2011. 6:25 PMNannerman says:
I wonna play tick tack toe on a 3x3x3 led matrix made up of 2 colored leds :D. I just got an arduino uno so lets see if I can make something half as cool as this.


Now looking at the materials, I think I need to build this.
Nov 17, 2011. 5:50 PMshaemmerling says:
could this be used as a 3d mouse for spinning 3d models with hand motion. like grabbing an pbject and spinning it. i know its been a while since this has been commented on but thought id try.
Oct 21, 2011. 9:03 PMaefields says:
How does one convert the input from the sensors to a scale from 0-255 for PWM output?
Aug 30, 2011. 10:13 AMmrmerino says:
left hand green.
Jan 26, 2011. 3:42 PMwillrandship says:
Hey, remember me? :P

I'm doing it ruch better now. last time I made many mistakes, like the foil touching, the circuitry on the wrong side of the cable...
Sep 28, 2010. 9:23 AMDemonSpawn says:
Im going to try combine this and a 3x3x3 bicolor led cube to make a interactive 3d tic tac toe! im so excited!
Nov 9, 2010. 10:58 AMim3733 says:
If you do that, consider having the cube be clear so that you can see the center cell. otherwise, you will only be able to see 11 of the 12 cells.
Jan 26, 2011. 3:40 PMwillrandship says:
I think he meant where the leds just hang in midair, by their wires, which will be clear.
Dec 29, 2010. 7:25 PMpp21 says:
i have read all the comments and tried EVERYTHING! i can not get anything to show up, on the computer screen or in the box thing! what am i doing wrong. please hep me.
Nov 3, 2010. 4:23 PMpp21 says:
what kind of resistor
1/8-Watt 10K Ohm Carbon Film Resistors
10K Ohm 1/4-Watt Carbon Film Resistor
or
10K ohm 1/2W 5% Carbon Film Resistor
Apr 23, 2010. 2:55 PMSubFusion says:
would it be possible to have a double sheet and connect resistors to the mcu
in every corner of a sheet and then get 2D resolution X , Y of the capitance of the sheet. etc like comparators are used to deside the direction of light by have four photoresistors and making a wall between everyone of them in a cross.

I think I'll try
Mar 22, 2010. 4:05 AMsebasto-oo says:
Dear Kyle, Bravo for that great idea, it opens a wide new world of  cheap DIY potentialities leading to high end original control interfaces.

The problem is that, even though i scrupulously followed your building instructions, i can't seem to have the device interact in any way with my hand.

I just finished building it, and i seem to have a problem. The code seems to be working fine, the TTT demo at least : the code compiles just fine on processing, i just had to change the value of the serial port. Processing lists and finds the serial ports, compiles OK, the Java windows opens on the TTT, but no matter how hard i wave my hand around, there seems to be no interaction at all.

I must confess that i suffer a double handicap : i'm french, and i don't know much either about electronics or about Processing ;-)

But i'm very eager to learn, believe me.

I have a intuition, though : i could not find a single hint about where to connect the shielding wire onto the plate's side (the alligator clip's side). I tried different combinations, like soldering the core wire and the shield wire together, leaving the shield wire unconnected, etc. But none of them work until now.

Since i obviously forgot something, somewhere, would you have a hint for me ?

Thanks a lot for your help, and again, Bravo !

Seb

Feb 7, 2010. 11:13 AMdagenius says:
Is there any way to have this act as an alternative mouse?
Feb 7, 2010. 5:42 PMdagenius says:
But could you use the z dimension as a click function? that way you have a complete mouse...
1-40 of 182next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
111
Followers
6
Author:kylemcdonald