You are on page 1of 11

# http://www.k12lab.

com/lessonplans/arachnosaurus

ARACHNOSAURUS
By: Karl Wendt and Graduate Students Tufts University Center for Engineering Education and Outreach

Introduction
This project is designed to show you how to create linkages and walking mechanisms. The Arachnosaurus is based on Jansen linkage. Theo Jansen came up with these innovative "walking linkages" to allow his kinetic sculptures to come to life. You will also learn how to create while loops, case structures, and motor and touch sensor controls. Linkages are used to convert one type of motion into another. In the Arachnosaurus project rotary motion is converted into a walking motion using a Jansen linkage. More information on linkages:  1 Uses  2 History  3 Theory  4 Types of linkages

Experimentation Questions

1. Change the position of the linkage connection peg on one of the drive gears. What happens to the motion of the legs? If you add wheels to the front feet and not the back, what happens and why? If you don't use wheels, what happens and why? 2. What are three ways you could make this robot more reliable? What goes wrong and why? How could you fix it? 3. How could you make the tail (rear touch sensor) a part of Arachnosaurus' actions? 4. How could you change the code to make Arachnosaurus grab a pencil from you and deliver it to a friend several feet away?

Teaching Standards
We recommend linking your project's content to the nationally recognized Common Core Standards for literacy in science and math. Learning Opportunities: In this lab students have the opportunity to understand the following: 1. How to create a system that controls movement to accomplish a goal 2. Torque

2. Linkages 6. Teamwork and collaboration 10. Computer programming 7. open its jaws. Sensors BUILDING INSTRUCTIONS This eight‐legged dino is going to walk up to a person. Create 8 leg linkages like the one shown above. . and then turn around and walk away until it encounters another obstacle. Statics and structures 9. Gears and gear ratios 5. Electronics and motors 8.3. Friction 4. Build the jaw assembly and attach the ultrasonic sensor. 1. flash its eyes.

