CSCI 108 Lab 3
Pre-lab prep: Bring reading packet to lab.
In this lab you will build the robot base. You may, of course, come up
with your own design. However, if you prefer, you may follow the
design provided for you in the reading packet.
Your robot should have two wheels, each driven by a motor that is centered
under the mass of the robot. You may need additional, unpowered wheels
for balance. You should include enough space for the Handy Board and for
mounting sensors in front and in back. In particular, you should mount two
touch sensors on the front of the vehicle at this time. You may decide
to modify your robot over the course of the semester, but you should try to
come up with a lasting design.
The major goals for this base are robustness and driving control. Your robot
should be able to move straight as well as quickly turn to the left or right.
The smaller the turning radius it has, the better.
To test for robustness, you should be able to drive your robot around and
sustain repeated mild collisions with walls without serious disintegration.
Your base should feel solid, not flexible.
To achieve good driving control, make sure that the drive wheels are even with
each other and that the axles are well-supported. Be sure that your gear
assemblies don't have too much or too little play in them. You should gear
down the motors to get a good balance between speed and torque. Faster
robots are more exciting, but harder to control. You're welcome to add nifty
aesthetic elements, but only after your base is driving reliably.
I have provided you with a program that you can download to your Handy Board
in order to test your robot base. The program is in the file
baseTest.c and can be found in the CS 108 folder on the Computer
Science Department's "cortland" file server. To
get to the CS 108 folder, select the "Connect to Server" option from the
"Go" menu at the top of your screen. When asked for the server address,
type "cortland" (without quotes). Connect to cortland as a guest.
When you are asked what volume to mount, select "Courses". It's there that
you'll find the CS 108 folder. Copy the file baseTest.c from
the CS 108 folder to your Desktop.
Start up Interactive C as you did last week, and open the file
baseTest.c. Note that the program defines
the left motor to be the one connected to motor port 3 and the right
motor to be connected to motor port 1. Also, the test program assumes
that the left and right digital sensors will be connected to ports 11 and 14,
respectively. Either make
sure that your motors and sensors are connected in this way, or modify the
program accordingly.
To do the test:
- Connect the Handy Board to your computer and turn it on (if you
haven't already done so).
- Download baseTest.c by clicking on "Download". If you need
help with this step, let me know.
- Turn the Handy Board off, and disconnect it from the Serial Interface
Board (i.e., unplug the phone connector from the Handy Board). Now
place it on the base you have constructed.
Make sure that you've attached the motors and touch sensors to the board.
Now place your robot on the floor, turn it on, and get ready to test it.
To start the test, press the "Start" button on the board.
The robot should move forward, turn right, and turn left. It should then
spin to the right and spin to the left. It will repeat this process
until the "Stop" button is pressed or the robot hits an obstacle.
Note that it might not work as expected the first time. For example, you
might find that the wheels are moving backward, rather than forward. If
this is the case, then unplug the problematic motor from the Handy Board,
and plug it in again, reorienting the pins in the opposite direction.
Be sure to test the robot on a variety of surfaces -- carpet, different
types of floor tiles, etc.
You will need to demonstrate to me that your
robot is able to move as dictated by the test plan: in a straight line,
turn to the right, turn to the left; spin right; spin left. It should
also bump into some walls to show the robustness of the design of your base.
This lab must be completed by Monday, September 29 at 10:00 PM.
Before you leave the lab, please be sure to do the following:
- Quit out of Interactive C.
- Drag "Courses" to the trash in order to disconnect from the file
server.
- Log out.
- Make sure your Handy Board battery is being charged for next week.
- Put away any toolboxes, Lego boxes, cables, etc. These should all go
into the gray steel cabinet in the lab.