NXT Pit Viper - Lesson Planx - K12Lab

thunderclingAI and Robotics

Nov 13, 2013 (3 years and 10 months ago)

79 views

Overview

Snakes that belong to the pit viper family are named for the heat
-
sensing organs located near the eyes,
known as pits. This allows pit vipers to quickly and accurately find their prey. While our robot won't
strike within milliseconds, it can find prey usin
g its own Vernier Surface Temperature Sensors as pits.

In this exercise, we will build an NXT pit viper that will mimic the behavior of the real animal. We will
use two Vernier temperature sensors to monitor the air, much in the same manner that a pit vip
er
senses the temperature of its surroundings.
Close by, we will place a metal can filled with hot water.
The mechanical viper will move toward the high temperature, until it is situated in prime attacking
position. Once there, it will strike down, thr
owing its two claws around the can.

Objectives

Upon completion of this lab, students should



Have a deeper understanding of how we can use robotics to model and
better
understand the
behaviors of living organisms



Understand how we can control robot behavior

based upon feedback from its surroundings



Have a better understanding of more complicated robotic systems



Know how to
examine

LabVIEW VI’s and subVI’s to get a good idea of what a program does

Activity

1.

Gather the necessary materials for this lab. You wil
l need the following:

a.

Small aluminum can (the video example uses V8)

b.

Hot Water


the higher the temperature, the easier it will be for the robotic viper to
sense its prey

c.

NXT Lego Mindstorms kit

d.

Two Vernier temperature sensors

e.

Two Vernier motors

f.

NXT roboti
c base

2.

Open up Pit Viper.vi and examine the block diagram. Double click the NXT subVI’s and examine
their contents. If those VI’s have more subVI’s in them, the keep going down each level and go
through each one so you understand what they do. The top
-
level VI has description labels in it,
but as you go down through the layers, you will need to decipher each VI’s purpose on your
own.

3.

Build your pit viper with your NXT block and Legos.

a.

Since the viper will not be moving its base


only its “head”


you

can create a stable
base for it like the one shown in the video.

b.

Open the attached .lxf
file. To do so, you will need to have Lego Digital Designer
installed on your computer.
You can download LDD from the Lego website here:
http://ldd.lego.com/default.aspx



Use the arrows on the top, bottom, left, and right side of the window to rotate
the robot



Use the zoom option at the bottom of the screen to get closer looks at the
configuration

c.

Examine the file and build your robot as it is constructed in the .lxf file
. Make sure that
the temperature sensors are attached to the front
-
end, mobile extension, so that they
move with the motor.

Note
:
This model was built using three 40
-
tooth gears to alter the gear ratio. Each NXT
kit only comes with two 40
-
tooth gears, so you may need to substitute the turntable for
the 40
-
tooth gears if you only own one kit. The last photo uses a turntable


4.

Test your robot. Load the VI onto your NXT p
latform and place the robot within sensing
distance of the aluminum can. Fill the can with hot water, and then start the NXT program.
Observe how the robot “head”
moves to determine where the heat source is located. When the
head is centered on the can,

it will drop down like a pit viper attacking its prey.

a.

Run several different tests on the robot, with a can containing cooler and hotter water.
How does this affect the time to attack?

b.

Try running a test during which you move the can before the viper is
aligned to attack.
What happens when the “prey” changes locations while the program is running?

c.

Notice how short the intervals of rotational movement are when the robot is trying to
locate the prey. What would happen if you increased the intervals of mo
tion?

d.

We used three 40
-
tooth gears in our current setup to set the gear ratio. What would
happen if we expanded and added another gear, but kept the motor intervals the same?
What if we removed a gear
?

5.

Take some time to think about what you accomplished during this exercise. You built a
feedback system that scans its environment and then takes action based on the data it receives.
This type of system is actually quite prevalent in a number of differe
nt industries.

For example,
consider

MRI (magnetic resonance imaging) machines
, which

take very detailed
images of internal body parts, such as your bones or your brain. They capture the images by
scanning slivers of the area under inspection, one at a
time. Like the Pit Viper robot, the MRI
scanner scans an area, takes data, and then scans a different area.

Can you think of any other real
-
life systems that utiliz
e this scan and response

(either with
physical respo
nse or data collection/updates)?