Recent Changes - Search:

TEAMS Academy Wiki


THS0910


Explore TEAMS!
for visiting sophomores & juniors

Robotics

EnvBioTech

Bat Design

Assistive Tech

Students

Instructors

TEAMS Forum

TEAMS Calendar

TEAMS Web Site

Wiki Info

edit THS0910.SideBar

THS /

SharpSensorLab

Sharp Sensor Analysis Lab

  • Project Start Date: Week of January 11, 2010
  • Completion time lines:
    • Friday January 22: Data collection and model analysis should be complete. You need this model to write your final program which is due on January 29th.
    • Draft one-page report should be written by Wednesday, January 27th. I will provide "free" feedback on your report through the end of Wednesday.
    • Final report must be handed on by 2 pm on Friday, January 29th.

Objectives

  1. To perform a mathematical analysis of the A/D Arduino output for the Sharp Distance Sensor and find a mathematical model to fit the data and to minimize the model's root mean square error.
  2. To use the inverse of the model to accurately recover the original distance input

Data Collection Procedure (should take no more than 1/2 hour)

  1. Do some background research into the technical date for the Sharp distance sensor. The model number is printed on the sensor. An on-line robotics company called Acroname provides terrific technical data for many of the parts they sell. Print out that material and read it. What is the recommended range for your sensor?
  2. Hook your Sharp distance sensor up to your Arduino and write a small program to print out sensor readings every second (or use your P#5 program).
  3. Set up your Sharp distance firmly (tape or Velcro) on a cleared tabletop so it points down range (it must be level). I suggest you set your distance center 2-4" above the table (perhaps on the top front edge of a couple of stacked textbooks). Set a meter stick on the table (align 0 cm with the sensor, and have the sensor aligned to look in the exact direction of the meter stick).
  4. Place a target at the 1 cm mark directly in front of your sensor (it should be orthogonal to the axis of the sensor--look up the word orthogonal). A cereal box works nicely because it stands perpendicular to the table and can be aligned perpendicular to the path of the sensor invisible infrared beam of light).
  5. Now take sensor reading at each 1 cm tick mark, then move the box and take your next reading, etc. You should take at least 90 readings. The readings should not "bounce around" much at any particular point. If they do, then you probably have a loose wire or dd not hook up the sensor as we showed in class.

Analyze your data & develop a model to fit your data (2 - 3 hours)

  1. Type your distance and Arduino readings into Excel, and create a graph of your data with appropriate labels. If the results of the graph are not consistent, you should go back to the previous step.
  2. From your background research you should understand why the recommended range does not start at zero when you look at your graph. Be sure to discuss this key point in your brief lab write-up and explain this problem from a mathematical standpoint (review Precalc Chap 1) and the resulting physical implication you would run into when using the sensor (and how you can avoid those problems).
  3. After you've though about the limitation above, your goal is to pick a class of function that you can use to accurately model the behavior you see on your graph (e.g., come up with an equation that used the distance values as inputs and spit out the Arduino values as the output--develop a formula that "fits" the curve). You should use your knowledge of Advanced Algebra and Precalculus to select a function with the correct "shape", then either carefully select (using math) the correct coefficients, or use trial and error to determine the coefficients. This analysis should be build into your excel spreadsheet at we demonstrated in class.
  4. As you are "tweaking" your coefficients in your model, you should use an analytical tool rather than "eyeballing it" to minimize your error. Please calculate the root mean square (RMS) error for your data set, and as you adjust your coefficients, you should try to minimize this RMS error. Now you have your best fit model!
  5. Now take that model, find its inverse, and try plugging in your Arduino values into this inverse function (be sure to explain the significance of this in your brief lab writeup). You should graph this output versus distance and carefully explain the results in your brief lab write-up. What would you expect as an output if your model was perfect?? Now you have a model that you can use as a line of code in your final programming project! You might want to modify your last program to see how well your function works!

Results & Discussion: (Typed 1 page report, 1 - 2 hours)

Write a brief report (no more than one page, please) to discuss the theory behind this experiment and your results. What can you conclude about the importance of the mathematical concepts in Chapter 1 as it relates to computer systems working in the real world? Especially when these systems are used in systems on which our lives depend! Please attach your excel modeling results to your brief report. Please write in well-organized paragraphs and double-space between paragraphs.
If you would like me to read your draft report, I will be happy to do so and provide verbal feedback for you to incorporate. Please ask for feedback no later than Wednesday, January 27th.
Edit - History - Print - Recent Changes - Search
Page last modified on January 22, 2010, at 03:51 PM