AME 3623: Project 4: Analog Sensor Processing
- All components of the project are due by Thursday, February 26th
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:
- connect an analog sensor to your microcontroller,
- read analog voltage data, and
- display information through a USB serial interface.
Component 1: Microcontroller Circuit
Component 2: Analog Interface Software
Write a program that:
- Declares a file pointer at the top of your code (you are
declaring a global variable):
#include "oulib_serial_buffered.h"
// File pointer for USB connection
FILE* fp = NULL;
- Initializes the file pointer at the top of your main() function:
fp = serial_init_buffered(0, 38400, 40, 40);
sei();
- Initializes the analog port that you have connected your sensor
to (see lecture notes)
- In a while() loop, samples from the analog sensor every 500ms,
and prints out the raw value.
Printing to USB port example:
fprintf(fp, "Foo\n\r");
Note: Make sure to download oulib_serial_buffered.h and buffer.h from
the Atmel HOWTO page and insert them into your oulib/include folder.
Component 3: Data Collection
- Set up your sensor so that it is pointed in a direction that
does not have any obstacles.
- Place a flat obstacle at a known distance and record 5 samples
from of the raw analog value. The obstacle should be
orthogonal to the IR beam emitted from the sensor. Record
samples at least from the following distances: 5, 6, 8, 10,
14, 20, 30, 40, 60, 80 cm.
- Using a tool such as Excel or Matlab, graph the raw value as a
function of distance. Also graph the raw value as a
function of inverse distance.
What to Hand In
All components of the project are due by Thursday, February 26th at
8:00 am.
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
- 25%: Demonstration of working project (to either
of the TA or the instructor)
- 40%: 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: Wed Feb 18 23:40:24 2015