5. Connect leg linkages to frame and output gears (please note the exact location of the legs is critical to the success of the walking motion. See the Simulation CGI of Theo Jansen 's Mechanism Video for details.3. . 4. Connect motors to the input gears and wire motors and sensors to the ports shown in the programming section. Attach the jaw assembly to the leg assembly and test.

Next we're going to add the ultrasonic sensor to so that Arachnosaurus can "see" where a person or obstacle is in front of it. From the drop down menu. Start by creating a While Loop. but outside the case structure. 3. Next we need to add a comparison VI." Right‐click the Port input at the top of this VI and choose "Create ‐‐> Constant. Right click the left node of the stop sign VI and select "Create ‐‐> Constant. choose "Read Ultrasonic. This creates an infinite loop so the program continually repeats everything you place within the loop. 2. This can be found in the "NXT Programming ‐‐> Structures" palette. Add the Less Than VI (NXT Programming‐‐>Comparison)." Be sure this constant is set to "False" ("F"). Add a "Read Ultrasonic" VI ("NXT Programming ‐‐> NXT I/O" palette) inside the while loop." Make sure "Port 2" is selected. Create a .Programming Instructions 1. Place a case structure inside the while loop.

Then. This will stop Arachnosaurus when it "sees" something that is in front of it. The lower the number. wire the Less Than VI into the "Case Selector" (green question mark) on the Case Structure. Make sure the top of the case loop (The inside loop) says "True" at the top. and set the constant to ports B & C. set the motor to off/ break using the drop‐down at the bottom of the VI. turns and then walks away. add a Motor Control VI (NXT I/O palette) and wire the pink NXT wire to the sonar VI outside of the case loop. Right‐click the Port input that’s at the top of the motor VI. Finally. This value tells the NXT when to respond to information from the ultrasonic sensor. the closer Arachnosaurus will get before he throws a tantrum. 4. Next create the conditions inside of the True case of the case structure. and set the constant value to 20. .constant off the bottom input. Then.

we are going to set up the right light sensor or "eye". Add 3 while loops inside the True case of the case structure. Add a Wait For VI (NXT . We are now going to add the blinking red eyes! Add a Read Sensor VI to the top while loop and select Read Light‐‐>On from the drop‐down. To make the lights blink we need to add a wait function. Then. First.5. Right‐click at the top of the light VI to create a Port constant. and select port 3. 6. wire the break motor VI to the light VI inside of the top while loop.

25 seconds. Select Read Light ‐‐> LED off from the drop‐down of the light VI. Right‐click the greater than VI. To make it blink we have to turn it off. Next. Wire the pink NXT wire of the wait VI to the light VI. and if you are using a Mac press Cmd‐C and move your curser to the middle while loop. create a constant off the bottom input of the greater than VI and set the constant to 50. Wire the blue i to the top input of the greater VI. after the wait VI. Right‐click the Time input of the wait VI to create a constant and of .I/O palette) next to the light VI. Next. select all the VIs in the top while loop with your mouse by left clicking and dragging a box around them. insert another light VI. This connects the iteration to the end of the loop. If you are using a PC press Ctrl‐C. Insert another wait VI and wire it to the light off VI. Finally. Then create a constant off the last wait VI and set it to . This will make the lights turn on and off 50 times before they stop. 7. Now to get the lights to turn on and off more than once we have to set the loop iteration.25 as well. This will cause the light to stay on for 1/4 of a second. Select the blue i in the box in the left‐hand corner of the top while loop and move it to the right side of while loop. and insert the greater than VI into the while loop near the blue i. Then. This will copy all of the work you did in the first while . press Ctrl‐V or Cmd‐V to paste the code into the middle while loop. wire output of the greater than VI to the stop condition at the bottom right of the while loop. Go to NXT programming‐‐>comparison‐‐>greater than. This will make the light turn off for a quarter of a second.

loop. . Add a Motor Control VI to the False case. Right‐click on the power input of the motor to create a constant and set the constant to 75. This section of code will allow Arachnosaurus to walk forward if nothing gets in his way. 8. Then wire the motor to the break VI that’s outside of the case structure. This will cause the left light sensor or "eye" to blink too. Then wire the first light VI to the pink NXT wire coming from the brake and going to the top while loop. Create a Port constant and select Ports B & C. Go to the top of the case loop and select the False case. Next you will need to change the port settings on the lights to port 1. This will give Arachnosaurus enough power to move those complicated linkages and walk forward. Now that the "eyes" are programmed. it’s time to set the false condition in the case loop.

Then. This will make the mouth close again. and set the constant to 4.9. Create a constant to set the speed of the motor to 45. Finally. Next insert another motor VI and wire it to the wait VI and set its speed to 45 and its direction to forward. This is what will happen when Arachnosaurus is met with an obstacle. In the bottom while loop. wire the bottom terminal of the greater than VI to the blue i in the bottom while loop. Wire this motor VI to the Break motor VI outside of the while loop. Then wire the wait VI to the motor VI. To do this. add a Wait For VI (NXT I/O) next to the motor VI. Next. Now it’s time to create the code that allows the mouth to open and close and allows Arachnosaurus to turn and walk when he encounters an obstacle. Change the case structure back to the True case. Then create a Port constant on the same motor VI and set the port to A. Make sure you set the motor direction to back. Now add a greater than VI (Programming ‐‐>Comparison). Next we will need to set the amount of time the motor should run so that the mouth can open fully. Create a constant off the Time input. wire the output of the greater than VI to the red stop condition in the lower right of the while loop. .5. and set the time value to . add a Motor Control VI. create a constant off the top terminal of the greater than VI.

You are almost done! To make Arachnosaurus turn around and head away in a different direction after showing his fierce teeth and eyes to the obstacle in his path. insert a wait VI and create a constant time of 12 seconds. The more friction. the shorter amount of time is needed to make him turn. You may need to change this number based on how much friction there is between Arachnosaurus' feet and the floor. Then. . add a forward motor VI.10. You can experiment with adding wheels to add or reduce friction between his feet and the floor. and create Port C constant for this motor control. You are all set! Have fun. and create Port B constant off the Port input. Finally. select Motor On‐‐ >Reverse from the pull‐down. add motor VI. we need to reverse the two main drive motors for 12 seconds. Inside the case structure but outside of the bottom while loop.