231a-ad projectproposal

From CSclasswiki
Jump to: navigation, search

Project Proposal


The goal of this project will be to create a rudimentary musical synthesizer. The user will hopefully be able to program a melody into the computer by pressing key on the keyboard. The computer will pass the melody on to the Arduino which will play it repeatedly through a piezo speaker. Additionally the Arduino will be hooked up to three potentiometers: one for controlling the speed of the music, one for controlling the volume, and one for controlling the pitch. By adjusting these potentiometers, the user will be able to further adjust the tune being played as it is being played.


The assembly program will take input from the keyboard and store data which the Arduino will interpret as different notes to be played. The user will indicate a sequence of notes by pressing keys on the keyboard, and the assembly program will read different keys as different notes.


The Arduino will use analog pins for the potentiometer and a PWM pin (any one of digital pins 9-11) for the speaker.

Adjusting the knob (or slider) on the potentiometer changes its resistance and consequently it's relative closeness to +5v, affecting the flow of the current through it. The Arduino can then be programmed to react to the current in a specific way. I would like the Arduino to be able to read three different analog inputs from the three different potentiometers. One will (hopefully) be able to adjust the volume, another for the speed, and a third for the the pitch of the sounds being played.

The use of potentiometers with the Arduino is detailed here

The speaker will be hooked up to a PWM pin. Tones are created by quickly pulsing the speaker on and off, as detailed here. Different notes are set to different pulses, so the Arduino program will take the notes fed to it by the assembly program and give the Arduino a series of instructions for sending pulses to the speaker. (The pulses will be further altered by the potentiometers).


231a-ad piezo.jpg
231a-ad potentiometer.jpg

231a-ad sche1.jpg

Hardware and Cost

This project will need one piezo speaker and three potentiometers (they can be either sliding or turning).

The piezo speaker can be bought for $2.00 at American Science and Surplus. I don't know anything about the RF filter attached to it though. Radioshack also carries a piezo buzzer for $3.50, which looks like what is used here.

Radioshack has potentiometers for $3.00. I'll need to look up more about the difference between linear tape and audio tape.

Mouser Electronics also has a wide range of potentiometers... probably too wide though since I don't know where to start with figuring out which would work best.

Total cost for hardware will be probably around $11-14 ($2-4 for the piezo and $3 x 3 potentiometers)