E5 Lab 2

Machine Shop
and Introduction to Servo Control


Machine Shop



Machine Shop

Welcome to the second lab in E5, where you will learn your way around the Machine Shop in the basement of Papazian (next to Hicks).  You will be using the shop to fabricate some simple components for the robot class project, but first you must learn the basics of how to use the machines correctly and safely. Our machinist is Grant Smith, who goes by the name of Smitty. Please pay attention to his overview of the machine shop during lab period this week and next.

For the "galumphing robot" project, I have put you in the following lab groups based on the interview information you supplied in lab last week:

Lab A Lab B Lab C
Group A1:
  • Awjin Ahn
  • Nora Kako
  • Allison King
  • Neil Macfarland

Group B1:

  • Luke Alventosa
  • Julia Heer
  • Amy Jin
  • Tony Lee
  • Ruisen (Eric) Liu

Group C1:

  • Gregory Cox
  • Ari Gewirtz
  • Kwame Koram
  • Alia Mancisidor
  • Chris Moyer
Group A2:
  • Hayden Dahmm
  • Andrew Karas
  • Sara Lentricchia
  • Karl Sadueste

Group B2:

  • Brian Lee
  • Eileen McHugh
  • Chris Pfeiffer-Kelly
  • Jeff Seelaus

Group C2:

  • Paolo Debuque
  • Ali McCulloch-Villoldo
  • Vincent Potenza
  • Irving Stone
  • Evelyn Wightman

Group A3:

  • Darien Sepulveda
  • Jonah Schwartz
  • Noah Weinthal

Group B3:

  • Lauren Barlow
  • Tyler Clapp
  • Dimitri Lewicki
  • David Lin
  • Emily Zhang

Group C3:

  • Caleb Cochrane
  • Erik Jensen
  • Sergio Rosas
  • Eduardo Umana


Group B4:

  • Mia Ferguson
  • Antony Kaguara
  • Max Krackow
  • Sizhao (Bill) Wu

Your group should plan to use the first part of lab next week to cut the board that will form the robot's base, as well as fabricate the sheet aluminum pieces to hold the wheels. This week, after the shop overview, you should return to Trotter 201, select the components described below, and try to get the servos working. If you don't have time to do so in lab this week, feel free to come to Hicks 213 and work through the steps below. The parts will be in the E5 cabinet.


You can use the new "sandbox" to access your previous WordPress posts and pages:


Along the right hand side is a login link. Once you login, you should be looking at your Dashboard, and can create/edit your Posts and Pages. You and your group can feel free to return to the Settings->Appearance portion of the previous lab and fancy up the look of your group's website.


The robot you will design and build will be controlled by a computer using servos. Servos are motors that rotate through a total angle of approximately 180° to a specified angular position (-90° to +90°), as determined by the temporal length (duration) of a square-pulse voltage between 0 and 5 volts. For instance, a pulse of 1.52 ms (milliseconds) duration, repeated every 14 to 20 ms, will cause the arm of the servo to remain at the 0° position; one of 0.6 ms will cause rotation to the maximum counterclockwise position (-90° as seen from above); one of 2.4 ms will cause rotation to the maxium clockwise position (90°). In this lab, we will learn to control the 3 servo motors that will be used in the robot's crawling arm. Commands to the servos are sent from the computer's serial port, through a wireless Bluetooth link, to a Lynxmotion servo board. The Bluetooth wireless links should be paired already (if not, let a wizard or professor know, or go through the procedure for pairing them yourself). The "1" Bluetooth unit should be placed in the computer's COM1 port (usually in the back of the computer case) and powered via a USB power cable connected to its side; the "2" unit will connect with the Lynxmotion board and is powered from it.

Here is a top view of the Lynxmotion servo board:

And its underside shows a wire soldered to connect Pin 9 of the Bluetooth connector to the 5V supply of the servo board:

Here are the 3 servos:

And how they connect to the servo board (locations 0, 1, and 2). Please make sure that the black (ground) wire is to the outside of the connector:

The battery pack clips onto the servo board and a green LED shows it is on. The Bluetooth receiver "2" connects through an adapter to the DB9 connector on the servo board:

If the blue lights on both the paired Bluetooth wireless serial devices are on continuously, they have synchronized and you can proceed to make the computer control the servos, as follows:

  1. Log in and access the Windows XP terminal emulation program "HyperTerminal" via Start->Accessories->Communications->HyperTerminal. If you are using a Windows 7 computer, download the HyperTerminal program (which does not come standard) by clicking here, then unzip and run the program HyperTerminal.exe.
  2. You may have to specify the area code (610) because this is an old "dialup" program. Choose a name for the setup, say "servocom" or your group's name.
  3. Hang up (disconnect) using the icon or menu, then open the "connection" (via File->Open) called dcom1.ht in the hyperterminal folder; it has the correct settings for our robot controllers already saved. If you'd like to set the communication parameters youself, use File->Properties to set HyperTerminal to 38400 baud, 8 bit, 1 stop bit, parity none, flow control none. Go to File->Properties->(Setup tab)->Ascii Setup and click on the first two radio buttons. These turn on "local echo." You can save the setup (to Swatfiles) and next time recall it so you won't have to repeat the setup step.
  4. Test the communcations with the servo board by typing (without the quotes) "#0P1500" (where all the 0's here are the number 0, not the letter "o"). If the system is communicating correctly, the servo connected to port #0 should rotate to near the center of its range.
  5. Place a silver mounting disk on the servo so that you can see rotational orientation. The number following the "P" is the number of milliseconds of duration of the +5V pulse sent to servo port #0. Experiment with changing this P-number so that you can see the correspondence between rotation position and the number you type. Use a protractor and take enough data points so that you can use the correspondence between milliseconds and angle in later programming your robot's arm to grab and pull (or push).
  6. Test the other two servos similarly using commands such as "#1P1500" and "#2P1500" and see if all three servos behave the same way. You may also wish to measure how fast your servos move, as some are faster than others, and the faster servos should go farther out on the robot arm.
  7. When you are done, please disassemble everything and put it back for other groups next week.

Next week we will fabricate and assemble the robot in lab, and begin to program it using Matlab commands that send strings such as "#0P1500" out of the computer's serial port to the servo controller. If you want to get started, open Matlab via the desktop icon, download the sample program servo3test.m and paste it into a blank script (File->New->Script), saving it as "servo3test" into your Matlab folder in MyDocuments, and run it by typing "servo3test" to the Matlab prompt. The program should move the 3 servos connected as in the example 1-6 above.

Comments or Questions?
 Send me email         

Carr Everbach
Engineering Department
Swarthmore College