Home / Prelab 4

Prelab 4

You are not logged in.

If you are a current student, please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.csail.mit.edu) to authenticate, and then you will be redirected back to this page.

One of the major projects in 6.002 is the design, implementation, and testing of a Doppler ultrasound velocity sensor. This will occur over several labs over the course of the term, and will include work during some problem sets and prelabs. In this prelab, we'll design one of the first parts of the ultrasound system, and in lab we will implement and test it.

But first, here's an overview of the doppler ultrasound system.

1) Doppler ultrasound system overview

The doppler ultrasound was introduced in Lecture this week. Here's a three-sentence description of the system. Using a transmitter, we create a 40 kHz ultrasound wave that we send out into the air via a transducer. If it bounces off a moving object, the frequency of that wave will change via the Doppler effect. We detect the reflected wave and measure the frequency difference between the reflected wave and the transmitted wave, thus inferring the velocity of the object.

There are two broad parts of the system:

1.1) Transmitter

The purpose of the transmitter circuit is to drive the ultrasound transmitter and create an ultrasound wave in air. It takes a square wave created by the Teensy, amplifies it, and sends it to the ultrasound transducer, which can be thought of as a high-frequency speaker.

1.2) Receiver

The receiver is the workhorse of the circuit. The ultrasound wave that is reflected from the object is detected and turned into an electrical signal by the ultrasound receiver transducer. That signal includes v(t), the velocity of the object, inserted into the frequency of the wave via a small shift in the frequency of the ultrasound: \delta \omega(t), where \omega(t) is the frequency of the ultrasound. In other words, the velocity modulates the frequency. The purpose of the receiver is to measure the changed frequency, which it does in a few steps:

  1. First we amplify the signal to make it large before we do any further processing. Then we digitize it, turning it into a square wave.

  2. Next we multiply the signal with the original square wave. This creates two signals, one at twice the original frequency (so, around 80 kHz) and one at "baseband" (so, at \delta \omega(t)).

  3. To get rid of the 80 kHz signal, we'll filter it out.

  4. Finally, we digitize the filtered signal, and send it into the Teensy to measure its frequency, which should be proportional to the velocity.

2) Doppler ultrasound gain stage

In this problem, we'll design the transmitter gain stage. This takes a 40 kHz, 3.3 Vpp square wave from the Teensy and turns into a ~28 Vpp square wave that can drive the ultrasound transducer (speaker).

This stage is placed right after the Teensy:

In the schematic are some elements that we don't need to care about right now. TP1 and TP2 are "test points", which we'll explain later. For now, think of them as nodes. The 2.5 V going into the non-inverting terminal of the op-amp can be assumed to be an ideal voltage source of value 2.5 V. And C1 and the ultrasound transmitter X1 can be ignored for now; they won't affect our analysis.

Finally, the 40 kHz marker denotes the 40 kHz square wave coming from the Teensy. We use 40 kHz because that is the frequency that the ultrasound transmitter is tuned for (it will not transmit other frequencies efficiently).

Let's first analyze the input-output relationship of the transmit stage. Below is a simplified schematic of the transmit stage:

Determine v_O as a function of v_1 and v_2. There are several ways to approach this problem; choose whichever way you prefer. Assume the op-amp is ideal.

Enter v_1 as v1, v_2 as v2, R1 as R1, R2 as R2, R3 as R3.

v_O =

Now we need to pick values for R1, R2, and R3. The wrinkle here is that we wish to power our op-amp with what's known as a single-supply. Meaning that instead of applying, say +15 V and -15 V to the power supply rails of the op-amp, we will apply 0 V and 30 V. We remember that one condition of an ideal op-amp is that the output voltage must never go outside the power supply voltages.

However, the gain of the op-amp for the signal v_1 is negative. So if we chose a set of resistors that resulted in a gain of -8, that would turn the 3.3 V into -26.4 V. But the op-amp cannot generate this voltage, so it would just output 0 V (its upper and lower output bounds are limited by its positive and negative supplies, respectively.)

This is the reason that we have v_{2} not equal to zero, and that the gain from v_2 to v_O can be set independently of the signal (v_1) gain.

In thinking about how to design the stage, we can see from the diagram at the very top of this page that goal is for the signal to get inverted while it is also amplified, thus 0 V from the Teensy gets converted into ~ 26 - 29 V, while 3.3 V from the Teensy turns into ~ 0 V (actually, ~ 0.2 - 1.5 V).

OK, let's design. Choose R1, R2, and R3 such that:

  • 0 V from the Teensy (v_1) gets amplified to between 26 V and 29 V. Why not amplify to 30 V? Because most op-amps can't output voltages right at their power-supply rails (except op-amps specifically designated as rail-to-rail). See if you can find in the datasheet the "output swing" of the TLE2141 that we'll be using.

  • 3.3 V from the Teensy (v_1) should get amplified to between 0.2 V and 1.5 V.

  • v_2 is 2.5 V.

  • The resistor values should be in the 10 k\Omega - 100 k\Omega range. Why? Because if the resistor values are too small, then they will dissipate too much current and potentially load down the Teensy. If the values are too high, they tend to introduce noise and exacerbate offsets and other non-idealities of the op-amp.

  • Resistor values should be part of the standard 5% resistor values.

Enter your values as a Python list in the following order: [R1, R2, R3]. Thus, if you chose R1 = 10k, R2 = 20k, R3 = 70k, you would enter [1e4, 2e4, 7e4].

Enter your circuit parameters here:

3) Next up

That's it for now. In Lab 4 you will populate this stage with components and test it out. And make sure to have the sockets, bypass capacitors, etc., on your board soldered up before Lab 4!