4 - Handy Board
Home Up

 

 

SOFIA

Home Page
Table of Contents
Background             
Astronomy
Mount
Infrared
Balancing
Experiments
1 Balance and Torque
2 Center of Mass
3 Moment of Inertia
4 Handy Board
5 Auto / Manual
6 Light Sense
7 Track Control
Interactive-C Code
   

 

The Handy Board

Introduction:

The Handy Board is a complete controller, display, and power supply board designed for experimental mobile robotics work. MIT has licensed the Handy Board design at no charge for educational, research, and industrial use. The Handy Board is based on the Motorola MC68HC11 processor, and includes 32K of battery-backed static RAM, four outputs for bi-directional control of DC motors, a connector system that allows analog and binary (digital) sensors to be individually plugged into the board, an LCD screen, and an integrated, rechargeable battery pack. This design is ideal for experimental robotics project, but the Handy Board can serve any number of embedded control applications, and this is why it was chosen as the processing component for this project. This portable device was designed for student and research use to be user-friendly and readily accessible, since it has a majority of necessary experimental components located on the board.

Objective:

The Handy Board capability, just like any other computer, combines hardware and software technology. This section will provide (and is only intended to be) introductory knowledge about both the hardware and software components. For more detailed information about the Handy Board please go to this site http://el.www.media.mit.edu/groups/el/projects/handy-board/.

Hardware:

The processing capability of the Handy Board is very slow when compared to today’s Pentium processors, which can perform 300 to 500 million calculations per second. The Handy Board’s fundamental instructional clock only runs at 2 million cycles per second. The Handy Board can only store 32 kilobytes of data, but this is quite adequate for surprisingly complex tasks. It is capable of measuring time to the nearest millisecond, and has a multiplexer and 8-bit A to D converter on it. The Handy Board might not be the fastest, but its ease of use makes up for it. The Handy Board comes with a connection cable that allows it to receive and send information to a host computer. It also comes with a battery charger, that allows you to slowly charge the battery, which is the recommended method, or to quickly recharge the battery to a operating level.
The rest of the Handy Board is made up of input/output devices that serve specific functions. It has several input options, and all can be accessed by the Interactive C code using the proper call to specific library functions for these devices. The simplest of these devices, that is very useful in initiating or ending loop functions, are the “stop” and “start” buttons located on the bottom left corner of the board. The Handy Board will read these inputs when the code calls them. The “knob” is another type of board-mounted input that allows you to input various values between 0 and 255 and can be used at run time to assign a value to some variable in the code.  The primary source of inputs are the analog and digital connectors (or ports).  They are located along the bottom of the Handy Board. These inputs supply perceptual data through the use of external sensors. The 7 analog inputs can return a value between 0 and 255 while the 9 digital inputs return values of 0 and 1. For classroom experiments we are using the analog inputs to sense the proximity to a surface and intensity of light and enable us to sample values of this data. The library of input functions which read sensors are valuable assets to the Handy Board for control loop experimentation.
The Handy Board also has several ways to output processed information. A small LCD screen provides the user with an easy way to view up to 32 characters, and a buzzer generates a range of tones. It also has 4 DC voltage sources it uses to control motors (approximately 9 volts and 1/2 amp). Library functions allows the motor sources to be turned on in either direction, and to provide different average power levels by delivering pulsed voltage to these sources. A fourth output controls a servo, such as is used in Radio Control hobby vehicles, which is really a combined input and output, together with a library code function. Under code command the servo can be set to any angle between 0 to 180 degrees.

Software:

The Handy Board is an easily accessible, usable, and understandable tool, but to get it to work for you it must write the necessary program code. The software environment supports the Handy Board for the optimum efficiency of this tool. The software developed by MIT mainly for Motorola 6811 CPU embedded systems, including the Handy Board is a type of C language called Interactive C. Interactive C (version 3.1 or 3.2) with an integrated compiler, syntax checker and down loader environment has been produced as a commercial product by Newton Labs. For detailed information about interactive C go to this site http://www.newtonlabs.com/ic/index.html .
Interactive C is a simplified language based on C that can perform all the basic functions of other languages such as for loops, while loops, if statements, arrays, etc… It can also handle constants and local or global variable of type integer, long integer, and float. Integers are also accepted in Boolean operations where “0” is false any other value is true. Some general instructions for Interactive C are the print statement, sleep command, loops, variable definition and declination, and the if - else statements. In addition the code environment includes a library of predefined input and output functions which were described conceptually under the hardware description above. Attached are some sample programs* that will show the proper syntax and use of these simple commands and basic functions.
This software not only allows you to author programs but it provides a fast effective way to transfer a compiled and debugged program from the host computer to the Handy Board. The following describes briefly the steps to follow to run your own program on the Handy Board. The Interactive C software must be communicating to the board when you want to download a test program. Once the board and computer are communicating, open your program and go to the load menu and click on “load window” to compile and download your program to the board. Finally, turn the Handy Board off and back on, and your program should begin to execute .

* Sample Programs

Motor On/Off

/*This program will allow a user to turn on and off the

fan at the push of a button, using source '3'. 6/15/99.*/

void main ()

{

   while (1)

   {

      printf("Begin push START--end push STOP!");

      sleep(2.0);

      while (!start_button())

      {

         printf("Please hit the Start Button.");

         sleep(0.3);

      }

      fd(3);

      while (!stop_button());

         off(3);

   }

}

Motor Pulse

/*Controlled fan on/off over a specified

period using motor source '3'. 6/10/99.*/

float x;

void main ()

{

   printf("Adjust knob for time--hit START\n");

   sleep(2.0);

   while(!start_button())

   {

      x =(float) knob() * 0.02;

      printf(" %f\n",x);

      sleep(.3);

   }

   fd(3);

   sleep(x);

   off(3);

   beep();

}

Servo Test

void main()

{

   float a;

   servo_on();

   while(1)

   {

      a= (float) (knob() % 180); /* modulo 180*/

      printf ("angle=%f\n", a);

      servo_deg(a);

      sleep(0.02)

   }

}

Sensor Test on input 0.

/* Simple Analog Sensor Test on input '0',

version 1.3 tlg, 8/16/98*/

void main()

{

   printf("Plug in port '0'\Hit START = stop\n");

   /*note less than 16 characters / line*/

   sleep(2.0); /*time to read message*/

   /*Display sensor loop*/

   while(!start_button())

   {

      printf("Sensor = %d ", analog(0));

      printf("\n");

      msleep(100L);

   }

   beep();

}

/*Note two nested tasks,"main (always

required for C)", and "while" */

 

 

 

To request information on this web site in a Section 508 accessible format, please contact access@mail.arc.nasa.gov.