AME 3623: Project 5: Sensor Models
- All components of the project are due by Thursday, March 5th
at 8:00 am
- Groups are the same as for project 1.
- Discussion within groups is fine.
- Discussion across groups may not be about the specifics of the
solution (general programming/circuit issues are fine to
discuss).
At the end of this project, you should be able to:
- design mathematical models for transforming raw sensor data into calibrated information,
- implement these models in code, and
- test the models.
Component 1: Sensor Model
Given the data that you collected, derive a mathematical equation for
distance as a function of sensor value. Keep in mind:
- The output of the function should be in mm
- Using a simple mathematical function, you will be able estimate
the distance quite well over a reasonable range. For the
purposes of navigation with these distance sensors (and nearby
obstacles), think about which set of values need to be most
accurate. Use a representative point to define one point that your
function must capture well and then select any other parameters
to best capture the rest of your data
- The plots of your data from the previous project will help you to solve this problem
Component 2: Analog Interface Software
Define a new variable type in "project.h":
typedef enum {
LEFT = 0,
RIGHT = 1
}DistanceSensor;
DistanceSensor is the variable type. LEFT and RIGHT are the two values
that DistanceSensor variables can take on.
Implement the following functions:
- uint16_t get_distance(DistanceSensor side) will read
the analog port attached to the left distance sensor (if side
== LEFT) or the right distance sensor (if side == RIGHT)
and return the value in mm. Computing the distance from the
sensor value must be done using integer math (i.e., no floating
point variables).
- void display_distance(uint16_t dist) and
will change the state of the ten LEDs to reflect the current distance.
Component 3: Testing
Write a test main() function that repeatedly:
- Reads both the left and right sensors
- Displays both distances in mm on a single line.
Then:
What to Hand In
All components of the project are due by Thursday, March 5th at
8:00 am.
- Demonstration/Code Review: All group
members must be present. Given time, this can be done during class.
- Check in the following to your
group dropbox on D2L for project 5:
- Personal report: fill out the CATME survey. This is due
by Monday, March 9th at 11:59pm.
Grading
Personal programming credit:
- Each person must accumulate at least three personal programming
credits over the course of the semester (this project offers
one)
- To receive credit, you must be the primary designer,
implementer and debugger of the component. This does
not mean that your other group members should not be looking
over your shoulder. But: you must do the "driving."
Group grade distribution:
- 35%: Project implementation
- 30%: Demonstration of working project (to either
of the TA or the instructor)
- 35%: Documentation
Group Grading Rubric
Grades for individuals will be based on the group grade, but weighted
by the assessed contributions of the group members to the non-personal programming items.
References
andrewhfagg -- gmail.com
Last modified: Thu Mar 5 12:18:05 2015