Objective: |
THIS PROJECT SHOULD BE DONE INDIVIDUALLY!
In this project, you will implement closed-loop circuits with the Arduino. These circuits do not
take any input from the user through the PC; all activity takes place on the board.
|
|
Where to get parts |
If you need common components, you can go to the ECE shop in Atwater-Kent, Room 112. They have lots of small
parts, such as all kinds of resistors, capacitors, etc. They know you are coming. You will need to pay them (cash)
for the parts you need. Also, there are links at the bottom of the course Web page to other sources of parts.
|
|
What to do: |
The project objective is to familiarize you with using the Arduino to read inputs and write outputs (eletronic components).
For this you are going to build two subprojects, described below.
-
Part 1: Auto-Adjustable Light Intensity
In this part, you will make the intensity of LEDs vary according to the amount of bend detected from
a flex sensor plugged into the Arduino. The more the bend, the brighter the LEDs should
light. You should use the LEDs to represent the bend variation. The amount of light should vary
continuously from no light (neither LED is turned on) when the flex sensor has little or no
bend, to one LED with a "medium" bend, to one LED at full brightness as it bends more, up to two LEDs
with "full" bend.
Using the same light-intensity variation approach, and based on code examples 5-3 and 5-4 from "Getting
started with Arduino", build a circuit that emits more light the darker the environment is. Once again,
the amount of light should vary continuously from no light (neither LED is turned on) when the environment
is very bright, to one LED with a medium intensity when the environment is a little darker, to one LED at
full brightness as it gets darker, up to two LEDs at full brightness when the environment is totally dark.
For both circuits, you should define maximum and minimum thresholds for the values received from both sensors,
so that the LED intensity values can be correctly adjusted.
Most of the materials will come from your kits.
For this sub-project the equipment you are going to need is:
- 2 LEDs
- A Photocell (light-dependent sensor, or LDR)
- A 10KOhm resistor for the LDR
- A flex sensor
- Resistors for the LEDs
- You will need to obtain a 10MOhm resistor for the flex sensor
Hint: Analog values obtained from sensors vary from 0 to 1023 while values to be set to LEDs vary only from 0 to 255.
-
Part 2: Make Music
Using examples 4-2 through 4-5 from "Getting started with Arduino" and the on-line references below, you are going to build a musical instrument using the
Arduino: a single-key keyboard. The potentiometer that comes with your kit will be responsible for defining the key to be played. While the
button is pressed, the key defined by the potentiometer will be played.
For this sub-project the equipment you are going to need is:
- The linear trim pot (potentiometer)
- The buzzer
- The button
- The 2 LEDs from the kit for extra points (see below).
References on how to play sounds with Arduino and use the potentiometer follow:
Extra points: Add blinking lights whose blinking pattern changes according to how the notes are played. Two options are suggested here:
- Random-color LEDs whose blink speed varies according to how fast the notes are being played. So, fast-paced songs should be accompanied by a disco-like
blinking while slower ballads have much more constant illumination and less blinking (you do know what disco was, right?).
- LEDs whose colors are associated with a certain range of notes. For example, lower notes would be a blue light, middle notes would be a yellow light, and
higher notes would play in red light.
Feel free to use your creativity and make the music interact with the light in ways other than the two ones described above.
|
|
Attacking the Problem: |
Your goal here should be to understand simple input and output control.
Search for projects done by others that accomplish something similar to what you are doing. Start small, and build up.
|
|
What to Submit: |
All documents are to be submitted electronically via turnin by 11:59 am (12 noon)
on the day the assignment is due. Also, you will demonstrate your circuits to the instructor at a specified time.
The following items should be submitted for this project:
- The code for each (sub)project part
- The circuit schematics for each (sub)project
- Photographs of your circuit (you can get a digital camera from the ATC for this)
- A brief description of any work you did to earn you extra points
Name each file something that makes sense.
When you are ready to submit, zip up all your files into a single archive file.
Name the file LastnameFirstname_proj1.zip.
You will use the new Web-based "Turnin" facility to submit your work. Information
about submitting can be found here:
http://web.cs.wpi.edu/~kfisler/turnin.html.
Your WPI user ID should be used to login, and you should have been emailed a password.
The Turnin assignment ID is proj1.
|
|
Academic Honesty: |
Remember the policy on Academic Honesty: You may discuss the
project with others, but you are to do your own work. The official WPI statement
for Academic Honesty can be accessed
HERE.
|
|