Build a Moving TARS Robot From Interstellar

by TechMartian in Circuits > Robots

14750 Views, 52 Favorites, 0 Comments

Build a Moving TARS Robot From Interstellar

17408354_1361671117223781_358280229_o.jpg

In this guide, we will be building a half-size of TARS to minimize the amount of materials while keeping it life-like. Keep in mind that if you want to build a larger size TARS robot, you may need to use very high-torque servo motors or stepper motors, which will require additional circuitry.

Inspiration: Interstellar

By far the star of the movie Interstellar was the monolithic chatterbox robot, TARS. Who doesn't love TARS? So, let's get building!

Why build TARS?

I've searched all over the internet and I could not find a single example of a TARS robot being built by other people. There are other example of people building replicas and cosplay models, but those are actuated by hand (or foot). Even the movie magic was created with advanced puppetry and physical manipulation. This instructable will be the first guide and build of TARS!

This instructable and project is made in collaboration with Kevin Dong.

How It Works

IMG_0200.jpg

The hardest aspect of building TARS is figuring out the dynamics of the robot. Given a two parallel plane surfaces, it is easy to make on move relative to the other using one servo, as two planes moving opposite to each other can be done with one actuation. However, it is unknown as to which plane would be moving. Thus, to restrict one side from moving, i.e. simply allowing one plane to move while the other remains at rest, requires two coupled servos, wherein the plane actuated is the only plane that moves.

The heart of the entire robot and the motion it is capable of doing lies in the coupling of 6 continuous rotation high-torque servo motors to accomplish full 4 legged body motion of TARS, 2 for each leg in the middle and one the two edges. This works because both servos are coupled. Since one the servos is powered and is programmed to remain still (programmed by lack of command given to the servo, while powering it) and the other servo is programmed to move, and given that the two gears are coupled together and the servos will choose to actuate the body of least resistance, both gears will move, and the body of one of the servos shall actuate. Using this principle applied over four parallel planes on one axis of rotation (and a bit of experimentation) we can mimic all the different motion that TARS can do. This can be analyzed using change of frame dynamics calculation using Euler angles, but we will not go though the details of the math and simply understand the motions conceptually. In theory, this can also be accopmpihed by using only 4 actuators, but we will stick with 6 in this instructables to keep the dynamics of motion of the robot simper.

You can download the servo couplers here. It is designed in Fusion360 and is a doubled-ended coupler so you can couple the motion of two servos together.

More details in the steps are coming up. Stay tuned.

Materials

Screen Shot 2017-05-08 at 7.49.44 PM.png

(6) Foam Board -- I bought mine from the dollar store

(2 set) Hot Glue Gun and glue sticks -- also from the dollar store, I used about 20 glue sticks

(1) Set square (for cutting marking, making right angles)

(6) Continuous Rotation High Torque Metal-Gear Servo Motors http://amzn.to/2n8D0zT

(3) Double-sided Servo Couplers (3D printed) http://a360.co/2nfHFmt

(1) Bread Board http://amzn.to/2n8HyGR

(1 set) Jumper Wires http://amzn.to/2n8B8r7

(1) Arduino Uno http://amzn.to/2novqn6

If you are not using an Uno, make sure that it has at least 6 PWM pins like the mega. For example the new Arduino 101 only has 4 PWM pins.

(1) Barrel Jack adapter for the Arduino

(1) Buck Converter http://amzn.to/2n8TEzH

(8) AA batteries

Model Scaling

As mentioned in the title, we are only building half-size model, because TARS is huuuuge.

Drawings and Plans Coming Soon.

Marking the Foam Board

IMG_0175.jpg
IMG_0176.jpg
IMG_0174.jpg
IMG_0177.jpg

Using a ruler, measure the dimension from the drawing above onto the foam board and mark it with a dot. This will serve as your guide for cutting. Using a set square, make sure the lines are right angles and draw the lines.

Alternatively, I have also made plans on AutoCAD that you download, print, and tape together as your guide. You can also use this file to laser cut the foam.

Cut the Foam Board

