AME 3623: Project 1
- All components of the project are due by Thursday, February 18th
at 8:55 am
- 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 single
breadboard that includes the following components:
- one Atmel mega2560 with supporting hardware (this is the "Arduino board"),
- one motor driver board for control of the fans,
- one analog gyroscope sensor,
- two switches,
- four LEDs arranged in a circle (for indicating heading and
heading error), and
- ten LEDs arranged in a line (for indicating heading velocity or
sensed distances).
Not on the breadboard, but connected to it will be:
- three ducted fans,
- a compass module,
- two analog distance sensors, and
- a power system.
Component 1: Microcontroller Circuit
Create a mega2560-based circuit on a solderless breadboard.
- See the bottom of the Atmel
HOWTO for a circuit starting point. This contains
everything that you need to create a program for your mega2560.
- Double-stick tape your mega2560 board to the solderless
breadboard. Minimize the area of the breadboard that is
covered.
- Add a set of 4 LEDs that will be used to display the current heading
of the craft (organized in a circle). Each of these LEDs
should be driven by a digital output pin (all of the same port). We recommend that these LEDs be mounted near the Arduino 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). Each of these LEDs should be driven by a
digital output pin. We recommend that these LEDs be mounted near the Arduino board.
- Add a switch. One end of the switch will be connected to
ground, the other to a digital input pin. This pin should also
be "pulled up" to +5V using a 10 K-Ohm resistor. We recommend
that the switch be mounted on the edge of the breadboard
opposite from the Arduino.
Component 2
Implement the following functions:
- void display_heading(int16_t heading) changes the state
of the heading LEDs to reflect a heading. The
range of the input parameter is -1799 and 1800, encoding
tenths of a degree in a left-handed coordinate system
Note 1: eight different heading ranges should be displayed
with different lighting of the four LEDs
Note 2: For a given call to this function, you must execute
exactly one assignment to PORTx (i.e., only one "PORTx ="
line will be executed, though there may be several different
assignments that are possible, depending on the conditions).
- void display_heading_velocity(int16_t velocity) will change
the state of the ten LEDs (and no others) to reflect the current
heading velocity. velocity is in 10ths of a degree per
second and has a range of +/- 3000.
Note: For a given call to this function, you must execute
exactly one assignment to PORTx and one assignment to PORTy
(you need two ports because you have 10 LEDs).
- In your main() function:
- If the input switch is in one state: slowly increment
heading from its minimum to its maximum value in 1-degree increments and
display it.
This value wraps-around when it reaches its maximum
value.
- If the switch is in the other state: slowly increase the
heading velocity from its minimum to its maximum value in
1-degree-per-second increments. This value wraps
around when it reaches its maximum.
What to Hand In
All components of the project are due by Thursday, February 18th at
8:55 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." 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 semester.
andrewhfagg -- gmail.com
Last modified: Wed Feb 10 23:43:54 2016