Build Custom FPGA Hardware for Signal Processing Lab

School
University of Minnesota-Twin Cities**We aren't endorsed by this school
Course
EE 2301
Subject
Electrical Engineering
Date
Dec 11, 2024
Pages
4
Uploaded by DrLeopardMaster754
EE 2301 Lab # 7ECE DepartmentMore with Verilog: A Dedicated Signal Processing Peripheral (2-weeks lab)Due: week of 12/13 - 12/17Introduction:An incredibly valuable task for many Electrical and Computer engineers is to offload work fromcentral processors (CPUs) through dedicated custom hardware. In this lab, you will buildFPGA-based custom hardware that will measure an analog value, digitally process that signal,and return a result to a register ready for a CPU to access whenever needed.Design Definition:Input: One analog signal of your choiceOutput: One 16-bit unsigned integer, register OutputRequirements:Choose an analog sensor with an output in the range of 0.0 V to 1.0 VRead the ADC valueProcess the valueIt should be interestingIt may be useful!Store the processed value to the register OutputDisplay the Output on LED[15:0](Optional) Drive an actuator or the seven segment display with OutputHints:You must choose a sensor, examples include:TMP36, potentiometers, light-dependent resistors, IR photodiodes, etc.NOTE: Circuit theory (EE2015) course may be useful for converting a signal tothe correct range. Ask your TA for assistance.You must define what it means to process the signal. Examples of signal processinginclude:The simplest filter is a moving average.y[n] = ( x[n] + x[n-1] ) / 2y[n] = ( x[n] + x[n-1] + … + x[n-N] ) / (N+1)Other options: edge/clap detection, knob (potentiometer) averaging, buttondebouncing, envelope detection (loudness)The Output doesn’t have to be an unsigned integer, just compatible with being stored insuch a register. It could be an integer, thermometer encoded data, a single binary output,or anything you define as useful.(Optional) You may wish to experiment with driving outputs as a result of your processedsensor data. For example: Drive a servo (speedometer or temp gauge), change theblinking pattern on an LED, display a decimal value on the seven-segment display.Page 1
Background image
EE 2301 Lab # 7ECE DepartmentPre-Lab:Before coming to the lab, every student should complete the following tasks:1)Complete the XADC Wizard walkthrough and minimal working example contained inAppendix E - Setting up the XADC.2)Read theQuick Lesson - Verilog - Moving Average3)Identify a sensor that you will use in this lab. Remember it must have an output in therange of 0 to 1V (use a resistor divider to reduce it to this range as needed.)4)Develop and document the signal processing steps you will take to turn your sensorADC data into something interesting.Pre-Lab ChecklistReadAppendix E - Setting up the XADCConnect a POT on your breadboard (as described above.)ReadQuick Lesson - Verilog - Moving AverageWire Your Sensor on your breadboard, verify that it operates between 0 and 1VPrepare a preliminary description (flow chart or equations) of your signal processingsteps.Procedure:The procedure for the lab is to connect your sensor, implement your design in Verilog, simulatethe design, program the Basys3 board, and show your working circuit to your TA.Note:In this lab, you will only use one Basys3 board to implement your design. Your design should befully self-contained, clocked internally with the local high-speed clock.DemonstrationDemonstrate your project to your TA during the lab session. This has to be donein-person. In addition to the Basys board demo, be prepared to show and explain yourcode in detail, specifically on the part where signals are processed. You also need toshow the timing waveform of the simulation.Report:As this is the last lab of the semester, follow the same writeup format that you used in Lab 2 & 3onwards. Make sure to finish the post-lab questionnaire before the due date. Please include thefollowing items in the pdf report:A section for describing your project functionality. Includes any relevant details, blockdiagrams, etc.A copy of your design codePage 2
Background image
EE 2301 Lab # 7ECE DepartmentA copy of your testbench codeA copy of your constraints fileA screenshot of a simulation of your processing block (not with ADC).Page 3
Background image
EE 2301 Lab # 7ECE DepartmentExample of Useful Sensors:You may use either the TMP36 or the LDR from your lab kit. Or students may obtain othersensors for this project via the ECE Depot, Amazon, Adafruit, or etc.Sensors tested by TAsSoil moisture sensor →https://www.sparkfun.com/products/13322https://docs.google.com/document/d/1_cF0rEfyNKLW1q9Kmx70VoSY7rPVYrgqcsFNC--9KDs/edit2-axis Joystick with click, board mounted →Amazon Link to parthttps://docs.google.com/document/d/1dsVWG6J1DpDhvQkTWKRCby6YRyaMpEz61J7IWsOy4Ro/edit?usp=sharingTMP36 - Temperature sensorhttps://docs.google.com/document/d/1aU-czttYtcsZGxNUK-tyo3LB-An_cs-UyPaWxzwSQwc/editLight Dependent Resistor (LDR)~10k resistance at low light levels, >100k in dark, ~2k in brightUntested SensorsThe sensors below are untested, use at your own risk:Electret microphone amplifier -https://www.adafruit.com/products/1713Short flex sensor -https://www.adafruit.com/products/1070Force Sensitive Resistor →https://www.adafruit.com/product/1075`Page 4
Background image