Interactive Media & Game Development
Worcester Polytechnic Institute

IMGD


IMGD-3xxx: HCI for Real, Virtual, and Teleoperated Environments
Project 1
Due: Friday, September 04, 2009 at 11:59pm

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.
  1. Part 1: Auto-Adjustable Light Intensity
    In this part, you will make the intensity of LEDs vary according to the amount of vibration detected on the surface on which the Arduino is sitting. The more the surface shakes, the brighter the LEDs should light. You should use the LEDs to represent the vibration variation. The amount of light should vary continuously from no light (neither LED is turned on) when the environment surface has little or no vibration, to one LED with a medium intensity when the surface has a little bit of vibration, to one LED at full brightness as it gets more shaky, up to two LEDs with full brightness in earthquake-like conditions (okay, so maybe not earthquake-like, but you get the idea).

    Using the same light-intensity variation approach, and based on code examples 6A and 6B 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.

    For this sub-project the equipment you are going to need is:

    1. The 2 LEDs that come with your kit
    2. The light-dependent sensor (LDR)
    3. A 10KOhm resistor for the LDR
    4. The piezo vibration sensor
    5. Resistors for the LEDs
    6. You will need to obtain a 10MOhm resistor for the piezo 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.
  2. Part 2: Make Music
    Using example 2 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:

    1. The linear trim pot (potentiometer)
    2. The buzzer
    3. The button
    4. 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 pm on the day the assignment is due.

The following items should be submitted for this project:

  1. The code for each (sub)project part
  2. The circuit schematics for each (sub)project
  3. Photographs of your circuit (you can get a digital camera from the ATC for this)
  4. 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.


Back to course page.