Second, read the Softscope tutorial from the readings.
Third, point 3 of the "Measurement" section below, in the "recommended approach" paragraph, describes a script you need to write. It sets up the 6009, grabs samples, processes them, and produces a number. Write that before you arrive at the lab.
When you arrive at the lab, check out a kit, make sure your name is on the sign-out sheet for that kit number, remember the number , and use only this (your team's own) kit for all work in all lab sessions for this project.
Pick up one spool of wire from the box of them. Be careful to secure the loose end of the wire in the spool slit so it does not unwind. When you go, return it to the box it came from, NOT in your kit. If you can't wind three coils in 2 hours there's a problem somewhere, but if you have to stop, stop between complete 100-turn coils and return the wire where you got it.
In this lab you will build a device called a Linear Variable Differential Transformer (LVDT) and measure some of its properties. LVDTs are commonly used to measure displacement electrically by producing an AC voltage that is proportional to the distance of a moveable core from a zero point location. They have an advantage over potentiometers and variable capacitors in that there are no moving parts that need to be in physical contact with the electrical components, so the electrical system can be mechanically isolated from the system being measured. This allows use in severe environments (e.g. high pressure or vacuum, high or low temperatures, presence of hazardous chemicals, etc.) without the need for seals that transmit motion, which are typically hard to design, expensive, and prone to failure. It also permits friction to be limited by bearing systems, (which can be liquid or gas if needed) rather than the sensor contacts.
Physically, an LVDT consists of three coils arranged in a line, with the center coil being driven by a stable AC source, and symmetrical outer coils being hooked up in reverse series (so that the induced voltages tend to cancel each other) to provide an output. Running through the center of the three coils is a moveable core of high-permeability magnetic material (e.g. iron or ferrite), typically sized so that the ends lie within the outer coils when the system is centered. A schematic drawing is shown below.
Because the magnetic field tends to run along the core and spread out at the ends, the flux linkage between the center coil and the end coils depends on the position of the core. When the core is in the center position, the symmetry causes the induced voltages to cancel each other, and the output is 0. If the core is moved slightly from the center, the induced voltages change in opposite directions, so that a non-zero output voltage is produced. If the end coils are relatively long, uniformly wound and cover the zone where the magnetic flux spreads out from the core, then the increase (or decrease) in voltage will be approximately linear with core position, since each flux line links an additional turn of the coil when the core is advanced. Coils can also be specially designed to produce a linear response even in short geometries, but that is a bit beyond the scope of this lab. The device is essentially a transformer with a variable turn ratio, hence the name.
In order to reduce the magnetic forces on the core, and reduce any heat generated, we want the primary coil current to be relatively small. In real applications, this is generally achieved by using a high-frequency driving signal, so that the center coil has high inductive impedance. (Recall that magnitude of the impedance of a coil in ohms is given by &omega L where &omega is the (angular) frequency of the signal (radians per second) and L is the inductance of the coil in henries). To keep things simple and cheap, we will be using AC line signals at 60Hz (stepped down to a safe 6V - 12V rms AC with a bell transformer). We assume 6V below, but our transformers may produce something more than that.
60Hz is a relatively low frequency at the scale where we will be constructing our device, so we will use a resistor in series with the center coil to limit current and prevent the primary coil from overheating. In particular, for ease-of-construction, the coils we will make will have only 100 turns, which makes the inductance relatively low. The iron core is some help; If employed in a closed loop, an iron core can increase the inductance by a factor of 1000 or more over that of an air-core-coil. For our open core geometry, the effect of the iron is only a factor of 5-10. This is sufficient to produce a large variable linkage as the core is moved, but not enough to let us support 6V inductively at 60Hz at reasonable current. The voltage is mostly across the resistance; only a small fraction is across the inductive component of the circuit. This amounts to several millivolts, which is, however, sufficient for measurement purposes.
Design contraints are mainly to limit construction effort and use easily available materials. With regard to the first, let's limit the number of turns per coil to 100. For the second, let's use 1/2" PVC pipe as a base to wind the coils, and a section of 7/16" steel rod for the core. The low frequency and low inductance lets us get away with using a simple slug for the core. At higher inductances, as in a power transformer with a closed-loop core, or at higher frequencies, induced currents in a conductive core are large enough to cause problems. This is why power transformers are construced using laminated cores, and high-frequency inductors use a ferrite ceramic core material.
Let's use #30 lacquered magnet wire for the coils. Thinner would be better in some respects (e.g. we might be able to put enough resistance into the coil itself and not need an external resistor) but it turns out that anything lighter than #30 is easy to break accidently when winding coils by hand. Hold everything together with electrical tape. All materials available cheap from hardware store and Radio Shack.
Hold the train!! Why are we using feet and inches? Doesn't the modern world work in metric? Yes, but the hardware store still uses inches, and engineers should be comfortable switching back and forth between whatever units are convenient. You do know about what 7/16" is in centimeters, right??
OK, having a provisional design that seems buildable, let's check
to ensure that the output is likely to be measurable with our
equipment. The 6009 unit seems to be able to measure with a resolution
of about a millivolt: with a range of 10 volts (-5 to 5) and
14 bits of accuracy, we get (10/214)V. or about 2/3 mv
resolution. So we would like a max output of several millivolts
(e.g. at least 20 mV or so).
The output voltage will be bounded by the inductive voltage
across the central coil. To figure this, we need to approximate the
induction of our central coil.
Poking around in references, we find an old engineer's formula
for a short, air-core solenoid:
L = (r2 * N2) / (9*r + 10*l)
where L is the inductance in uH (micro-henries), N is the number of turns,
and l and r are the length and radius of the coil in inches (!! - go figure,
it's an empirical engineering formula).
If we plug in r = 5/16", l = 9/8", and N = 100, we get a value of
N2 * .098 / 14.0 = N2 / 140 = about 70 uH.
The rms voltage drop across an inductor is given by V = I &omega L. &omega for 60Hz = 2 &pi * 60 or about 377 radians/sec. Plugging in our .5A rms current, we get V = 377 * 70uH * .5 = 13mV rms. If our iron core multiplies the inductance by a factor of 5 (that's a back-of-the-envelope approximation that is a little beyond this lab) we have 65mV to work with. Our max-voltage configuration probably links at least half the flux, which would be 32mV, so it looks like the design is viable from a measurability standpoint.
Note that if the design didn't work out, having done all the calculations, we basically know how the outputs of interest scale with the parameters. For instance the output voltage scales approximately with N2 as long as the resistance of the coil is small compared to the external resistor. When the coil resistance dominates, the current will drop proportional to the number of turns, and the output voltage will scale more as N. The knowledge can be used to adjust one or more parameters and move the design into a functional range. This sort of iterative "experimental" approach is often more effective than trying to formally set up all the constraints and solve the equations for some "optimal" solution.
These days, we have computer programs that allow you to do just this sort of optimization. However, they need input telling them exactly what the constraints are and how to trade off one design consideration against another. If the engineer does not have a feel for how the various parameters interact, of the sort that is obtained by the preceding sort of process, it is easy to mis-set the constraints in a way that results in solutions that are inappropriate in sometimes rather bizarre ways (basically these programs have no common sense).
Check out a kit, make sure your name is on the sign-out sheet for that kit number, remember the number , and use ONLY this (your team's own) kit for all work in all lab sessions for this project.
Pick up one spool of wire from the box of them. Be careful to secure the loose end of the wire in the spool slit so it does not unwind. When you go, return it to the box it came from, NOT in your kit. If you can't wind three coils in 2 hours there's a problem somewhere, but if you have to stop, stop between complete 100-turn coils and return the wire where you got it.
Actual construction of the experimental device is fairly straightforward. The one additional component needed is a means of moving the core and measuring its position. This is provided by inserting a 1/8" wooden dowel into a hole in each end of the core. The figure below shows the placement of the coils based on the design worked out above.
The main measurement you will make here is to obtain the output voltage as a function of core displacement. This will allow you to investigate the linearity of your system, and calibrate it.
You should see a (noisy) sinusoidal output of several mV. Adjust the core towards the center until the sinusoidal output voltage vanishes, or as close as you can manage. You will be left with a noise signal, which may be a few mV. This is the zero point. You might want to mark it on the handle, or you can record the distance from one end of the strip to the end of the tube. If there does not seem to be a zero, and the voltage seems to increase as the core is moved towards the center, you have hooked up the outer coils in series rather than reverse series. Reverse the leads on one of them.
Remember that Softscope is buggy, and you can crash the 6009 unit by pushing the wrong virtual button. If this happens, unplug and replug the USB connection to the unit, and recreate the analog input object and channel. It is also possible to crash Matlab from Softscope. This requires that the Matlab process be removed via the Windows process control panel, and restarted. You might need to ask the TA for help if you do this.
You might be able to use the SoftScope to get peak-to-peak values if you can manage to set the scales to get accurate readings, (within 1 mV), but this turns out to be difficult due to noise in the signal, the lack of good scales on oftscope, and its overall bugginess.
Another approach would be to grab a few cycles (say a tenth of a second) at a sample rate that will give a good representation of a 60Hz sinusoid (say 1000 samples over .1 second). In principle, you could find the peak-to-peak distance by extracting the maximum and minimum, and subtracting. In practice, there may be noise problems in the sampled data, especially if you use just the global max and global min. For this reason it would be better to locate several of the peaks and valleys, use a few points around each (say closest 5), and compute the difference of the average max and average min. This could be a bit complicated to do with a program, and you will want to use a program, as you will be making a lot of measurements.
The recommended approach is to take, say, 6,000 samples over a longer period, say 10 seconds, and compute the rms value (standard deviation) by taking the the square root of the sum of the squared differences from the overall mean. This is easier to program than a peak detector. The rms value is not equal to the peak to peak value, but it is linearly related to it for a sinusoidal signal (how?). This is most easily done using a script that initializes everything, sets the data acquisition rate, sample time, and output range, triggers the data acquisition, waits until the data are acquired, and stores the acquired data in a vector (using getdata()), and computes the rms value. You should be familiar with the relevant DAQ commands from previous labs.
In keeping with the habit of avoiding real data until you absolutely
can't put if off any more, you can debug your rms-calculating
algorithm by commenting
out the DAQ commands and making synthetic ideal 'data': a vector
of make-believe samples from a perfect run: just a 'sampled sine-wave'
vector. For P periods of a sine wave (maybe P= 5) divided up
into S samples (maybe 1000), something like
voltages = sin(linspace(0, 2*pi*P, S)) could do it.
Good old Matlab, eh?
Back to the lab: The first few times you actually take real data, you should take a look at the data you get to make sure it is what you expect (a sinusoid of up to several millivolts). As in code writing, it is a good general practical engineering philosophy to check anything you can while building a system. This helps catch the (inevitable) mistakes as soon as they happen, rather than ending up with a complex system that does not work for one or more reasons that may now be hidden.
NOTE: Due to hardware issues, the Matlab DAQ toolkit may generate an error message if you try to run such a script more than once. We believe plugging the 6009 into the chassis, not the screen, essentially fixes this problem. If this happens to you, the only workaround is to unplug and replug the 6009 USB cable between data acquisition runs. This seems to reinitialize everything to a usable state.
See the Universal Hand-In page
Each team member MUST hand in two submissions to Blackboard for this
lab.
One member should submit both the zipped code archive for the LED
Lab Code grade column and the .pdf writeup for the LED writeup grade
column. Make sure both names are on the README and writeup, and it
would
be good to mention both names in the submission comments.
The
other member should submit 1-liner .txt file "I worked with
so-and-so.". That makes it impossible to forget the partner who
doesn't submit code and writeup.
Submit to Blackboard before the drop-dead date for any credit and before the due date for partial-to-full (or extra!) credit.
The writeup is, as usual, a scientific report of your experiments, results and conclusions (full sentences, paragraphs, good english, complete descriptions etc. Basically assume the reader did not read the assignment). The writeup should include all data (though not the thousands of raw reads). t should also include (at least one) nice plot of the results, and the results of any line-fitting computations.
Last update: 04/20/2011: RN