IMG_0181.jpg
IMG_0183.jpg

The black lines are full cuts. The shaded regions are score cuts,

I find it easier to not cut all the way through, but rather cut about 80% deep. Then, using the edge of a table bend the foam and you will be left with a paper hinge. Then cut this paper using the edge of the blade.


For the shaded regions, repeat the same technique of cutting 80% deep, then bend the foam on both ends, and peel off the foam layer from the paper, leaving you with a 0.5cm paper cavity. This will later be used for gluing.

Gluing the Foam

IMG_0185.jpg
IMG_0184.jpg
IMG_0188.jpg

Fill the paper cavities with glue and fold it into a rectangular prism shape, using the set square to make sure it the edges are square.

Repeat

IMG_0187.jpg
IMG_0190.jpg

So you have made is 1/8th of the entirety of TARS. Now, repeat the process 7 more times! Yes, he is huuuuuge. And mind you, this is only half size.

Making the Servo Mounts

IMG_0196.jpg

Cut a piece of foam piece where the servo will rest. I just eyeballed the size of foam I needed for this step and glued it to the edges of 4 of the legs.

That's it for now for gluing and cutting foam pieces. On to the electronics.

3D Printing the Servo Couplers

3D print 3 pieces of these servo couplers (made using Fusion360) which can be downloaded here: http://a360.co/2nfHFmt.

Friction Fit the Servo Couplers

IMG_0216.jpg

Place the servo coupler on top of one of the servos and use a rubber mallet to secure it in, until you cannot see the gears. Then, place the another servo on the opposite end of coupler and again, secure it in with a rubber mallet.


Repeat this 2 other times for the rest of the servo couplers.

Note: depending on the servo you have you may have to bore the hole a bit larger with a drill, or you may need to modify the CAD file.

I encourage you to couple all of these servos to each other and using a small piece of foam to test out a variety of motion to make sure that it is fitted well and the motion is as expected.

Remove Stickers From the Servo

Peel off the stickers from the servo since we do not want to glue the sticker onto the foam board, but rather the servo itself.

You may also roughen up the outer surface of the servo using a blade to increase surface area with which the glue may bond.

Position the Servos on the Legs

IMG_0194.jpg
IMG_0201.jpg

Position the servos on the servo mount you glued onto the legs on step 8 such that there is a small ~1mm gap between legs to minimize friction.

Mark the positions with a pencil and cut slots so the servo can be mounted flat on the foam board.

Gluing the Servos

IMG_0197.jpg

Glue the servos onto the servo mounts, where you marked it.

Labelling the Wires

IMG_0219.jpg

Label all the servo wires from 1 to 4 starting from the left.

This makes the wiring easier on the next step.

Wiring the Circuitry

Screen Shot 2017-05-08 at 7.22.29 PM.png
17379879_1361671100557116_7229927_o.jpg

Wire the connections using jumper cables and a breadboard following the diagram above.

All the servos are powered in parallel from the buck converter, which is powered from 8 AA batteries which will have a total of 12V

While each of the signal pins on the servos are plugged in to the PWM pins in an Arduino, which can be seen as the digital pins with a tilda (squiggly) sign "~"

Tape the Circuitry Onto the Walls of One of the Legs

17431741_1361671060557120_1605815412_o.jpg
IMG_0221.jpg

I used hot glue and duct tape to temporarily tape it onto on of the legs.

In retrospect it's better to distribute the load over different legs and use longer wires, as well as cases for the electronics.

Uploading the Code

Copy the following lines of code to the Arduino IDE.

First, test the servos using the following lines of code:

#include

Servo servo1; Servo servo2; Servo servo3; Servo servo4; Servo servo5; Servo servo6;

void setup(){ servo1.attach(3); servo2.attach(5); servo3.attach(6); servo4.attach(9); servo5.attach(10); servo6.attach(11); }

void loop() { servo1.write(0); servo2.write(108); }

For movement or motion 1:

#include

Servo servo1; Servo servo2; Servo servo3; Servo servo4; Servo servo5; Servo servo6;

