SlideShare a Scribd company logo
1 of 14
Moonlight
Sonata
FPGA BASED PIANO | EEE 304
DIGITAL ELECTRONICS
LABORATORY
Ahnaf Shahriyar
Hasin Azfar Pantha
Abhishek Das
Md Fatin Ishraq Faruqui
Motivation of the project
To be well acquainted with FPGA
(Field Programmable Gate array)
Discovering the multifunctionality
of FPGA
Building up a piece of art from the
jungles of wires of Digital
Electronics Project.
Objective of the project
To build a fully portable piano keyboard that contains 36
keys.
Generate 36 different tone frequencies using FPGA board
(Altera Cyclone II)
Realizing physical input keys in the piano keyboard and a
sound output from the FPGA board
Realizing a configurable piano unit
Building a cheap music instrument
Getting Familiar With
FPGA
An FPGA is an integrated
circuit designed to be
configured by a customer,
hence the name
programmable.
Source code can be written in
Verilog HDL, which has been
used in the project.
FPGA board used in this
project –Altera Cyclone II,
model no. EP2C5t144c8.
Schematic
of the piano
36 input keys go into 36 i/o pins in
FPGA.
36 output keys go to the speaker
through a resistor-capacitor branch.
branch.
Input pins are pulled down to ground
through 10k resistors.
A 3.3V Aluminium foil rail is placed
below the keys as source.
Input Keys of
the Piano
Metals screws are attached to each
of the keys of the piano
Whenever the keys are pressed, the
metal screws get connected with the
Aluminium foil rail, and the
corresponding input pin in the FPGA
gets high.
When simultaneous keys are
pressed, the corresponding input
keys get high, and the output pins
generate the composite signal.
Completely independent operation of
the keys.
Frequency Analysis of
the Notes
50 MHz clock cycle from pin 17 of FPGA board is being used
as the input clock.
Let’s look an example calculation!
Example
Calculation
From the chart, frequency of C3 = 130.81 Hz.
So, period of the note = 1
130.81 = 7.644 ms
Clock frequency = 50 MHz
So, clock pulses in 1s = 50 × 106
𝑝𝑢𝑙𝑠𝑒𝑠
Clock pulses in one C3 note period = 50 × 106
× 7.644 × 10−3
= 50 × 7644 𝑝𝑢𝑙𝑠𝑒𝑠
The C3 note will toggle from its previous state every
50×7644
2
or
50 × 3822 clock pulses
Logic circuit of the
Frequency Generator
20 bits counter for counting the clock frequency of
50 MHz.
Counting the clock pulses(for corresponding note)
and resetting the count
After the count for the corresponding note, a D flip-
flop is used for the toggling of that note waveform.
Via an AND operation of the toggling wave and
switch (key press), a note is generated.
Let’s delve into the
code now!
Output Keys of the
Piano
Wires from output pins go into a common node.
A smoothing capacitor is connected from that node to the
ground.
The output sound is collected via a 3.5 mm female jack to
a speaker.
Problems & Solutions
Building the
keyboard
Power supply
to the keys
Shortage of pin
in the FPGA
Smoothing the
sound
Keyboard was made of PVC board for cost
efficiency and flexibility
Aluminium foil was used as a power supply
sink for the keys
Using same output pins for lower-most and
higher-most pins the piano.
Using a 10µF capacitor reduces the noise
greatly
Motivation of the project
SCOPE OF
IMPROVEMENT
Using a DAC module we
can produce more smooth sound
Smooth transition between the keys
Walking down
the memory
lane
Thank you, our respected
teachers and fellow classmates,
for all the support throughout the
journey.
Feel free to ask questions!

More Related Content

Similar to DLD_project.pptx

Digital Tuner
Digital TunerDigital Tuner
Digital Tunerplun
 
PCM3168A/PCM3168A-Q1 Audio Codec
PCM3168A/PCM3168A-Q1 Audio CodecPCM3168A/PCM3168A-Q1 Audio Codec
PCM3168A/PCM3168A-Q1 Audio CodecPremier Farnell
 
Study of Data sheet of 56824 DSP processors
Study of Data sheet of 56824 DSP processorsStudy of Data sheet of 56824 DSP processors
Study of Data sheet of 56824 DSP processorsEr. Ashish Pandey
 
Scaling Down Instrumentation Deploying Analog Mixed Signal Technology
Scaling Down Instrumentation Deploying Analog Mixed Signal TechnologyScaling Down Instrumentation Deploying Analog Mixed Signal Technology
Scaling Down Instrumentation Deploying Analog Mixed Signal TechnologyShivaprasad Tilekar
 
Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseElaf A.Saeed
 
Rane DJ catalog 2013 eu
Rane DJ catalog 2013 euRane DJ catalog 2013 eu
Rane DJ catalog 2013 euRadikal Ltd.
 
TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition 艾鍗科技
 
Lecture intro to_wcdma
Lecture intro to_wcdmaLecture intro to_wcdma
Lecture intro to_wcdmaGurpreet Singh
 
