showing sound signals on vga with using pmod mic

Download Showing sound signals on VGA with using PMOD MIC

Post on 25-May-2015




0 download

Embed Size (px)



2. Outlines1 ) Project objective 7) Explain of code2) Analogue to Digital Converting 8) VGA3) Microphone SelectionDynamic microphonesCondenser microphonesElectret condenser microphone4) PMOD MICMicrophone ModulePre- amplifierCompandorPMOD MIC Block5) Functional Description TIMING FSM6) Design Procedures (Block Diagrams) 3. Project objectiveThe main objective of this project is to display an Audiosignals on VGA screen. The initial objective of thisproject is to compare and evaluate the FPGAprototyping boards readily available in the marketand a selection is to be made. The aim of this projectwill be to capture the sound from an audio signals viaPMOD MIC and display the signal to reading on aVGA screen 4. Analogue to Digital ConvertingThe audio signal from ADCs have resolution which is themicrophone will be of number of the discreet values that itanalogue format. Therefore, a can produces over a range of analogueconversion to a digital format values. For example, For a Full scaleis needed as the FPGA is a measurement range of 0 to 10 volts, ifdigital electronic chip. the ADC resolution is 12 bits (212 =Therefore an Analogue to 4096 quantization levels (codes)), theDigital Converter (ADC) ADC voltage resolution will be (10V -component is needed. This 0V) / 4095 steps = 10V / 4095 stepscomponent will convert a 0.00244 V/step 2.44 mV/stepcontinuous signal to discreetdigital numbers. 5. Microphone Selection There are three different types of microphones availableDynamic microphones: An ideal one for general purposewith simple design with few moving parts and is sturdyand resilient to rough handling. This type of microphonesare more likely suitable for handling high volume (e.g.from musical instruments or amplifiers). They have nointernal amplifier and do not require batteries or externalpower. 6. Microphone SelectionCondenser microphones: This type of Microphonesrequires power from a battery or external source (called"phantom power"). The audio signal out from themicrophone is stronger signal than that from a dynamic.They are also more sensitive and responsive than dynamics,making them well-suited to capturing subtle nuances in asound. However, they are not ideal for capturing highvolume as the high level of sensitivity makes them prone todistortion. A condenser simply means capacitor, whereenergy is stored in the form of an electrostatic field. Thistype of microphone, which uses a capacitor to convertacoustical energy into electrical energy. 7. Microphone SelectionElectret condenser microphone: This microphoneuses a special type of capacitor which has apermanent voltage built in during manufacture. Like apermanent magnet, in that it doesnt require anyexternal power for operation. Therefore a powersource (e.g. a battery or phantom Power is notrequired. The other feature is the same as a normalcondenser microphoneThe selection of the suitable microphone dependson the Sensitivity and Frequency range criteria 8. Microphone SelectionSensitivity: This determines how much voltage isgenerated per units sound pressure level (mV/Pa). Amore sensitive microphone of 50 or 100Mv/Panormally large) is required if theres a need tocharacterize lower level sounds. For louder soundlike jet aircraft, a less sensitive microphone issufficientFrequency range: the audible range is 20 to20 kHz and many microphonesextend well beyond this. 9. PMOD MICKnowing and going through all those above selection criteria,the decision to choose the suitable microphone was madesimple by DIGILENT as there is a preinstalled microphone aperipheral board for FPGA prototyping boards comes with avery low cost This I/O interface board called PMOD MIC hasbeen specifically designed for use with DIGILENT and XILINXdevelopment kits which will work on an SPI interface via 6accessories header pins I/O peripheral ports 10. PMOD MICThis board consists of an analogue microphone, anSA575DTB IC which is a compandor chip and ADCS7476 chipwhich is an Analogue to Digital Converter (ADC). TheCompandor IC is connected as an Automatic LevelConfiguration (act as a pre-amplifier) and the ADC convertsthe analogue volts into 12bit digital code 11. Microphone Module 12. Pre- amplifierIn order to amplify alow level audio signalsuch as pickup,microphone, turntable,into line level signals, apre-amplifier (or pre-amp) is needed. Thiscomponent provides avoltage gain but notsignificant current gain 13. CompandorCompanding is aprocess in signalprocessing thatmitigates thedetrimental effects ofa channel with limiteddynamic range.Theres an electroniccomponent that canper form this processcalled a compandor The Differences of an analogue signal before and after companding 14. PMOD MIC BlockThe block diagram of PMODmicrophone can be illustrated as inFigure PMOD MIC Block diagramtakes in analog sound throughmicrophone and outputs a digitalsound signal 15. PMOD MIC BlockThis block will need to be programmed to accept the analogaudio signal from the microphone to go through the pre-ampand finally to convert the Analog signal into a 12 bit digitaldata signal. The PMOD MIC board needs to be powered witha supply voltage of minimum 2.7 V to maximum 5.25V. Fromthe J1 and J18 peripheral board a 3.3V and GND is prerouted and ready for use without programming. For the ADC,theres a need to input a 12.5MHz (max. 20MHz) to clockinput. This is where the 50 MHz clock supply on FPGA boardswill be divided and supply back to the input. Next is thechips select signal (low) which will inform the ADC toperform conversion once theres logic 0. Those are thephysical Input/ output (I/O) connection required 16. PMOD MIC BlockADC Connection Diagram (left) and Block Diagram (right). 17. PMOD MIC BlockThe function of this block is not changedfrom previous revision. The connectiondiagram from PMOD MIC board to FPGAare shown in Figure below PMOD MIC board FPGA BOARD B2 A3 MISOSCK 18. PMOD MIC Block In this block, the FPGA needs to be programmed to take in thedigital ADC codes and perform some averaging in order todetermine the average voltage level over the continuous signal .In the case of a set of n values , the RMS value is given byVRMS Calculation 19. Functional DescriptionThe input ports are a 50MHz clock, anasynchronous reset button, and thedata from the ADCS7476 that isserially shifted-in on each clock cycle(SDATA). The outputs are the SCLKsignal, which clocks the PmodMIC at12.5MHz; a chip select signal (nCS),which enables the ADCS7476 chip onthe PmodMIC; and as the 12-bitoutput vector (labeled DATA) from theADCS7476 chip, which can be used byany external component. The STARTsignal is used to tell the componentwhen to start a conversion. After aconversion is done, the componentactivates the DONE signal. A blockdiagram of the component is shown inFigure 20. TIMINGThe timing diagram in Figure is used to determinethe correct timing sequence for the finite statemachine that clocks the PmodMIC. It is the timingsequence that is used to generate 16 bits of datausing the ADCS7476 chip inside the PmodMIC. Thesignal nCS must be at a low or zero state while thedata is generated on the falling edge of the clocksignal. Immediately following the data transfer, thesignal nCS must be driven high to signal when a newset of data can be generated 21. TIMINGTiming Diagram of the ADCS7476 Chip on the PmodMIC 22. FSMThe logic that created the timing sequenceto take in the data input SDATA seriallyand latch in the 16-bit vector, as well asclock the nCS and SCLK outputs, wasdesigned by creating the finite statemachine shown in FigureThere are three states: Idle, ShiftIn, andSyncData. During the Idle state, the DONEoutput signal needs to be high in order toallow a conversion. When the START signal isgoing high, the state machine goes into theShiftIn state.In the ShiftIn state, the DONE signal goeslow and the data from the PmodMIC isserially shifted-in from MSB to LSB for 16clock cycles to ensure that all 16 bits of datahave been received from each chip. Aftershifting is done, the state machine goes into FSM of the PmodMIC Referencethe SyncData state. Component 23. FSMIn the SyncData state, the effectivedata received from the PmodMIC isplaced on the 12-bit output portDATAIn the SyncData state, theeffective data received from thePmodMIC is placed on the 12-bitoutput port DATAIf the START input signal is low themachine goes back to the Idle state,ready to accept another conversionNo mater what the current state is,the RST input signal resets the statemachine and puts it into the Idle state 24. Design Procedures (Block Diagrams)The FPGA needs to be programmed inorder to produce the outputcorresponding to the analogue inputlevel from a microphone During theresearch period, the block diagram ofan Sound Meter using FPGA wasproposed. The diagram shows somefundamental concepts in differentblocks below in Figure 25. PMOD MICAnalog I/OInterface Mcrophone Preamp VGA O UTPUTFlterADC(12 bit) Preamp FPGA ChipFlterClock Converter( 50 to 12.5 MHZ) Counter 4- bit AmplifiersAnalogue toDgtal FSMConverter 26. Design Procedures (Block Diagrams)Keeping in mind that the different in the FPGA chip, theappropriate HDL codes planned to be written to design theFPGA chip to generate the output correctly. As most of thedesigns using FPGA done we using VGA screen. This projectwill explore on the display on VGA Screen 27. Explain of codeThis program incorporates the Moore StateMachine and a clock divider.This program has four inputs and outputs.The signals are explained in the Table 28. FPGABoardFPGA Board 29. Signal Naming in PMODMic.vhd program 30. Explain of codeIn this program, the state machine comprises of three states,Idle, Shit-In and Sync DATA. The Idle state is the beginningstate where nCS an


View more >