The following is an exact transcription of Lab 9,
presented in the Fall 1995 semester.


Objectives

· Control the operation of a reversible motor drive for a camera

· Capture video remotely

· Add program documentation and create reports

Introduction

During the Viking 1 and 2 missions to Mars, the orbiters took extensive photographs of the surface of the planet. Subsequent careful analysis of these photographs revealed several clusters of objects that looked sufficiently different from the other martian features that some suspected that they may not be of natural origin. However, the orbiting photographs were not of high enough resolution to clearly determine the nature of the objects. To follow up on this possibility, the Viking 3 spacecraft has recently made a successful landing near one of these clusters. The lander is equipped with a video camera to take close-up pictures of the objects. However, shortly after landing, a failure was detected in the driver circuitry that controls the left-to-right motion of the camera. It is crucial for the mission to find some "fix" using available instrumentation to restore the motion of the camera. After making the camera operational again, you must scan the video images from the lander and determine if there is any evidence of life.

The camera motor drive requires a +4 V signal to pan right, and a -3 V signal to pan left. The voltage should be set to 0 to stop and remain in a given position. Although the circuit that generates these voltages has failed, a D/A module associated with another experiment is able to generate the required voltages and is available for use with the motor at times when the other experiment is not in progress. In addition, a system voltmeter was included on the spacecraft to assist in monitoring various critical voltage points. This voltmeter can be used to monitor the voltage applied to the motor drive. The circuit diagram of the motor drive and the connections to the substitute instrumentation are shown below.

Procedure

Part 1: Construct a Virtual Motor Controller

Design and construct a virtual motor controller using the multimeter and function generator. The panel view of the instrument should have two items: a set of "radio buttons" for motion control labelled, "Right," "Stop," and "Left;" and an indicator displaying the voltage applied to the driver circuit. The panel should be sized so that it takes up no more than half the screen. (The other half of the screen will be needed for the video window.) When the "Right" button is pushed, +4 V should be applied to the motor until the "Stop" button is pressed. Similarly, when the "Left" button is pressed, -3 V should be applied to the motor until the "Stop" button is pressed. Debug your program using the meter to check the voltage, since only one motor assembly and camera are available. When your program is working, you may test it by remotely connecting to a machine in the lab to which the test camera assembly is connected. (Hint: The voltage produced by the function generator is not always that specified, but depends on the load resistance. Do you expect the load resistance in this case to be large or small compared to 50 [[Omega]]? How will this effect the voltage to which the function generator should be set?)

Part 2: Program Documentation

In every object menu, there is an entry called Edit Description. When this is selected, a text window is opened that allows you to enter a description and/or comments explaining the function of the object. You must make an entry for every object in your program. The description will naturally be longer for more complex objects (e.g., userobjects), but it must be at least one sentence for every object.

Another object useful for documenting programs is the display->Note Pad object. These can be located at various points throughout your program to provide additional comments or explanations about program operation and flow. You must use at least two notepad objects to help explain the operation of the program in the detail view.

Finally, you must create a text document describing your program using the veedoc command. Follow the steps below to automatically generate this document (see pp. 2-13 through 2-15 in the text):

1. Go to a DOS window under MS Windows

2. From the WINDOWS director, type cd .. then enter cd\vee3 at the prompt to change to the HP VEE home directory

3. To print the document to the screen, enter veedoc C:\path\filename.vee, where filename.vee is the name of the file that holds your program, and path is the complete path to the file.

4. To save the veedoc output, enter veedoc C:\path\filename.vee > C:\path\filename.txt

Part 3: Capturing Video and Solving the Mystery

The image from the camera can be viewed using the QuickPict application in the Connectix QuickCam folder. This application opens a small window that can be placed alongside the panel from your motor control program. The image will not be updated when the window is not active, so you will need to click in the vee window, move the camera, stop the camera, then click back on the QuickCam window to see the new image. Use your program to scan the view from the lander to see if you can discover any evidence of life. If you find an image that gives evidence of life, capture the image to be included in your report. To avoid tangling the connecting cable, be careful not to rotate the camera more than a half turn in either direction before turning it back to its orginal position.

To capture an image using a remote PC, press the "Print Scrn" button on the keyboard. This copies the screen to the clipboard. You can then open a paint or word processing application and paste it in place. You can edit or crop the picture with your application.

To capture an image using a remote Macintosh, click on the camera-shaped icon in the left margin of the Timbuktu window. This copies the screen to the clipboard. You can then open an application and paste/crop as before.

Part 4: The Report

You must turn in a written report that has the following sections:

1. Cover page

This page must have the lab number and title, your name(s), course number and title, semester and year, department (Electrical and Computer Engineering), and university (Carnegie Mellon University!!).

2. Introduction (begin on next page)

Give some background on the problem. You may draw from the material in this lab handout, but you are also free to embellish as you are inspired. Conclude with summarizing what is in each section of your report. Point out the software that you are using to solve the problem (HP VEE and Timbuktu).

3. Program Description

Organize your program so that the functional blocks can all be seen at once on the HP VEE screen (use UserObjects as necessary to simplify the highest level view). Capture the HP VEE screen and use this as a figure in your report. Add a description with words (a few paragraphs) explaining how the program works and referring to the major objects in the figure. Refer to the program documentation generated by veedoc and include this documentation as an Appendix (see below).

4. Experimental Observations

Describe your remote observations. Include the date and time of the observations, and the remote machine or location from which you accessed the experiment. Capture the screen showing your program panel and the video image that you think sheds the most light on the question of the evidence for intelligent life on Mars, and include this as a figure. Comment on the significance of your observation.

5. Summary and Conclusions

Briefly summarize the original problem, the solution addressing the problem (design of a virtual motor controller), and the conclusions from the observations.

6. Appendix

Include a listing of the documentation generated with the veedoc command as an appendix. This documentation must include at least one sentence for every object.

Part 5: Grading

As indicated in the Course Syllabus, this lab is worth 10 points. The points will be distributed as follows:

Working program meeting the specifications: 5 pts

Report 5 pts

Proper format 2

Screen captures included 1

Veedoc complete 1

Grammar and style 1

Total 10 pts

Lab Logistics

The video camera and driver will be set up on kirin (machine C) during lab periods on Nov. 29, Dec. 1, Dec. 6, and Dec. 8. You should debug your program locally. When you are ready for a test, you may transfer your program to kirin and try it out on the camera. The camera will be set up for observations (also on kirin) between 5:00 pm Friday and Noon the following Monday on the following weekends: Dec. 1-4, Dec. 8-11. Labs will be due Wednesday, Dec. 13.

You should be able to:

· Demonstrate your test program with the test camera in the lab. The program should have the following features:

· Radio buttons for Right, Stop, and Left

· An indicator for the motor voltage

· Panel should take up no more than half the screen

· Present a report conforming to the format specified above.