// Calibrated values for CW/CCW max speeds and servo pins int s1[3] = {180,0, 3}; int s2[3] = {67,108, 5}; int s3[3] = {0,180, 6}; int s4[3] = {66,107, 9}; int s5[3] = {180,0, 10}; int s6[3] = {180,0, 11};

// Delay to rotate a servo 180 degrees at max speed int delay180 = 2500; int brakeSpeed = 0;

void setup(){ /*servo1.attach(3); servo2.attach(5); servo3.attach(6); servo4.attach(9); servo5.attach(10); servo6.attach(11);*/ }

int sign(int x) {return (x > 0) - (x < 0);}

void rotate(Servo servo, float angle, int info[]) { servo.attach(info[2]); if (angle > 0) { servo.write(100); delay(round(delay180 *(abs(angle)/180))); servo.write(90 - /*sign(info[0] - 90)*/brakeSpeed); delay(30); servo.write(90); } else { servo.write(80); delay(round(delay180 *(abs(angle)/180))); servo.write(90 + /* - sign(info[1] - 90)**/brakeSpeed); delay(30); servo.write(90); } servo.detach(); }

void loop() { rotate(servo1, 45, s1); delay(3000); rotate(servo1, -45 , s1); delay(3000); }

For movement or motion 2:

#include

Servo servo1; Servo servo2; Servo servo3; Servo servo4; Servo servo5; Servo servo6;

Servo sList[6] = {servo1, servo2, servo3, servo4, servo5, servo6};

// Calibrated values for CW/CCW max speeds and servo pins /*int s1[2] = {85,95}; int s2[2] = {80,100}; int s3[2] = {80,100}; int s4[2] = {95,85}; int s5[2] = {100,80}; int s6[2] = {80,100};*/

int info[6][2] = {{80,100}, {75,105}, {75,105}, {100,80}, {105,75}, {75,105}};

// Delay to rotate a servo 180 degrees at max speed int delay180 = 3000;

void setup(){ servo1.attach(3); servo2.attach(5); servo3.attach(6); servo4.attach(9); servo5.attach(10); servo6.attach(11); }

//int sign(int x) {return (x > 0) - (x < 0);}

void rotate(int ser[], float angle) { for (int i = 0 ; i < 6; i++) { if (ser[i] == 1) { if (angle > 0) sList[i].write(info[i][0]); else sList[i].write(info[i][1]); } else { sList[i].write(90); } } delay(round(delay180 *(abs(angle)/180))); for (int i = 0 ; i < 6; i++) { sList[i].write(90); } }

void loop() { int servos[] = {1,0,0,0,0,1}; rotate(servos, 90); delay(2000); rotate(servos, -90); delay(2000); }

You can use a variety of different motion, such as the cartwheel motion biped walk, etc. by modifying the degree of rotation of each servo from the code above.

Putting the Two Halves Together

IMG_0191.jpg
IMG_0189.jpg

Glue in two rectangular pieces of foam on the sides of one of the legs to increase the gluing surface area.

Mark the areas where the servos would fit and cut it open. Then, glue both halves together using hot glue.

Congratulations!

17408358_1361671130557113_1088470643_o.jpg

You now have your own working half-size model of TARS the robot.

Lessons Learned

I placed the foam legs a little too close to one another as such there was a much larger surface area, resulting in a large static friction margin that legs have to overcome. Therefore, the legs had a hard time moving up and and physically walking, although it was able to wobble for a while before one of the couplers slipped off (due to the use of plastic servos over metal geared ones). Though 2/6 of the servos I used were metal gears and did not slip off of the coupler.

Coming Up Next

Coming soon -- TARS2.0

- Voice functionality

- Improving coupler design to have a set screw or clamping design

- 3d printed servo holder

- Arms

- Movable pivot point

- More polished finish

- Stepper motor actuated

- Wireless radio control

Video tutorial? (if there's interest)

Vote for Me!

If you enjoy this instructables and would like to see more instructables like it please add it to your 'favourites' list and vote for me in the Robots and In-Motion contests. A 3d-printed would surely help a lot of my future builds.