Project 4: Height Control

All components of the project are due by Tuesday, May 5th at 9:00pm.

Project Goals

At the end of this project, you should be able to:

Hardware Overview

The heli hardware is the same as the previous projects. Remember that we have a total of two test stations and three heli stations.

Each test station is equipped with a Devantech sonar sensor unit and a compass. Each sonar unit is equipped with a sonic transmitter which will emit a small burst of clicks. The receiver will sense the signal that has reflected off of some surface. By measuring the return time of the signal, we can infer the distance to the surface.

For the heli stations, the sensors will be placed underneath the helicopter (facing upwards). This way, we can measure the height of the heli at a given time. We will then use this information to hover the heli at some specified height.

The interface to the sonar unit is as follows:

Note: After the reflected signal has been detected, you must wait for at least 10 msec to command the next sonic pulse.


Project Components

For this project, you will modify your microcontroller circuit to provide an interface to the sonar unit. You will be writing the software that is necessary to control the sonar and to interpret the signals that you receive from it. Finally, you will be using the estimated height to control the heli

Part 1: Microcontroller Circuit

Designate one additional input pin and one output pin. Wire these into the sonar connector.

Part 2: Sensing Distance

Implement an interrupt service routine (e.g., one that is attached to the timer0 overflow interrupt) that does the following: Modified hint: a finite state machine can be used to tell the ISR what control phase the sonar is currently in. Then, use a "clock" variable in your ISR that is incremented every time the ISR is called.

Part 3: Height Display

Part 4: Height Control


References


What to Hand In

All components of the project are due by Tuesday, May 5th at 9:00pm.

Grading

Group grade distribution:

Grades for individuals will be based on the group grade, but weighted by the assessed contributions of the group members.


fagg [[at]] cs.ou.edu

Last modified: Mon Apr 20 21:16:01 2009