Sunday, March 30, 2008

Finished and Presented!

This blog has been a long time coming, but I thought I should preserve the pictures from our final development and demo day online for others to see. Here goes:

Our demo day booth:
Photobucket

Close up of the player:
Photobucket

Detail shot of the Optical encoder being driven by the record:
Photobucket

Detail of the player, perhaps one day it will be far smaller:
Photobucket

Zohrab(left) and myself (Richard, right), happy to be finished, at least for now...
Photobucket

Wednesday, February 20, 2008

Progress Update

Here is an update to the progress of our project, based on a timeline created early in the quarter, tasks marked DONE have been completed, any other notes will be in bold type.

First:
-Finish DAC and verify sound DONE
-Verify Serial Output of flash and verify read from it DONE USING PARALLEL OUTPUT
-Find out how to Program flash DONE AND PROGRAMMED


Second (Requires completion of first):
-verify transmission from flash memory to DAC DONE
-Figure out how to playback a music file, from flash to DAC
-includes determining sample rate BOTH DONE

Third:
-Optical Encoder integration
-Determine standard speed of O.E. at 33 1/3 RPM DONE
-Determine rotating wheel size and build wheel BUILD IN PROGRESS
-(CODE ALREADY NEAR COMPLETION) develop interrupt driven code for speed and direction, combine this with playback code CODE COMPLETE AND TESTING IN PROGRESS
*WHEN ABOVE IS COMPLETE AND TESTED, BASIC FUNCTIONALITY IS COMPLETE

Fourth:
-Implement start playback, stop playback, and reset playback (should be relatively simple assuming tasks above are complete)

Fifth (time permitting):
-Implement multiple song functionality, may be equipment prohibitive due to small size of flash memory likely to be thrown out

In addition to all of this, we have been working on determining how the overall system will be powered and possible solutions to getting 3v and 10v from a PC power supply that provides 5v and 12v. We will likely end up using a basic non-inverting op-amp circuit as we cannot determine the system's total current draw, making it difficult to determine resistor values. Also in progress is the design and construction of a box to put the system in and to mount the power and reset switches to, along with a mount that will suspend the optical encoder above the record player.

I forgot my digital camera last lab session, so I don't have video or pictures of the working prototype music player, but here is an image of the flash memory and DAC set up, (5) 4-bit counters are being used to sequentially (increasing or decreasing) address the 19 address bits in our 4MBit memory (512Kb):

Photobucket

Photobucket

The song programmed into the memory is currently Aesop Rock's "Dinner With Blockhead," from the Float album (chosen mainly because it's ~47 seconds, the maximum length we could fit using an uncompressed 8-bit, mono, 11025Hz sample rate wav file.

More updates to follow.

Thursday, February 7, 2008

No updates for quite awhile, but it seems appropriate now as considerable progress has been made.

The following details the (hopefully) near-final implementation of the DAC/microcontroller interface.

first, the connection of only 6 data bits (will be using at least 8), in order to test the new DAC's functionality:

First, an image of the messy testing setup I am using (courtesy of UCI's MSTB 222 lab):

Photobucket

Next, a detail of the microcontroller/DAC connections. Note that I am only using the 6 most significant bits for transfer to the up-to 12-bit DAC. It's only because my connections didn't fit together, this will be resolved soon. Here's the picture:

Photobucket

Third, this is an image of what a low resolution, 1000Hz sine wave looks like when displayed on a digital oscilloscope. I would say here that a picture is worth only a few words, but the output from the speaker was music to my ears. Again, here's the picture:

Photobucket

and finally, a video of the microcontroller/DAC combo in action. As the youtube details state, the output from the connected speaker is pretty hard to hear due to the digital camera's microphone capabilities. The noise in the background of the video, which appears as more of a buzzing background noise, is actually a 6000Hz sample rate, 8-bit/sample 1KHz pure sine wave being played through the speaker, based on a .wav file generated by the NCH Tone Generator (a demo program I'm currently using). Here's the video, all 9 seconds of it:

Friday, December 7, 2007

Design Document

Final Design Document in PDF Format

Click here

Saturday, December 1, 2007

Wednesday, November 28, 2007

The first completed sections of the project design document:

Problem Statement/Specification:

GOAL: The goal of this project is to produce a digital music player in which playback speed is controlled by the user via a record player’s turntable, allowing them to “scratch” the music file much like one would with a vinyl record.
COMPONENTS: The project will be constructed from a small set of components, including a microcontroller, and SPI programmable flash memory, a Digital-Analog converter, and a turntable interface along with its associated sensor.
INPUTS: Inputs for the project include a digital audio file, most likely an uncompressed .WAV sample and the observed linear speed and direction determined from the record’s rotation which will be used to control the playback of the sound file. The formula for the speed, assuming a turntable speed of 33 1/3 RPM and x equally spaced sensors, should look something as follows:

Playback Speed (%) = Percentage of x observed during 1.8 second intervals
The 1.8 second interval is one rotation of the record

OUTPUTS: The ultimate output for the project is the actual sound produced by the system with its speed controlled by the turntable.
USER SCENARIO: A user will first load a digital sample onto the device, initiate playback, and then during playback will manipulate the turntable so as to adjust the speed of the sample’s playback
EVALUATION CRITERIA: The finished project should reliably play a sound file, and should have no noticeable delay between the user’s manipulation of the turntable and the resultant speed-modified playback of the file.

Standards:

Standards Used (tentative):

· Microsoft .WAV format, uncompressed, ideally with variable sound file properties (Bit rate, stereo/mono, etc.). Using an uncompressed sound file will prevent the device from having to perform any decompression. This is done in favor of simplicity, although a similar commercial product would most likely be required to handle compressed digital music files (.mp3, .m4a, .wma, etc.)

· SPI (Serial Programmable Interface) for file transfer, this is supported directly by our chosen microcontroller, the AVR Butterfly (with ATMEGA169P processor), and was chosen to avoid any other complications with programming a flash memory

· C programming, used in AVR studio, is the only object-oriented programming language supported by the studio program, and is familiar to both group members.

· Turntable speed will most likely be standardized at 33 1/3 RPM, the standard speed for a 12 inch vinyl LP.

Standards Considered (tentative):

  • Compressed sound files, such as .mp3 were considered as they require a much smaller amount of memory, but the additional cost of either utilizing an external MP3 decoder or programming one was deemed to be outside of the scope of this project
  • SD cards for flash memory have also been considered, but interfacing these with the microcontroller may prove difficult. The obvious advantage to using an SD card would be the large amount of memory they provide at a relatively low cost.

Thursday, October 25, 2007

Abstract, General Project Description

Our Goal:

Design, build, and implement a digital music player to interface directly with a record player, allowing the user to play digital music files (.wav format), and control their speed via turntable. The device will determine the playback speed of the digital sound file based on the rotational speed and direction of the turntable, giving the user the ability to mix and scratch their digital files in much the same way as they would mix a vinyl record.

Group Members:
Zohrab Basmajian
Richard Billett