Build6-7

.pdf

School

University of Florida *

*We aren’t endorsed by this school

Course

3003

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

3

Uploaded by KidArt5006

Report
EEL 3003 Arduino Builds 6 & 7 First Name: Aleksandr Last Name: Mnatsakanyan UF-ID Number: 28902886 Read the instructions carefully. Build circuit 6 1. Read pages 70-77 in the Arduino Projects Book and watch lecture video "Arduino Build 06” in Module 6 2. (5%) A short one or two sentence description of the build. Please be concise. Using a photo-resistor measure the intensity of light, to control the frequency of the sound coming from a piezo element. 3. (21%) Build the circuit and record a short video of your working circuit demonstrating all of its functions (include the calibration loop). No narration needed. Make sure your UF ID is in the video. 4. Short answers a. (5%) What is the difference between tone and pulse width modulation? Tone modulation changes a continuous wave's frequency. Pulse width modulation varies the width of pulses in a digital signal. b. (2%) What is a photoresistor? A photoresistor is a light-dependent resistor (LDR) that changes resistance based on light intensity. c. (2%) How does piezoelectric speaker work? A piezoelectric speaker generates sound by vibrating in response to an electrical signal, converting it into audible sound waves. d. Calibration loop i. (2%) What lines of code perform the calibration loop? while (millis() < 5000) { sensorValue = analogRead(A0); if (sensorValue > sensorHigh) { sensorHigh = sensorValue; } if (sensorValue < sensorLow) { sensorLow = sensorValue; } } ii. (2%) How long does the calibration loop last? 5 seconds(5000 milliseconds) iii. (2%) When does the calibration loop happen? As soon as the Arduino is powered on before the loop iv. (2%) What is the purpose of the ledPin? to indicate when the calibration is started and is over v. (2%) Why does this build require calibration? to account for the initial lighting conditions of the room/setup 5. (5%) Describe your observations (challenges, thought process, anything interesting that occurred, etc.) during your building and testing of Circuit 6. I noticed that the fact that the photoresistor is being calibrated can be used to invert the signal(by initilally covering the photoresistor by your finger) and eventually find a way to use this system as you like.
Build circuit 7 (pages 78-85 in your Arduino Book): 1. Read pages 78-85 in your Arduino Projects Book and build the circuit. 2. (20%) Record a video of the working circuit that demonstrates of all of its functions. As you demonstrate the circuit, refer to the flowchart that you create in part 3. If there is no narration, 10 points will be deducted. As you demonstrate each function, show the part of the flowchart that code is currently executing. Make sure your UF ID is in the video. 3. (10%) Create a flowchart of the code using a software platform. See the document Flowchart Quick Reference. 4. (5%) A short one or two sentence description of the build. Please be concise. In this build we use four push buttons to give the user an input variety, where each button is responsible for a different frequency sound coming from the piezo. 5. This build introduced the resistor ladder. a. (1%) What is the advantage of using a resistor ladder over connecting each pushbutton to its own pin? Using a resistor ladder minimizes the number of required input pins on the Arduino. Instead of dedicating a separate pin for each push-button, a resistor ladder allows multiple buttons to share a common input
pin. The resistance values associated with each button in the ladder help differentiate between the buttons when they are pressed. b. Complete the following table. You need to calculate V AO and keyVal, not read off the serial monitor. Each value has only one value, no range. (1% each) Push Button Resistor (Ohms) V A0 (Volts) keyVal* Freq (Hz) 1 0 5 1023 262 2 220 4.89 1000 294 3 10k 2.49 510 330 4 1M 0.039 8 349 *keyVal is the variable in the code which stores the output of the ADC. 6. (5%) Describe your observations (challenges, thought process, anything interesting that occurred, etc.) during your building and testing of Circuit 7. I noticed that the values received from pressing the buttons are very inconsistent and especially for the one 1Mohm resistor they were way out of the bounds set in the code, and therefore the sound from the piezo was also not consistent, but after changing the bounds from [5, 10]to [1,120] the sound was more consistnet.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help