You are on page 1of 5

5/2/2019 6.

002 Spring 2019

Lab 12
The questions below are due on Friday May 03, 2019; 05 15 00 PM.

Music for this Lab


Goals:In Lab 12 we're going to do two things. One is build the final parts of the Doppler ultrasound
system, test our system and then spend time thinking about how the different stages of the
ultrasound doppler system come together. The second is to build a 5 V to 30 V boost converter, so
we can get rid of the 30 V power supply.

NOTE: Before starting this lab check that your function generator is in High‑Z mode by pressing
Shift, Enter, the right arrow three times, down arrow twice. If it shows 50 Ohm, use the left or right
arrows and Enter to switch to High‑Z.
1) Recap
First, let's recall again what we're trying to do with the Doppler ultrasound system, and what we've done so far.
Our overall system block diagram looks like:

https://iesc-s2.mit.edu/6002/S19/lab12 1/5
5/2/2019 6.002 Spring 2019

We create ultrasound using the transmit stage. In this stage, we first use the Teensy to create a square
wave, and then we use an amplifier to amplify the voltage.
That ultrasound bounces off an object. If the object is moving, it changes the ultrasound wave frequency
by a little bit. We are trying to discern that frequency change.
To do that, we first amplify the received signal approximately 10× using our receive amp.
Then we want to turn the signal into a square wave to make it easier to manipulate. The comparator does
this. Remember, we can do this because the information we care about is the frequency of the signal,
which remains unchanged when we turn it into a square wave.
Then we want to measure the frequency of that digitized signal. Rather than measuring the frequency of
the digitized signal directly, we first multiply the received signal with the original transmit square wave
using an XNOR gate.
You'll recall from Lab 7 that this created a signal with two main frequency components, one at δf , the
doppler shift frequency, and one at ~ 80 kHz. In Lab 10 we designed a 1 kHz Sallen‑Key low‑pass filter to
remove the 80 kHz signal.
Now we just need to measure the frequency of the remaining signal at δf . However, we will first turn that
signal back into a nice square wave before sending to the Teensy.
The other task we want is to get rid of the two different power supplies. Since we have 5 V coming in to
power the Teensy, we would like to create a 30 V supply voltage from that 5 V supply. We will do this with
a boost converter.
We'll do the Boost Converter first, and then move on to finish the signal path (the comparator)!
2) Switching Boost Power Supply
Our goal here is to build a switching boost power supply that produces an output of +30 V from a 4‑6 V input,
such as the USB input to the Teensy (5 V). A schematic of the power supply, and an explanation of its input and
output connectors, is in the full system schematic.
The input VIN is 5 V from the USB that goes to V+ (pin 2). The output is VOUT, which is nominally 30 V. The
majority of the power supply is concerned with producing the (adjustable) 30‑V VOUT from VIN. To begin,
capacitors C11 and C12 store charge that is delivered as a current to the load at VOUT. As the charge is
delivered, thereby depleting the capacitor charge, the voltage at VOUT falls.
Resistors R15 and R16 form a voltage divider that measures VOUT, presenting an attenuated version of VOUT
to the Maxim MAX771 integrated circuit. When the voltage falls too low, the MAX771 turns on transistor Q1,
which in turn pulls its drain terminal (where the inductor L1 and the diode D1 are connected) nearly to ground.
At this time, the current through L1 begins to ramp up as it is excited by the voltage difference between VIN and
ground. The inductor current passes through Q1 and resistor R14. The voltage drop across R14 allows the
MAX771 to measure the current. When the current is adequately high, the MAX771 turns off Q1. Since the
inductor current must go somewhere, L1 raises the voltage at Q1's drain terminal so as to turn on D1, thereby
https://iesc-s2.mit.edu/6002/S19/lab12 2/5
5/2/2019 6.002 Spring 2019

allowing the current to flow through D1 into C11 and C12. This replenishes the capacitor charge that was
delivered to the load.
This process repeats itself as the MAX771 attempts to maintain the voltage at its pin 3 at 1.2 V, which is the
fraction of VOUT determined by the voltage divider comprising R15 and R16; as a result, the voltage divider
determines the voltage at VOUT.
Note that the power supply runs in discontinuous mode, meaning that the inductor current discharges to zero
during each cycle so that all its energy is transferred to the capacitors at VOUT. The figure below shows several
voltage waveforms over the course of one cycle of operation for VIN = 5V and VOUT = 30 V.

