Difference between revisions of "Mozart's Right Hand"

From Mech
Jump to navigationJump to search
Line 60: Line 60:
==Playing a Note==
==Playing a Note==
=Further Reading=
=Further Reading=
*Full Mozart's Right Hand Code: [[mrh_code.c]]
*Full Mozart's Right Hand Code: [[Media:mrh_code.c]]

Revision as of 17:25, 17 March 2009

Introduction

Mozart's Right Hand is a musical instrument capable of playing two full octaves of the Diatonic Scale. The user wears a glove on his right hand and uses motions of the hand and fingers to create different notes that are played with a speaker. The pitch of the note is controlled by the orientation of the user's hand as he rotates it ether from the wrist, the elbow, or the shoulder. The LCD on the front of the box tells the user the pitch that corresponds to his or her current hand orientation. When the user touches together his thumb and index finger, the speaker plays the tone. A video of Mozart's Right Hand in action is available on YouTube.

Mozart's Right Hand box
Mozart's Right Hand in action




























The Team

Design Team (Just Sean for now ...)
  • Colleen Fryer ( colleenfryer2008 at u dot northwestern dot edu ), Mechanical Engineering Graduate Student
  • Sean Wood ( seanwood2010 at u dot northwestern dot edu ), Mechanical Engineering Junior
  • Mat Kotowsky (kotowsky at northwestern dot edu), Civil Engineering Graduate Student













Theory of Operation

Mozart's right hand plays all of the notes, including sharps and flats, between and including C5 and C7 (where C4 is "Middle C"). Each of these notes has a specific frequency associate with it; for example: C6 has a frequency of 1046.50 Hz. Other notes' frequencies are available at http://www.phy.mtu.edu/~suits/notefreqs.html. If signal whose voltage is a 1046.50 Hz sine wave is passed through a speaker, the speaker will play C6. Increasing the frequency will raise the pitch, decreasing it will lower the pitch. Increasing the amplitude will cause the volume of the note to go up, decreasing it will cause the volume to go down.

Orientation of the Hand Relative to Gravity

The axes of the accelerometer in relation to the glove

The pitch of a note is decided by measuring gravitational acceleration in two axes. The Y-axis runs along the user's arm with positive being toward the fingertips. The X-axis is orthogonal to the Y axis and lies in the plan of the palm of the hand. The pitch is decided by first measuring the gravitational acceleration in the Y direction. If the Y acceleration is 0g, the palm is parallel to the floor. If the Y acceleration is 1g, the palm is perpendicular to the floor with the fingertips pointing towards the floor. If the Y acceleration is -1g, the plan is perpendicular to the floor with the fingertips pointed straight up. When the fingertips are pointed straight down (1g), Mozart's Right Hand produces its lowest possible note: C5. When the fingertips are pointed straight out (0g), it produces its mid-rage note: C6. When the fingertips are pointed straight up (-1g), it produces its highest possible note, C7.

The X-axis is used to determine whether a note is sharp or flat. If the X axis measures 0g, the note is played naturally with no sharps or flats. If the X axis measures a positive gravitational acceleration, the user is tipping his hand to the right and the note is played sharp. If the X axis measures a negative gravitational acceleration, the user is tipping his hand to the left and the note is played flat.

For both the X and Y axes, the actual values used to determine the thresholds between notes were determined empirically. They appear in the code below.








Effect of Centripetal Acceleration

During typical use, the user's hand remains stationary and the only effect on the pitch is the glove's orientation with respect to gravity. It is possible, however, that the user will want to play a note while simultaneously moving his hand. The speaker will play different tones as the user moves his hand through the different orientations. During this type of playing, the acceleration measured by the accelerometer is not only due to gravity but due to the effect of centripetal force caused by the hands rotation about the user's wrist, elbow, or shoulder. If one assumes that such motion is uniform and circular about its center, then the acceleration measured during motion is a superposition of the acceleration due to gravity and the acceleration toward the center of rotation: Mrh aequalsv2overr.jpg.

The average length of a human hand is approximate 180mm (from http://en.wikipedia.org/wiki/Hand), so the distance between the accelerometer and the wrist is about half of that: 90mm. If the fastest a user moved his hand from straight down to straight up is one second, its total distance traveled would be one half of the circumference of a circle with a radius of 90mm: approximately 280mm, for a velocity of about 280mm per second. Therefore, the acceleration towards the wrist would be approximately 0.9 meters per second squared. This is lest than one tenth of a g, so a user would not experience a significant change in note pitch due to centripetal acceleration while rotating at the wrist.

The same calculation could be carried out for playing Mozart's Right Hand by rotating through the elbow or the shoulder.

Hardware

Mozart's right hand is comprised of two main components: the input glove and the desktop box. The glove carries the sensors that determine which note is played and when it is played. The desktop box contains all of the intelligence to read the sensors, translate them into frequencies, and drive the speaker. The glove is connected to the box by a 10-position ribbon cable.

Glove

File:Mrh glove circuit.JPG
Circuit diagram of the glove

The glove contains a dual axis accelerometer and a set of fingertip contacts between the thumb and the forefinger. These components are connected together via hookup wire that runs through the finger, thumb, and palm of the glove, then back to the desktop box via a 10-pin ribbon cable.







Accelerometer

ADXL-320 MEMS accelerometer

The accelerometer is an ADXL-320 MEMS accelerometer configured for dual-axis use. Though it has a range of +/- 5g, it is only used in the +/- 1g range. The accelerometer has pins: V+, GND, X, Y, and a test pin. The test pin, though connected to the ribbon cable, is not used. The X and Y pins provide ratiometric analog output. V+ is connected to a 5 VDC output coming from a regulator inside of the desktop box. The GND pin is connected to one end of the Play Enable switch closure and also to the digital ground inside of the desktop box. The accelerometer is sewn to the top of the glove by passing the signal wires through the mounting holes on the carrier board.

Play Enable

The Play Enable functionality is implemented with two thin strips of aluminum that are

Desktop Box

Microcontroller

Function Generator

Amplifier and Speaker

LCD

Enclosure

Software

Reading the Accelerometer

Selecting a Note

Playing a Note

Further Reading