A-to-D Record Player Microcomputer Architecture and Interfacing Final Project – Spring 2014 Ross Bunker Jade Irizarry-Swordy Concept Inspired by a small digital music box, we wanted to design something better. Our goal: Create a music playing device with the same basic mechanical features of a record player, but with digital inputs The Journey of a Signal, from Analog to Digital Sheet Music Using black and white markings on paper, we created binaryencoded sheet music. -- 6 bits -- 64 total possible notes or chords Sample ‘Paper Record’ : How do we read the sheet music? Reflective Optical Encoders A device that couples a light-emitting diode to a light dependent resistor Sensor Array Building an array of reflective optical encoders, we are able to read our sheet music: Sensor Schematic We have a digital value, now what? Digital Value Notes 0 A 1 A# 2 B 3 C . . . . . . Sensor Pseudocode Set up { Initialize pins A0 through A5 for input, and 3 pins for speaker output Notes [ 37] = { 2 octaves of notes } Chords[ 37 – 64] = { popular chords } } Loop { Find decimal value of binary sensor value; If (note value < 37 ) Play single note; 3 identical frequencies speaker output pins; If( note value >37 ) Play chord; 3 different frequencies, each on its own speaker output pin; } Arduino Tone Library Outputs varying-frequency PWM signals --Allows us to begin playing notes and stop playing notes Playing a Note versus Playing a Chord Arduino allows us to create PWM signals that mimic any frequency To create a chord, we simply tie together three notes Playing a single note…. A# A# A# Playing a whole chord…. C D# G Timing Diagram General Overview of Reading Music 1. Sensor Array detects black and white 2. Black and white converted to binary 3. Binary converted to decimal 4. Decimal used to look up a note or chord 5. Note or chord outputted to speaker by creating PWM at desired frequency/ frequencies But wait, how do we read all those notes along the spiral? Tone Arm Control What is it? Our method of lengthening the amount of music How? A small circuit at the end of the photo array tracked a black marker Tone Arm Control Input A black tracking line will be added around the outside of the data track on the sheet music A pair of photoresistors, or light-dependent resistors (LDR), will be used to track the black line Voltage on AI0 and AI1 will differ, depending on the location of each relative to the tracking line Tone Arm Control Considerations How do we track the black line without oscillation? The difference between the two voltages must be compared to a threshold constant to prevent oscillatory feedback! Tone Arm Control Input Position of Tracking Sensors relative to Input Array Tone Arm Control Input Differential Sensor Measurement has not exceeded threshold Tone Arm Control Input Differential sensor measurement exceeds threshold Tone Arm Control Output Physical position of Tone Arm is controlled by a servo Why a servo? Absolute position is always known Small and controlled angular adjustments Tone Arm Pseudocode If difference between sensor voltage 1 and 2 exceeds defined threshold Add increment to current output frequency Else, if difference between sensor voltage 2 and 1 exceeds defined threshold Subtract increment from current output frequency Tone Arm Timing Diagram Okay, but won’t the sheet music just be sitting there? Platter Motor Control Obviously the sheet music needs to spin for this to work! 33 or 45 RPM will need to be slowed down to accommodate our sheet music Done with analog components rather than Arduino control Platter Motor Control Schematic Runs off 13.6V supply built into the record player Voltage divider from potentiometer used to control MOSFET gate A system of pulleys was also necessary to reduce the operating speed further Platter Motor Control Pulley System Conclusion Sensor reads record, communicate via Arduino Motor spins platter at reasonable speed, using pulley system Tone arm depends on circuit inputs, controlled through Arduino Questions?