lab4_note

.pdf

School

University of California, Berkeley *

*We aren’t endorsed by this school

Course

16B

Subject

Electrical Engineering

Date

Oct 30, 2023

Type

pdf

Pages

6

Uploaded by DeanKangaroo5110

Report
EECS 16B Designing Information Devices and Systems II Fall 2023 UC Berkeley Lab Note 4 Lab 4: Sensing Part 1 In the previous lab, you built the S1XT33N’s legs: the motor controller circuits that enable it to move around and the encoder circuits to sense how far and fast S1XT33N has moved. However, you might have noticed that the range of motion is quite limited when we are using the lab station’s DC power supply to power our circuits. We need a portable way to power your circuits so that S1XT33N can freely roam on the ground. This is why in the previous lab you also built voltage regulator circuits that enable us to power our circuits with batteries (a portable voltage source). That way, S1XT33N’s legs were able to move on their own. Our end goal is to have S1XT33N be voice-controlled, and in order to do that, we need a way for S1XT33N to listen to what you’re saying. Today we will be building S1XT33N’s “ears”: the mic board circuit that will pick up your voice and convert it into an electrical signal, as well as the surrounding biasing circuits that the mic board requires to function as desired for our circuit. We will also be fine-tuning S1XT33N’s ears by building a low-pass filter, and amplifying its effects using a buffer. The goals of this lab are as follows: • Build the biasing circuit with the mic board • Tune the mic board and measure the frequency response • Build a low pass filter to help the micboard attenuate high frequencies that can be picked up as noise Part 1: Mic Board Circuits Our biasing 1 circuits will provide signals for the OS1 (DC Offset) and OS2 (Level Shift) pins of the mic board so that the mic board can function properly. Before we build the biasing circuit with the mic board, let’s discuss the mic board’s circuit below (this is the schematic of what is on the mic board PCB, or printed circuit board): There are a few key stages and components to the mic board: Microphone Gain: The electret microphone behaves as a variable current source depending on the size of the sound waves hitting it. Current signals are generally more difficult to work with than voltage signals, so we turn that into a voltage signal using the resistor in the Mic Gain part of the circuit. If you would like to learn more about these electret microphone after doing the lab, please read the (optional) extra lab reading note . 1 “Biasing” a circuit means establishing predetermined voltages or currents at various points of the circuit in order to construct the proper operating conditions for the components [ Wikipedia ]. 1 Lab Note 4 — Sensing Part 1 (v3.0)
EECS 16B Designing Information Devices and Systems II Fall 2023 UC Berkeley Lab Note 4 Buffer: This buffer helps keep the amplifier and the capacitor from loading (affecting) the microphone by preventing the rest of the circuit from drawing current from the Mic Gain stage. It looks a little different from the buffers we usually use (there’s a resistor in the feedback loop, whose purpose is beyond the scope of this class), but it functions just the same. Remove Mic Drift: A capacitor placed between one circuit stage and the next is usually called a coupling cap . It really just acts as a high pass filter with a very low cutoff frequency, allowing us to block DC (frequency = 0) and other low frequency components while letting AC/high frequency components to pass. The microphone naturally has a lot of low frequency drift that is hard to predict, so we use this coupling cap to remove any DC offset and low frequency noise. This allows us to ignore whatever DC value the mic gain stage had, and add in a suitable DC value in the next stage. To add in a DC offset, we cannot directly connect the output of the buffer to the DC value since these two voltages are not equal but would be in the same node - hence why we need the coupling cap. DC Offset: For this project, you will not have a negative power source , since the Arduino cannot take negative voltage inputs. If you center your signal around ground, then you will lose the negative half of the signal as soon as you send it through the op-amp because your op-amp won’t be able to output those negative voltages (since all your op-amps’ V SS pins will be set to ground). To get around this problem, we want to center our signal in the center of our available voltage range which is 2.5V. Here is where we will connect OS1 from our biasing circuit via a 100 k resistor in order to accomplish this goal. The reason the resistor is 100 k is because we create an unintentional high pass filter with this resistor and the coupling capacitor in the previous stage. In order to minimize the effects of this unwanted high pass filter, we set the resistor value to 100 k so that the filter’s cutoff frequency is 10 rad/s, or 1.59 Hz, effectively passing virtually all of the signals we pass into the mic board without attenuation. Note that you will have to be careful and remember that a DC offset exists or it could become troublesome later on in the amplifier stage of the mic board. Think of a 0.1V DC signal. Now put that signal through a non-inverting op-amp with a gain of 100 and a reference voltage of 0V. Suddenly that 0.1V DC signal becomes 10V! Level Shift: When we introduce the DC offset at OS1, we have to adjust our amplifier to expect signals centered around that offset. We will explain this further when we discuss the off-board biasing circuit below. Amplifier: Finally, the mic board uses a non-inverting amplifier (with a potentiometer) to amplify the micro- phone signal. Note that OS2 is on the inverting terminal of the op-amp - we use this to help us deal with our DC offset problem. Now, let’s move off the mic board and onto our biasing circuits. The schematic is reproduced below for your convenience. OS1: DC Offset Because we need our signal to be centered in our target range (0 - 5 V), we will need to set the DC offset to the midpoint of this range: 2.5 V. This can easily be accomplished with a voltage divider of two equal resistors from the 5 V rail to ground. 2 Lab Note 4 — Sensing Part 1 (v3.0)
EECS 16B Designing Information Devices and Systems II Fall 2023 UC Berkeley Lab Note 4 OS2: Level Shift When we introduce the DC Offset, we will encounter a problem when the signal passes through the non-inverting amplifier: that DC offset will be amplified along with the rest of the signal! This is because the amplifier will amplify the signal as referenced from ground . This is the key problem here. If we want to avoid amplifying the DC offset, what value should we use for the amplifier’s reference voltage? If you guessed 2.5 V, congratulations! This is the key idea to a level-shifter. We connect OS2 to 2.5V when building the mic board circuits - this is how we tell the non-inverting amplifier to use 2.5V as a reference. If you would like a review of how to add a reference/virtual ground to an amplifier circuit, see lab note 1 . Part 2: Frequency Response of the Speaker-Microphone System The system you are building in this lab consists of the microphone on the mic board as well as the speaker you’re using to play music. You must consider the ability of your speaker to reliably reproduce the desired frequency at a volume large enough to excite the microphone, and the ability of your microphone to pick up and record the desired frequency. Ideally, your speaker will be able to play all frequencies at the same volume, and your microphone will pick up all frequencies equally. However, due to the physical limitations of your speaker and microphone, for some frequency ranges, the signal your speaker-microphone system generates will be highly attenuated. You will be filtering the output of the mic board circuit to partition the frequency spectrum for this and next week’s lab and to extract specific frequency ranges to better sample voice commands later in the project, so you must consider the non-ideal frequency response when designing your filters. How can I add gain to some frequencies and not others? Which frequencies should I choose? In order to design effective filters, we must answer these questions, and to do so, we must first identify the speaker-microphone system’s frequency response. We will do this empirically: as detailed in the lab ipynb, you will play a range of frequencies on your speaker and record the peak-to-peak of the microphone’s received wave at that frequency. We have attached a page of handwritten notes to the end of this note detailing the different parts of the mic board that students have found helpful in the past. Feel free to look through it for another review of the mic board schematic in a less text-heavy format. Part 3: Low-Pass Filter Generalizing the first-order filter The general first-order (or bilinear , since it is linear in both the numerator and denominator) transfer function is as follows (for general purposes, we can plug in s = j ω ). Transfer functions convert us from the time domain to the frequency domain, and are used in circuit analysis when we have sinusoidal / non-DC inputs: H ( s ) = a 1 s + a 0 s + ω 0 Think: What is the gain at s = ? What about at s = 0 ? The gain at s = 0 is the DC gain, and the gain at s = is the high frequency gain. In this case, the high-frequency gain approaches a 1 , and the DC gain is a 0 / ω 0 . The coefficients a 0 and a 1 determine what kind of filter we have. As an exercise, think of the relationships among the numerator coefficients that result in different kinds of filters. The first filter you will build in this lab will be a first-order low-pass RC filter to isolate the frequencies below the desired cutoff frequency, as detailed in the lab ipynb. In addition to serving as part of the color organ filter in next week’s lab, this filter will eventually be used to better sample voice commands in later phases of the project. This is because human speech is typically below 2500 Hz, so the filter would pass through frequencies corresponding to human speech while attenuating higher frequency noise. 3 Lab Note 4 — Sensing Part 1 (v3.0)
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

