Uncategorized

Vancouver Robotics Club, April 2013

Always great stuff at the Vancouver Robotics Club. Next month is RC vehicles. I hope my HOG drive is ready by then. I’m already getting ready for the Vancouver Maker Fair 2013. Have you got your tickets?

PWM class

Bob gives a short class on PWM signals and how they work with servos.

IMG_2852

Christian has been building his first robot. It’s up and running around, which is huge step. Christian and his dad show up every month and always have smart questions.

Liz & Jonathan

Liz & Jonathan are make me a little envious. They can talk robots all day, every day.  Between them they have enough great ideas to keep 6 people busy for a long, long time.

great box, bad robot

Liz & Jonathan own a lot of robots of various sorts. So many that they brought one of their custom robots in this box that was “just lying around”.

crawlbot?

Crafting together a crawling robot.  The parts required a bit of massaging – and by “massaing” I mean “drilling out the holes until they fit”.

adapter on pan/tilt detail

At the VRC meeting I used my 3D printer to print a piece I designed the day before, and then when I got home installed it on the pan/tilt head I’ve been working on.  It’s the one below the big gear that holds the motor and small gear in place.

adapter on pan/tilt

Here’s a wide shot so you can see it better.  The two gears on the top left are from a Greg’s Hinged Accessible Extruder. The one in the bottom center I designed myself.

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.

Uncategorized

Rotary Stewart Platform Code Update, May 22 2013

Get v4.

– added RSP_Listen
– added RSP_MasterSlave
– updated RSPv1 to change pins for Arduino MEGAs
– updated Center to match pin config of other sketches

RSP_Listen is a new sketch that listens to the potentiometers from your Rotary Stewart Platform (RSP) joystick and displays them on screen.

RSP_MasterSlave uses a single Arduino to connect a RSP joystick to an RSP. When you move the joystick the slave mimics your movements. Great for animatronics.

Uncategorized

Building a 6DOF Joystick: Master/Slave test

RSP Master & Slave

Following from my earlier post I got all six servos converted. Now I have two Rotary Stewart Platforms next to each other on my desk. From the outside they look pretty similar. Inside I’ve converted one set of servos by removing the PCB inside and leaving the potentiometer.

servo to sensor 1

servo to sensor 2

servo to sensor 3

servo to sensor 4

servo to sensor 5

servo to sensor 6

servo to sensor 7

servo to sensor 8

servo to sensor 9

I also removed one gear so that the potentiometers could turn freely. I call this one the Master and it’s going to be my joystick.

I read the sensors with this code.

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

void loop() {
int i;
for(i=0;i<6;++i) {
Serial.print(analogRead(A0+i));
Serial.print(‘\t’);
}
Serial.print(‘\n’);
delay(100);
}[/code]

When I read from the six sensors I get values like this.

[code language=”c”]379 416 488 600 396 632
269 320 355 708 347 654
273 294 309 756 348 631
338 326 311 770 348 595
396 370 381 740 348 581
445 418 580 580 380 598
428 417 644 525 471 562
429 408 532 608 540 486
410 394 394 694 543 446
447 415 349 725 497 456
424 408 276 821 372 570
357 379 352 776 320 675
224 294 438 705 321 721
93 183 337 787 321 710
131 165 244 859 320 685
297 248 163 930 320 618
351 302 177 926 320 617
364 335 332 814 321 648
359 351 553 623 360 672
306 324 609 584 434 641
306 316 589 592 532 538
319 317 501 654 531 530
429 381 484 662 531 486
500 444 581 595 535 473
580 513 711 478 655 362
609 554 738 450 707 305
619 581 747 447 707 292
618 594 744 452 707 287
604 596 729 474 708 302
592 590 722 477 706 313
588 584 728 478 708 316
589 580 727 478 706 328
589 567 725 479 708 329
590 554 727 478 706 328
588 554 728 479 708 329
589 563 727 478 706 328[/code]

Then I convert those values to PWM signals and send them back out to the second set of servos, the Slave. The physical relationship is 1:1. The wiring is slightly backwards – the pin numbers run the other way on the far side of the Arduino so I put servo 1 in digital pin 7, servo 2 in pin 8, and so on.

I’m finding as I test this that the inputs and the outputs don’t match 100%. They’re very close but in some cases input moves 90 degrees and the matching output only moves 75. A configurable scale (*k) and constant (+c) adjustment for each input should take care of that.

Tonight I read How to make an UNO appear as a joystick to your computer and Wednesday I will give it a shot. With a little luck I can get this working and play Kerbal Space Program better. I have never successfully achieved an Orbital Rendezvous and it fills me with horrible, horrible nerd shame. I’m also going to 3D print a grip so it feels more like a traditional joystick. Minecraft and Descent are also good candidate games. Animatronics, too.

Mondays are supposed to be improve the site day but for the next two days I’m shipping orders, 3D printing, and getting ready to show off the Makelangelo at Grandview Elementary right here in Vancouver.