The green waveform is the voltage across R14, and is a measure of the inductor current as it ramps up. It
reaches a peak of 100 mV which corresponds to a peak current of 1 A in about 6.6 μs. (Does this make sense
given the inductance of L1?) The blue waveform is VOUT measured with AC coupling. Thus, the blue waveform
shows the voltage ripple on VOUT. Its peak‑to‑peak ripple is on the order of 50 mV. Finally, the yellow waveform
is the voltage at the drain of Q1, between L1 and D1. Note that during the time that the diode discharges into
the capacitors at VOUT, this voltage is approximately VOUT. From the waveform, VOUT is almost 30 V. Once
the current through L1 drops to zero, D1 turns off, and the 360‑pF output (drain‑to‑source) capacitance of Q1
discharges through L1. This causes the yellow waveform to ring around the input voltage VIN, which is 5V. (Can
you explain the period of the ringing based on the inductance of L1 and the output capacitance of the
MOSFET?)
3) Populate and Solder
Obtain a MAX771 and place it in the appropriate socket. Take a look at the full system schematic to see where it
fits in. Now obtain the rest of the components for the boost converter:
https://iesc-s2.mit.edu/6002/S19/lab12 3/5
5/2/2019 6.002 Spring 2019

Transistor Q1, IRLD024BPF


Diode D1, STPS3L60Q
Inductor L1, 100 uH
1 ‑ 10 μF, 2 ‑ 1 μF, and 3 ‑ 0.1 μF capacitors
R14 (1 ohm), R15 (200 k), and R16 (10 k)
Solder them to their appropriate locations on the PCB. Some notes on orientation:
The inductor L1 should go in a particular orientation, with the text aligned to the long axis of the board.
The transistor Q1 should also be oriented a particular way. The two pins with the tab should go toward the
outside of the board.
The diode D1 also has an orientation. The line denotes the negative terminal, and should go toward the
inside of the board.
All orientations are shown in the image below:

4) Boost converter testing


IMPORTANT: IMPORTANT Do not connect the 30 V supply anymore. It will destroy your boost
converter.
Connect 5 V and ground to your US PCB. Use the oscilloscope to measure the DC voltage at TP9, and make
sure it is around 30 V. Then AC couple the signal to look at the ripple, make sure it is around 50 mV, as in the
measurements above.

https://iesc-s2.mit.edu/6002/S19/lab12 4/5
5/2/2019 6.002 Spring 2019

Checkoff 1:
Demonstrate your working boost converter to the staff.
Ask for Help Ask for Checkoff

5) One Last Comparator for the Road


We used a comparator way back in Lab 7 and in ex05. Take a look at that lab and exercise problem as refresher.
For this second comparator, we don't have much work to do, since our signal is pretty square to begin with. We
just want to clean it up a bit. So alot of hysteresis is fine. In fact, let's just go for 2.5 V of hysteresis.
Choose R12 and R13 such that there is 2.5 V of hysteresis in this comparator stage. As before, choose resistors
in the 1 kΩ to 100 kΩ range.
Enter your values for R12 and R13 in ohms as a Python list [R12, R13]:
Save Submit View Answer Ask for Help
You have 10 submissions remaining.
Let's build it. Grab the following components:
MAX941 comparator
two resistors for comparator
And assemble the circuit.
5.1) Code
Next, download this week's code, compile, and load it onto your Teensy. This code uses a Teensy frequency
counter library to count the number of edges of a square wave in a certain amount of time, and uses that to
infer the frequency. The code then displays that frequency on the OLED. The system will also output an analog
voltage proportional to the frequency on one of the Teensy's DAC pins.
NOTE: Please make sure you have completed and gotten checked‑off for Lab 5, Lab 8, and Lab 9,
before you attempt the next step.
Place your Teensy and OLED on the Doppler US board. You are ready to test!

https://iesc-s2.mit.edu/6002/S19/lab12 5/5

You might also like