AME 3623: Project 1
- All components of the project are due by Friday, February 15th
at noon
- Discussion within your assigned 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:
- create simple microcontroller-based circuits,
- read digital information from a switch, and
- convey information using a set of LEDs.
Circuit Overview
By the end of the semester, you will have a circuit on a connected
pair of breadboards that includes the following components:
- one Teensy 3.5 with supporting hardware,
- two motor driver boards for control of the lateral fans (9 digital
lines: reserve 3 PWM pins and 3 pairs of digital output pins;
each pair of pins must be on the same Port),
- one electronic speed control for the central fan (reserve 1 PWM pin),
- two switches (2 digital lines),
- four LEDs arranged in a circle (for indicating heading and
heading error: 4 digital pins on the same Port), and
- ten LEDs arranged in a line (for indicating heading velocity or
sensed distances: 5 digital pins on the same Port).
Not on the breadboard, but connected to it will be:
- four ducted fans,
- one inertial measurement unit (one I2C connection: reserve
Arduino pins 18 and 19),
- three cameras (one SPI connection: reserve Arduino pins 11, 12
and 13; and reserve 3 other digital output pins)
- two analog distance sensors (reserve two analog pins), and
- a power system.
Component 1: Microcontroller Circuit
Create a Teensy-based circuit on a solderless breadboard.
- Mount your Teensy board to the solderless
breadboard. The USB connector should hang off one edge of your
breadboard.
- Add a set of 4 LEDs that will be used to display the current heading
of the craft. These LEDs must be organized in a circle. Each
of these LEDs will be driven by a digital output pin (all on the same
Port). We recommend that these LEDs be mounted near the
Teensy board and that one LED be of a color different than the
other three; this one will correspond to a heading around zero
degrees.
- Add another set of ten LEDs that will be used to display
the heading velocity. You have been supplied with a 10-LED
"bar graph" module for this purpose (remember that the
direction of current flow matters, here, too). The 10 LEDs are
gathered into five pairs. Each pair of
LEDs should be driven by a single digital output pin. All five
digital pins must be on the same Port. We recommend
that these LEDs be mounted near the Teensy.
- Add a switch. The middle pin of the switch will be connected to
ground; a side pin will be connected to a digital input pin. This pin should also
be "pulled up" to +3.3V using a 10 K-Ohm resistor. We recommend
that the switch be mounted on the edge of the breadboard
opposite from the Teensy.
Component 2: Software
Implement the following functions:
- void display_heading(float heading) changes the state
of the heading LEDs to reflect a heading. The
range of the input parameter is -180 and 180, encoding
degrees in a left-handed coordinate system. Notes:
- Eight different heading ranges must be displayed
with different lighting patterns of the four LEDs
- For a given call to this function, you must execute
exactly one assignment to GPIOx_PDOR (i.e., only one "GPIOx_PDOR ="
line will be executed, though there may be several different
assignments that are possible, depending on the conditions).
- Only the bits corresponding to the four heading LEDs
may change state with this function call. All other bits must
be left intact.
- Your function may not assume a specific prior state of
the output pins.
- void display_heading_velocity(float velocity) will change
the state of the ten LEDs to reflect the current
heading velocity. velocity is expressed in degrees per
second and has a range of +/- 300. Notes:
- For a given call to this function, you must execute
exactly one assignment to GPIOx_PDOR.
- Only the bits corresponding to the five LED pairs may
change state with this function call.
- Your function may not assume a specific prior state of
the output pins.
- In your loop() function:
What to Hand In
All components of the project are due by Friday, February 15th at
noon.
- Code: Check your documented code into your
Dropbox directly under the project1 directory (folder). In general, you should use this Dropbox
to also exchange code with your group members.
Remember that documentation is about helping you and others
looking at your code to understand what it is doing.
Therefore, it will generally describe the logic of the code
(and not-necessarily the low-level details). For this class:
- At the top of your C file, provide project-level
documentation: include the project number,
group number, group members, date and the group member responsible for
the code.
- Each function must be documented (above the function
header). This documentation must include:
- A description of what the function does at a logical level,
- A list of the input parameters and what their meanings are,
- A description of the return variable type and meaning, and
- If the function has external effects (e.g., commanding an
actuator or modifying a global variable), these must
also be documented here.
- In-line comments must be used to describe logically what is
happening at that line or group of lines.
See an example for the specific format that we are looking for.
Other pieces:
- Demonstration/Code Review:
- The review triggers the grading process.
- The review must be completed by the Tuesday following the
deadline. However, the sooner you have feedback, the
better prepared you will be for the next project.
- The code and circuit must not have changed since the
deadline (unless your group is taking a time penalty).
- All group members must be present.
- If a code review is completed before the deadline, you
have the option to resubmit for an improved grade, as
long as the submission is done before the deadline.
Note that the resubmission may require a new code
review.
- Personal report: fill out the CATME survey. This will
be due shortly after the deadline. These personal reports are used
to provide feedback to you and your group members.
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." If
another group member must make dramatic changes to your code to
get it to work, then this will not count as your personal component.
For the
most part, personal programming credits are checked off or not
(checked off = full grade credit).
Group grade distribution:
- 35%: Project implementation
- 30%: Demonstration of working project (to either
of the TA or the instructor)
- 35%: Code 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. Generally, this weighting will be uniform across
the entire group.
andrewhfagg -- gmail.com
Last modified: Wed Feb 6 22:58:49 2019