Drug Delivery - Task 3.

From Drexel University NanoEnlightment

Jump to: navigation, search

Contents

Ultrasonic Sensor

Introduction

The goal of this module is for your team to combine the fundamental building and programming you learned in Week 1 to have your robot follow a wall and turn corners. When navigating the maze that you will see in the Drug Delivery Challenge, it will likely be beneficial to you to be able to know the position of your robots relative to the walls of the maze. This could help in making decisions in deploying/activating your drug delivery mechanism (Am I close enough to the wall for the mechanism to go through?). The NXT kit comes with an ultrasonic distance sensor which will help in making such determinations. Before using it to do so, however, it is important to understand the limitations of the sensor and when it can be trusted to return useful data. To work towards this understanding, you will test the error characteristics of the device.

Looking at the ultrasonic sensor block within the NXT program, you should see that the device will return distance measurements in either centimeters or inches. This return will be in integer numbers (most of the NXT software deals exclusively in integers). This immediately tells us that almost all measurements will have, at the very least, rounding errors. If this were the only error in the sensor, we would expect a graph of error versus true distance to look something like this:
Image:DDWk3-errordist.png

  • This graph should tell part of the story, but not the whole story. We can expect the sensor to perform strangely near the limits of its operational range (when it is too close or too far from its target). The definition of error in this context is that given in the field of Control Theory. In the this context, it is the difference between the measured value and either the target value or current value. The current definition according to Wikipedia is accurate. http://en.wikipedia.org/wiki/Controller_(control_theory).
  • Please also note that the graph in your lab report should follow the guidelines given in the templates for ENGR 101. For example, the title must appear in the figure caption, not above the figure. The axis labels must include the variable being plotted, the name of the variable and the units of the variable. The background must be white, and the gridlines must be removed. These guidelines must be maintained for all figures in all lab reports.

Steps

  1. Program the robot to print sensor output to the screen. (See This Page)
  2. Program the robot to follow a wall. If you need some help getting started, a sample code can be found in the NXT software under the Robot educator tab-> Light sensor-> Follow a line-> Programming guide (this is basically an edge follower!). Experiment with different sensors to see which is the most effective for control. Experiment with the touch and distance sensors first. See if you can get the robot to turn a corner.
  3. Convert your wall-following robot into a line-following robot. Use electrical tape to draw lines on the floor. If you have time left over, work on making your line follower more robust: How sharp of a turn you can it handle? Can it interpret correct paths on crossing lines?

Note: Leave ten minutes at the end of the lab to tidy your workspace and return the tribot & kit for the next class. Also, the NXT kits are not as easily obtainable as the K'NEX parts so please do not lose them!

Deliverables (i.e. getting graded):

The grade for your group will be based on your success in obtaining the following data:

  • Set up the sensor to display its output to the NXT screen and, using a meter stick as a 'true distance' measure, determine the following:
  1. The limits of reliable sensor operation (nearest and farthest)
  2. The graph of error vs true distance in each of these three regions
    • A region comfortably within the operational range
    • A region at the near end of the operational range
    • A region at the far end of the operational range
  3. Identify areas where the sensor output is ambiguous (e.g. When the sensor is at 2" from the target it returns the value of 5". When you receive a value of 5" from the sensor you cannot tell if you are in the 5" region or the 2" region.) Record this data in your laboratory notebook and in an electronic spreadsheet file. Be prepared to show the hard copy of your data to your Laboratory Faculty Instructor and to your Student Teaching Fellow. Do not rely on one person for this task. Keep multiple copies in multiple notebooks.
  4. Program the robot to print sensor output to the screen. Deliver the text of the sensor output. (See This Page)
  5. Program the robot to follow a wall. Experiment with different sensors to see which is the most effective for control. We suggest experimenting with the touch and distance sensors first. (checked off by instructor/fellow)
  6. Submit the wall-following code with full code comments to the BBVista website or directly to your Faculty Instructor or Teaching Fellow.
  7. Program the robot to follow corners. (checked off by instructor/fellow)
  8. Submit the corner-turning code with full code comments to the BBVista website.
  9. Convert your wall-following robot into a line-following robot. Upload the corner-turning code with full code comments to the BBVista website.
  10. View the online animation entitled "The Inner Life of the Cell" [[1]] Identify at least three molecules, organelles, or cell types in the video such as tubulin, actin, mitochondria, or white blood cells. Discuss their dimensions, names, roles and propulsion or transport mechanisms with your Faculty Instructor and Teaching Fellow. How do the signals at the molecular scale differ from those you are using at the scale of your NXT robot?

If you have time left over, you can begin to work on making your line follower more robust. See how sharp of a turn you can make it handle, and if you can interpret correct paths on crossing lines. This code will help you complete the next phases of the project.

Personal tools