CSC 160: LVDT Lab

Preparation for the Lab

First, read this entire document, print it out, mark it up with notes or questions. Get a clear picture of your job and make a plan.

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.

Introduction

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

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.

Possibly useful specs.

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??

Some quick back-of-the-envelope computations

Check on provisional design

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).

Construction

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.


  1. Mark the center of the PVC tube, and centered on that, the position of the 1-1/8" coils, leaving a space of 3/8" between the center and outer coils.
  2. Using your spool of #30 wire, wind the 3 100 turn coils onto the tube. To help in wiring, all three coils should be wound in the same direction (as if they were all part of one big coil). Try to wind them closely, in a single layer. If you wind them in an irregular lump, the device will still give a signal, but the linearity will be reduced. One technique is to start at one end of the tube and tape the wire down using a wrap of electrical tape, taking care to leave 6" or so for a lead. Put on 5-10 turns spaced fairly close together, under moderate tension, and then slide them together up the tube so they are close-packed. Repeat until all 100 turns are placed, and secure with another wrap of tape. Don't pull too hard, as it is possible to break the wire (you might stretch a short length to breaking before you start so you know how hard you can pull on it). Provide a measure of security and stress relief at both ends by folding the wire back over the tape strip at an angle, and securing with another wrap of tape. This also makes the leads appear to issue right at the ends of the coil, which is useful for keeping track of what is what. Repeat for the center and far end coils. If you feel that your coils might not stay in place, you can wrap electrical tape over the whole coil, but it won't look shiny and pretty.
  3. Check the fit of the core in the tube. If there is too much rattle room, put an additional wrap or two of tape on the ends of the core to fill the space.
  4. In order to make electrical connections, the insulating lacquer must be stripped from the last inch or so of the leads. This is a little tricky with very thin wire. One way is to burn the lacquer off with your lighter (it's very flammable) and then clean any remaining soot off with a piece of ultra-fine (1000+ grit) sandpaper, or even a piece of paper towel. Sandpaper (or even a blade) can be used alone, but its easy to nick or break a thin lead, and hard to get all the lacquer off. This step is important, as the millivolt readings you will be making are easily blocked by even a little soot, oil, or dirt on the wires. If you don't seem to be able to get a signal, check your connections.
  5. Twist the "start" end leads of the two outer coils together to make the reverse series connection. The other two leads from the outer coils are the output, and the leads to the center coil are the input.
  6. You're done!!! The result should look something like the picture shown below.

Measurements

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.

  1. The first thing you have to do is use your test leads to hook up the center coil to the 6V AC output of the bell transformer, which in our assembly is wired in series with the 10 ohm resistor. Plug in the transformer, and you are ready to roll. Note that if you could hook the coil directly to the transformer, it would get quite warm, quite rapidly. We don't know if it will eventually melt the tube, destroying all your work, but it might. The 10 ohm resistor will eventually get fairly warm if current is flowing properly in the system.
  2. The next step is to find the zero point of your LVDT. Make sure the core is in your device, and set it somewhat off center. Hook the output leads into the 6009 unit, and use the SoftScope function to display the output. You should know how to do this from previous labs. [Recall that the output leads need to be hooked into one of the differential inputs of the 6009, and you need to create the analog input object and open two channels since we're going to use softscope. E.g. AI = analoginput('nidaq', 'Dev4'); addchannel(AI, 0:1));.
    You can then call softscope(AI);.

    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.

  3. You are now ready to make your measurements. You are interested in the mean peak-to-peak (maximum to minimum) voltage range of the sinusoid, or some other measurement that is linearly related to that range.

    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 algorithmt 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.

  4. Mark one of the dowel ends as the measurement end, and starting from the zero point, and using a ruler to measure the distance from the tube end to the strip end take a voltage measurement each millimeter or two until the core starts to emerge from the tube. Reset to the zero point, and make similar measurements going the other direction. You should measure to the same marked end rather than switching sides with the ruler, as this will let you put all the measurements on the same scale. The voltage readings should be inverted (taken as negative) when going the other direction. What actually happens is that the phase of the output is reversed, but since we don't have a reference phase, this is not evident.
  5. Plot the voltage versus distance data. How linear is it? How far can the core be moved from the center before the measured value departs by 10% from a line fit through the (hopefully) linear central portion? What is the slope of the linear section (e.g. in mV per mm)? Is there a glitch around zero? If so, what could cause it? Are there any other glitches? If so, can you explain them? What is the linear equation that best relates the voltage to the core displacement in the central region? You can eyeball the best-fit line, and draw it in with a ruler on hard copy, but you could also remove the data points beyond where the curve starts to roll off the line, and use line fitting primitives available in MatLab (or written by yourself if you feel like a challenge). Remember this? and this?
  6. That's about it. If you think of other interesting measurements to make, feel free.

Writeup

See the Universal Hand-In page

Each team member has responsibility to make sure BOTH team-member's names are on the writeup!

Hand in a report-style writeup 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). include README and code files as usual. It should also include (at least one) nice plot of the results, and the results of any line-fitting computations.