Browse Popular Homework Q&A

Q: United Kingdom Imports. Toyota manufactures in Japan most of the vehicles it sells in the United…
Q: Perpetual Inventory Using FIFO Beginning inventory, purchases, and sales data for portable game…
Q: T/F: A p orbital on one atom cannot overlap an s orbital on another
Q: Use the References to access important values if needed for this question. The equilibrium constant,…
Q: A moving atom of mass m1 collides elastically with a fixed atom of mass m2. Considering a head-on…
Q: 6) After light from a source passes through two slits, a first order bright spot is seen on the wall…
Q: The Samsons are trying to determine whether they can claim their 22-year-old adopted son, Jason, as…
Q: 17. Determine which way water movement occurs between a cell and the ECF when the ECF becomes…
Q: Furniture has a beginning inventory of 3 dining tables at a cost of $1,400 each.  During the year,…
Q: For each of the following events or transactions, prepare the necessacry journal entries and…
Q: On January 1, 20X2, Plend Corporation acquired all of Stork Corporation's assets and liabilities by…
Q: Thanks, but can you also solve this by finding out the area under the velocity line or is that just…
Q: Suppose you buy one SPX call option contract with a strike of 2200. At maturity, the S&P 500 index…
Q: Root loci are usually plotted for variations in the gain. Sometimes we are interested in the…
Q: 9. Let F = (0,-z, 1). Let S = {(x, y, z) | x² + y² + z² = 1, z ≥ }}. FdS using the Verify that F =…
Q: 3. Consider an observer moving along a worldline x" (A) parametrized as xº (X) = λ, x¹ (X) 1/1/213…
Q: The estimated amount of depreciation on equipment for the current year is $10,400. Journalize the…
Q: A 63.0 kg bungee jumper jumps off a bridge and undergoes damped simple harmonic motion. If the…
Q: Find the point on the curve h(x)=x2−8 that is closest to the point (−18,−8). Enter your answer as an…
Q: Find the centroid of the region W lying above the sphere x² + y² + z² = 30 and below the paraboloid…
Q: How many possible restriction maps are compatible with these data?
Q: What kind of research design should we use here (between-groups or within-groups? 2.) Which…