Pioneer AV Receivers 2014 - features explained (Vietnam, Philippines, Hong Ko...
Pioneer AV Receivers 2014 - features explained (Vietnam, Philippines, Hong Ko...Pioneer AV Receivers 2014 - features explained (Vietnam, Philippines, Hong Ko...
Pioneer AV Receivers 2014 - features explained (Vietnam, Philippines, Hong Ko...Pioneer Europe
 
Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Vishalya Dulam
 
Sawtooth Waveform Generator.pptx
Sawtooth Waveform Generator.pptxSawtooth Waveform Generator.pptx
Sawtooth Waveform Generator.pptxIFTEKHARHAQ
 
Pioneer AV Receivers 2014 - features explained (Singapore)
Pioneer AV Receivers 2014 - features explained (Singapore)Pioneer AV Receivers 2014 - features explained (Singapore)
Pioneer AV Receivers 2014 - features explained (Singapore)Pioneer Europe
 
Clock Generator/Jitter Cleaner with Integrated VCOs
Clock Generator/Jitter Cleaner with Integrated VCOsClock Generator/Jitter Cleaner with Integrated VCOs
Clock Generator/Jitter Cleaner with Integrated VCOsPremier Farnell
 
Digital Recorder Presentation- Draft 1
Digital Recorder Presentation- Draft 1Digital Recorder Presentation- Draft 1
Digital Recorder Presentation- Draft 1Meshal Alawwad
 
Ece4760 progess report1
Ece4760 progess report1Ece4760 progess report1
Ece4760 progess report1Chuck Moyes
 
Audio Acquisition, Storage and Playback
Audio Acquisition, Storage and PlaybackAudio Acquisition, Storage and Playback
Audio Acquisition, Storage and PlaybackJerome Stanislaus
 
Pioneer AV Receivers 2014 - features explained (Thailand)
Pioneer AV Receivers 2014 - features explained (Thailand)Pioneer AV Receivers 2014 - features explained (Thailand)
Pioneer AV Receivers 2014 - features explained (Thailand)Pioneer Europe
 

Similar to DLD_project.pptx (20)

Digital Tuner
Digital TunerDigital Tuner
Digital Tuner
 
PCM3168A/PCM3168A-Q1 Audio Codec
PCM3168A/PCM3168A-Q1 Audio CodecPCM3168A/PCM3168A-Q1 Audio Codec
PCM3168A/PCM3168A-Q1 Audio Codec
 
Study of Data sheet of 56824 DSP processors
Study of Data sheet of 56824 DSP processorsStudy of Data sheet of 56824 DSP processors
Study of Data sheet of 56824 DSP processors
 
Scaling Down Instrumentation Deploying Analog Mixed Signal Technology
Scaling Down Instrumentation Deploying Analog Mixed Signal TechnologyScaling Down Instrumentation Deploying Analog Mixed Signal Technology
Scaling Down Instrumentation Deploying Analog Mixed Signal Technology
 
Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino Course
 
3D-DRESD ASIDA
3D-DRESD ASIDA3D-DRESD ASIDA
3D-DRESD ASIDA
 
Rane DJ catalog 2013 eu
Rane DJ catalog 2013 euRane DJ catalog 2013 eu
Rane DJ catalog 2013 eu
 
TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition
 
Lecture intro to_wcdma
Lecture intro to_wcdmaLecture intro to_wcdma
Lecture intro to_wcdma
 
Pioneer AV Receivers 2014 - features explained (Vietnam, Philippines, Hong Ko...
Pioneer AV Receivers 2014 - features explained (Vietnam, Philippines, Hong Ko...Pioneer AV Receivers 2014 - features explained (Vietnam, Philippines, Hong Ko...
Pioneer AV Receivers 2014 - features explained (Vietnam, Philippines, Hong Ko...
 
Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)
 
Sawtooth Waveform Generator.pptx
Sawtooth Waveform Generator.pptxSawtooth Waveform Generator.pptx
Sawtooth Waveform Generator.pptx
 
Pioneer AV Receivers 2014 - features explained (Singapore)
Pioneer AV Receivers 2014 - features explained (Singapore)Pioneer AV Receivers 2014 - features explained (Singapore)
Pioneer AV Receivers 2014 - features explained (Singapore)
 
Clock Generator/Jitter Cleaner with Integrated VCOs
Clock Generator/Jitter Cleaner with Integrated VCOsClock Generator/Jitter Cleaner with Integrated VCOs
Clock Generator/Jitter Cleaner with Integrated VCOs
 
Roland M-48: Live Personal Mixer
Roland M-48: Live Personal MixerRoland M-48: Live Personal Mixer
Roland M-48: Live Personal Mixer
 
Digital Recorder Presentation- Draft 1
Digital Recorder Presentation- Draft 1Digital Recorder Presentation- Draft 1
Digital Recorder Presentation- Draft 1
 
Ece4760 progess report1
Ece4760 progess report1Ece4760 progess report1
Ece4760 progess report1
 
Audio Acquisition, Storage and Playback
Audio Acquisition, Storage and PlaybackAudio Acquisition, Storage and Playback
Audio Acquisition, Storage and Playback
 
Pioneer AV Receivers 2014 - features explained (Thailand)
Pioneer AV Receivers 2014 - features explained (Thailand)Pioneer AV Receivers 2014 - features explained (Thailand)
Pioneer AV Receivers 2014 - features explained (Thailand)
 
13486500-FFT.ppt
13486500-FFT.ppt13486500-FFT.ppt
13486500-FFT.ppt
 

Recently uploaded

Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...archanaece3
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Computer Graphics - Windowing and Clipping
Computer Graphics - Windowing and ClippingComputer Graphics - Windowing and Clipping
Computer Graphics - Windowing and ClippingChandrakantDivate1
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationEmaan Sharma
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...ssuserdfc773
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxKarpagam Institute of Teechnology
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxMustafa Ahmed
 
Degrees of freedom for the robots 1.pptx
Degrees of freedom for the robots 1.pptxDegrees of freedom for the robots 1.pptx
Degrees of freedom for the robots 1.pptxMostafa Mahmoud
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
Introduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxIntroduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxProfASKolap
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfKira Dess
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Studentskannan348865
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2ChandrakantDivate1
 

Recently uploaded (20)

Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Computer Graphics - Windowing and Clipping
Computer Graphics - Windowing and ClippingComputer Graphics - Windowing and Clipping
Computer Graphics - Windowing and Clipping
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
Degrees of freedom for the robots 1.pptx
Degrees of freedom for the robots 1.pptxDegrees of freedom for the robots 1.pptx
Degrees of freedom for the robots 1.pptx
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Introduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxIntroduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptx
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2
 

DLD_project.pptx

  • 1. Moonlight Sonata FPGA BASED PIANO | EEE 304 DIGITAL ELECTRONICS LABORATORY Ahnaf Shahriyar Hasin Azfar Pantha Abhishek Das Md Fatin Ishraq Faruqui
  • 2. Motivation of the project To be well acquainted with FPGA (Field Programmable Gate array) Discovering the multifunctionality of FPGA Building up a piece of art from the jungles of wires of Digital Electronics Project.
  • 3. Objective of the project To build a fully portable piano keyboard that contains 36 keys. Generate 36 different tone frequencies using FPGA board (Altera Cyclone II) Realizing physical input keys in the piano keyboard and a sound output from the FPGA board Realizing a configurable piano unit Building a cheap music instrument
  • 4. Getting Familiar With FPGA An FPGA is an integrated circuit designed to be configured by a customer, hence the name programmable. Source code can be written in Verilog HDL, which has been used in the project. FPGA board used in this project –Altera Cyclone II, model no. EP2C5t144c8.
  • 5. Schematic of the piano 36 input keys go into 36 i/o pins in FPGA. 36 output keys go to the speaker through a resistor-capacitor branch. branch. Input pins are pulled down to ground through 10k resistors. A 3.3V Aluminium foil rail is placed below the keys as source.
  • 6. Input Keys of the Piano Metals screws are attached to each of the keys of the piano Whenever the keys are pressed, the metal screws get connected with the Aluminium foil rail, and the corresponding input pin in the FPGA gets high. When simultaneous keys are pressed, the corresponding input keys get high, and the output pins generate the composite signal. Completely independent operation of the keys.
  • 7. Frequency Analysis of the Notes 50 MHz clock cycle from pin 17 of FPGA board is being used as the input clock. Let’s look an example calculation!
  • 8. Example Calculation From the chart, frequency of C3 = 130.81 Hz. So, period of the note = 1 130.81 = 7.644 ms Clock frequency = 50 MHz So, clock pulses in 1s = 50 × 106 𝑝𝑢𝑙𝑠𝑒𝑠 Clock pulses in one C3 note period = 50 × 106 × 7.644 × 10−3 = 50 × 7644 𝑝𝑢𝑙𝑠𝑒𝑠 The C3 note will toggle from its previous state every 50×7644 2 or 50 × 3822 clock pulses
  • 9. Logic circuit of the Frequency Generator 20 bits counter for counting the clock frequency of 50 MHz. Counting the clock pulses(for corresponding note) and resetting the count After the count for the corresponding note, a D flip- flop is used for the toggling of that note waveform. Via an AND operation of the toggling wave and switch (key press), a note is generated.
  • 10. Let’s delve into the code now!
  • 11. Output Keys of the Piano Wires from output pins go into a common node. A smoothing capacitor is connected from that node to the ground. The output sound is collected via a 3.5 mm female jack to a speaker.
  • 12. Problems & Solutions Building the keyboard Power supply to the keys Shortage of pin in the FPGA Smoothing the sound Keyboard was made of PVC board for cost efficiency and flexibility Aluminium foil was used as a power supply sink for the keys Using same output pins for lower-most and higher-most pins the piano. Using a 10µF capacitor reduces the noise greatly
  • 13. Motivation of the project SCOPE OF IMPROVEMENT Using a DAC module we can produce more smooth sound Smooth transition between the keys
  • 14. Walking down the memory lane Thank you, our respected teachers and fellow classmates, for all the support throughout the journey. Feel free to ask questions!