Title: Digital Theremin
1Digital Theremin
2Team Members
Alex Milevsky (CPE)
Dan Nagle (CPE)
Advisor Bob Reese
Nathan Palmer (CPE)
Jerry McMahan Jr. (EE)
3Responsibilities
- Daniel Nagle PC learning software, grading
algorithm, lesson format - Alex Milevsky Team Leader, PIC programming (MIDI
output), PC learning software, MIDI handler - Nathan Palmer PIC programming, real world
interfacing, LCD interfacing - Jerry McMahan Oscillators, mixer, filters, A/D
conversion
4Previous Work
- Main Points
- Switchable discrete pitch mode
- Lower cost
- Tuner out
- Problems
- Pitch drift
- Did not complete
- Exceeded budget
5Goals
- Provide an LCD to display the pitch of the
theremins output - Interface with a computer using the MIDI
protocol, allowing information on the playing to
be gathered - Develop software to evaluate the performance
based on the MIDI information gathered to provide
feedback to the player
6Block Diagram
Volume Knob
Beat Frequency Oscillator
Volume Processor
Mixer/ Filter
Speaker Out
Learning Software
MCU
MIDI Out
LCD Out
7Frequency Detection
- Methods Considered
- Frequency to voltage converter
- Measuring zero crossings
- Other methods avoided to reduce cost
8Frequency/Voltage Chip
- National Semiconductor LM2907
- Strengths
- Ease of use
- Weaknesses
- Accuracy poor for low frequencies
- Output ripple
9Ideal vs. Measured
10Zero Crossings
- Made easier since output is roughly sinusoidal
- A/D converter could be used, but problems with
noise - Solution convert sine wave to square wave and
apply to digital input pin, triggering interrupts
11Zero Crossings (cont.)
- 2500 times highest frequency
- Computationally cheap
12Frequency Detection Error
Average Percentage Error .07
13Filter Circuit
14MIDI Output
- Requires volume and pitch detection
- Filter circuit used to make volume detection
easier - Volume detection via onboard 10-bit A/D
converter - MIDI protocol provides 7 bits of data to specify
volume, so highest 3 bits ignored
15Firmware Flowchart
16Software Flow Chart
Start
Record button pressed
Open lesson file
Call MIDI Handler
Display music, Description, Etc.
Record playing
Grade recorded file
17Software
18Grading Algorithm
- Scans raw MIDI data for pitch wheel and volume
messages - On transition from volume low to volume high,
software latches the pitch wheel value - Scoring format
- Missed note 50 points
- Correct note Remainder of pitch wheel value
- Total score 100 (remainder / notes graded)
19PCB Layout
20PCB Hardware
21PCB Problems
- increase dimensions for placement of parts
- space the inductors farther away
- the volume control has an unnecessary resistor in
series - The mixer/filter has a capacitor connected to the
wrong place.
22Testing Plan
- Frequency Detection oscilloscope
- Pitch Drift conductive plate
- MIDI Midimon, MIDI keyboard
23Cost
Component Cost
PIC16F876A Resonator 7.55
LCD 15.33
Resistors 1.00
Capacitors / Inductors 2.00
Antennae 6.00
Op-Amps 4.52
Buttons / Switches / Jacks 8.00
Transistors 6.00
PCB Board (bulk) 5.92
Total 56.32
24Test Results
MIDI compatibile Yes
3 octaves 130-987.77 Hz 5 octaves 187-4000Hz
5 accuracy pitch detection 0.07 accuracy
2V preamp 1.4V preamp
2 pitch drift lt3 pitch drift
25Results (cont.)
Calibration -
Win98 or higher software Tested on Win98, Win2k, Win XP
Market price lt200 56.32
LCD Interface Yes
Speaker jack Yes
26Other Progress
- Prototype case
- MIDI functionality working
- PC software stable
- Volume knob
- RCS simplifies updating documentation
27Acknowledgements
- Dr. Robert Reese
- Dr. Joseph Picone
- Way Beng Koay
- Douglas Beard
28Questions
?