Uncategorized

Building a 6DOF Joystick: Chopping up servos

I want to provide a more concrete reason to get a Rotary Stewart Platform. So I figure the best way is to make a 6DOF joystick like this:

The method is pretty straightforward: build two stewart platforms. use one as the “input” and one as the “output”. Then take away the output, read the numbers from the input and report them to a PC as if it was a Human Interface Device (HID). Windows and OSX would recognize it. Then I would talk the Minecraft guys into providing support.

The first step is already half done: Rotary Stewart Platform is available now, if you want one. I asked Jonny Poole of InnerbreedFX how he built his and he said to open the servos, remove the circuit, and use the potentiometer already inside as a sensor.

.. and there it sat for about three weeks because I was completely stumped. The servo pot was returning garbage. I removed it completely from the servo, put it in a breadboard, and ran every combination of test I could think of. The multimeter returned sensible voltage on the middle pin when I put 5v across the other two and twisted the dial. but when I plugged it into an arduino with the following script:

[code language=”c”]void setup() {
Serial.begin(9600);
Serial.println("START");
}

void loop() {
Serial.println(analogRead(A0));
delay(100);
}[/code]

the numbers were all over the place. As I slowly turned the dial it would sometimes jump to 1023, sometimes to 0.

In the end I gave up and got another. Within about 2 minutes I had sensible numbers. In case you were wondering, sensible numbers look like this:

[code language=”c”]START
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
25
73
75
75
75
75
75
85
96
146
208
254
308
369
433
486
543
606
668
727
772
800
809
808
808
810
813
824
883
954
1006
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1006
960
916
862
807
749
681
616
561
499
436
372
317
258
193
141
99
52
4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
37
75
119
160
205
260
308
350
397
470
551
622
693
766
827
878
928
967
997
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1023
1010
991
973
966
964
959
929
911
911
911
911
911
911
911
911
911
911
911
911
912
911
911
911
911
911
910
911
910
911[/code]

Next up I’ll convert five more and then connect two stewart platforms together.