Making an LVDT - Page 1
Forum section: electronics / projects

author: Muffins
author_rank: Regular Contributor
timestamp: June 16, 2024, 07:57:22 pm
content: Hello all.I have started a new project building an LVDT, drive circuit and sensing circuit.At the moment I'm still in the early stages, I've got some components and a spool of 0.25mm magnet wire. I'm aiming for the stroke of the LVDT to be around 40mm with the movement being slow and without vibration.I'm trying to decide on the driving circuitry but I am a little unsure of a suitable approach as I am not that experienced with analog circuits. From what I understand I should be putting a sine wave into the main coil with a frequency in the kilohertz range.I've looked at some sine wave generation circuits, even making a wien bridge oscillator, but I'm not sure if sine wave generators based on op-amps will be able to provide enough energy to drive the coil. As I understand the sine wave should also have no dc components to avoid saturating the coil. Surely then something like a H-bridge would work quite well to produce an alternating current through the coil but the waveform with simple switching will be a square wave. I suppose with some PWM of the input to the H-bridge a sinusoidal average voltage could be made but would that be a good solution? I've seen the components of a DC square wave be filtered out to make a sine wave but that involves using a low pass filter, which I'm not sure would be suitable in this circuit.What should I try next?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 16, 2024, 08:49:41 pm
content: Edit / oops. I mixed up LVDS with another inductive sensor type and that makes my post below mostly not relevant. Unless maybe, you may be interested in other inductive sensor types too...The simplest is probably to build a free running LC oscillator, and then just measure the oscillation frequency.For the rest it all depends on what you want to do with your sensor. Do you want low resolution movement detection (for example in a harsh / dirty environment) or do you want sub micrometer resolution. LVDT's for those cost EUR700 or more, and I guess there is a reason for that. I am curious myself what resolution you can get with DIY methods though.

author: moffy
author_rank: Super Contributor
timestamp: June 16, 2024, 11:49:24 pm
content: LVDTs come in all shapes and sizes, I worked on a typical one that used two coils driven 180 degrees apart and a detection coil that measured how far it traveled one way or the other. I assume you are just building a single coil and will be measuring the amplitude to detect motion or will you be using a differential coil/drive? A sine wave is preferred over a square wave because of parasitic capacitances which will mess with your signals if using square. If you are worrying about drive current then use an audio power amp ic as the driver, I assume you'll want a frequency below 20kHz. A Wein bridge oscillator driving a power amp ic should work well.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: June 17, 2024, 04:57:33 pm
content: Look up the TI PGA970. Not sure of price or availability but the block diagram might be useful if you can't get the actual device.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 17, 2024, 05:11:24 pm
content: There is no real need for a sine wave. A slightly smoothed / slew rate limited square would be OK too. This is usually with some phase sensitive detector and for this one need a fixed phase reference signal - this gets easier with a square wave. Also a constant amplitude is easier with a square wave.The question is a little how one wants do do the detection. A question is what to do with the LVDS signal: if the signal goes to a ADC / µC anyway, one could as well directly read the AC signal and do the rectification / correlation in software.

author: Muffins
author_rank: Regular Contributor
timestamp: June 17, 2024, 05:31:51 pm
content: Quote from: Doctorandus_P on June 16, 2024, 08:49:41 pmI think part of the appeal for the choice was it would be interesting to build. They seem to have good response to movement and I like that they will be quite reliable.Quote from: moffy on June 16, 2024, 11:49:24 pmI'm looking at a drive coil with coils on either side of it in opposition, I thought that was the only orientation from looking around online. I suppose that would be the differential coil/drive?Nice recommendation on the audio amplifier IC. I was looking around earlier and found this one from TI,LM1875, do you think this would do well?Quote from: Conrad Hoffman on June 17, 2024, 04:57:33 pmI did come across these. Seems like the way to go later on, I'd like to put something together on a breadboard first thoughQuote from: Kleinstein on June 17, 2024, 05:11:24 pmHow would you go about generating an AC square wave as a driver? As for the output, it would be great to get it to the point where it could be interpreted by a microcontroller. Initially I'd be satisfied just checking it out on the oscilloscope and playing around with it.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 17, 2024, 06:43:27 pm
content: One usually does not want a high drive power. The drive power will heat up the coil and this way reduce the accuracy. If enough turns are used one should get away with just 1 or 2 OP-amps (as H bridge) driving the coil. In a noisy environment one may consider a small audio amplifier, maybe TDA7052 (1W) / LM1877 (2W) or similar, but hardly more power needed.For a rectangular signal an amplifier with RR output stage could also be driven to saturation and provide some slew rate limiting. A 50/50 square wave with bridge driven is usually low enough in DC. If needed a series capacitor could block the DC part.

author: moffy
author_rank: Super Contributor
timestamp: June 17, 2024, 11:52:02 pm
content: Quote from: Muffins on June 17, 2024, 05:31:51 pmBuild your coil or something closely approximating it and measure its inductance at the frequency you want to use, 1kHz, 10kHz etc. you can choose the frequency some what based on how responsive your output is needed. A higher frequency means a faster more responsive output, less delay, which is important for control loops. Once you have measured its impedance/power consumption at the frequency of interest you can work out what sort of power/ic you need to drive the coil. The drive voltage can be like 5Vp-p, the detection can be done with a synchronous detector or a micro and its ADC.

author: branadic
author_rank: Super Contributor
timestamp: June 18, 2024, 05:58:29 am
content: We have made LVDTs in the past using rigid and flex PCBs instead of wound wires and instead of amplitude demodulation, which is fairly common, we use phase difference measurement, which is essentially a time measurement between two sinewaves of known frequency using TDCs. This gives a fairly linear signal in the middle of the measurement range and high resolution at the very same time, plus the signals are directly digital without the need of an ADC.https://patents.justia.com/patent/9581425-branadic-

author: moffy
author_rank: Super Contributor
timestamp: June 18, 2024, 06:39:03 am
content: Quote from: branadic on June 18, 2024, 05:58:29 amSince it's a patent, I guess the OP can't use any of the information to build one himself?

author: branadic
author_rank: Super Contributor
timestamp: June 18, 2024, 06:52:30 am
content: For private use there is no problem of building something based on a patent.-branadic-

author: ealex
author_rank: Frequent Contributor
timestamp: June 20, 2024, 04:18:27 am
content: I've been working with LVDT's that have a different configuration: they're a big coil with a center tap.Regarding PGA970: you need and NDA for the real datasheet ...It's great when you get it to work - the documentation is somewhat confusing and I had trouble setting the build env. for the included CM0 core.You can use it as a dumb peripheral, but the interface is slow - you need the CM0 core to implement some extra filters.I've been thinking at some replacements for it - because of it's price and availability issues.Something like a tayloe detector ( quadrature sampling ) and then basic DSP - not my strong point. but i need to start learning.Interesting link:http://e2e.ti.com/cfs-file/__key/CommunityServer-Discussions-Components-Files/171/7127.TI-_2D00_-Signal-Conditioning-an-LVDT-Using-a-TMS320F2812-DSP.pdf

author: moffy
author_rank: Super Contributor
timestamp: June 20, 2024, 06:58:42 am
content: This Linear Technololgy note describes a nice simple LVDT interface:https://www.analog.com/media/en/reference-design-documentation/design-notes/dn362f.pdf

author: Muffins
author_rank: Regular Contributor
timestamp: June 20, 2024, 09:07:42 pm
content: Found time to put a bit of work into this. I've drawn up the driver circuit schematic in kiCad, please see attached and let me know what you think.I've gone with a wien bridge oscillator feeding into the LM1875 audio amplifier.Will hopefully start putting together some coils tomorrow. I picked up a spool of 0.25mm enameled wire.

author: moffy
author_rank: Super Contributor
timestamp: June 20, 2024, 09:58:24 pm
content: The LM1875 has a minimum supply of 16V, what you could do is use the second amp in the LM358 as a buffer for the oscillator, and remember to remove any DC bias across the coil, if you bias the coil to 0V just use an electrolytic in series with the buffer LM358 and maybe also a 50R resistor to prevent the LM358 output from oscillating and provide some short circuit protection. There is no need for C1, it removes the necessary DC bias for the LM358.

author: ealex
author_rank: Frequent Contributor
timestamp: June 21, 2024, 04:39:16 am
content: i've found another interesting paper:https://eescholars.iitm.ac.in/sites/default/files/eethesis/EE13M050.pdfthey're using a center tapped LVDT and measure the inductance with 2 timers and a comparator.

author: Muffins
author_rank: Regular Contributor
timestamp: June 21, 2024, 10:43:50 am
content: Ah, well the 16v minimum voltage seems a little inconvenient.Looking around, I've found another high current op ampOPA548Tand placed it in the circuit instead. I'm thinking now, why have one op amp feeding into another high power op amp? Can't I just put the wien bridge oscillator directly on the high current op amp?Quote from: moffy on June 20, 2024, 09:58:24 pmI'm not sure what you mean when you say use the second amp in the LM358 as a buffer, why would you want to do this? And how could there be a DC bias across the coil if the output of the power amplifier swings to -Vcc? Please excuse my limited knowledge on the subject, thank you for your input.

author: moffy
author_rank: Super Contributor
timestamp: June 21, 2024, 11:14:43 am
content: Sorry, I missed the -5V supply, as such you can't use polar electrolytics for C9/C8, you should be able to get away with plastic film caps, and C1 makes sense then. Still a resistor in series with the output helps for testing/protection, it can always be linked out if desired. You could use the second LM358 instead of the OPA548, just depends on load current.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 22, 2024, 04:56:54 am
content: Quote from: Muffins on June 21, 2024, 10:43:50 amPerhaps you can, when you have a stable design.In the meanwhile, best to separate the load from the oscillator, so they do not interact. Much easier to test.Since this is for experiments, I'd choose a better opamp than the terrible LM358, use one half as OSC and one half as zero crossing for a sync detector driver on the coils.A Sync detector with a low pass filter, acts like a narrow band filter, whilst a peak detector has poor mains / noise rejection.You may find it useful to set up a switch to allow a change in test frequency.

author: Muffins
author_rank: Regular Contributor
timestamp: June 22, 2024, 07:19:57 pm
content: Thank you, I don't think I understand though. What would be done with the output of the sync detector?Do you have a preferred opamp you use for general purpose things?I've made some progress today. I built a coil, see below. It's got 3 coils in line, 30mm long each and 3 layers thick of 0.25mm wire, putting each coil at around 360 turns. The tube is 14mm OD.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 22, 2024, 10:12:18 pm
content: The amplifier choice depends on the supply votlage and demands on the noise and drive level. Chances are the coils are more low impedance and thus more low voltage and rel. high current. For the start I would consider RC4558 or NE5532 as common types with low noise and reasonable speed to use a not so low frequency. The LM358 is a bit on the slow side, even for 1 kHz.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 22, 2024, 10:51:17 pm
content: Quote from: Muffins on June 22, 2024, 07:19:57 pmYou create a sync detector with analog switches and an inverting amplifier.On + phase the positive amplifier is selected and on the negative phase, the inverting path is selected.Thus you get a sync rectifier output, that can be averaged, and that cancels common mode injected noise.Quote from: Muffins on June 22, 2024, 07:19:57 pmThat depends on your final supply voltages and drive currents.A drive resistor lets you experiment with voltage or more current-like drive.Quote from: Muffins on June 22, 2024, 07:19:57 pmNice.The coils and core type/length will have far more influence on this, than the amplifier choice.If you have a signal generator, you can get some quick curve-shapes from candidate coil designs, with a scope or voltmeter..Another approach is two coils, current fed where the voltage developed is proportional to inductance.Or you can make a local LR Oscillator using something like a 4060 + Analog switch that alternates each coil, every 2^N clocks, to convert L1-> Hi Time & L2 => Low Time, MCU timer compatible.Do you plan to use a MCU with a lookup table to correct for the S curve errors ?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 22, 2024, 11:19:46 pm
content: Quote from: Muffins on June 20, 2024, 09:07:42 pmI would suggest some minor tweaks to the Wien osc.Move the trim pot from the opamp input, that's the most sensitive node, and lower its value so the trim pot is only fractional influence.Connect wiper to either GND or the Opamp output.That makes it easier to adjust and reduces the drift from the trimpot.Choose low ppm resistors (which usually means low tolerance) and NPO capacitors (1% if you can get them) for Wien parts.I'd also add a resistor in series with the clamps, so you have independent slope control - at low signal levels you want gain a tad above 3 and at higher levels, just under 3, so not too abrupt a gain change.The conduction angle of the clamps multiplies that series R, so experiment and check with temperature sweeps.It's a trade off between startup time and distortion.An alternative design could use a two integrators oscillator, for sine/cosine drive of your outer coils and then the inner coil couples to sweep the phase angle.Exact balance between the sine and cos coils gives 45 degree mid point

author: moffy
author_rank: Super Contributor
timestamp: June 22, 2024, 11:50:14 pm
content: Quote from: Muffins on June 22, 2024, 07:19:57 pmVery nicely wound, very neat and even. Did you do it by hand or did you use some mechanical aids?Using the inductance calculator at:https://www.66pacific.com/calculators/coil-inductance-calculator.aspxThe air cored inductance is around 626uH using the 360Turns, 3 layers at 0.25mm wire OD and 1.4cm diameter and coil length of 3cm. The inductance will only go up when you insert your core so you have a minimum load value now. So for 1kHz its about 3.93R and for 10kHz about 39.3R per coil.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 23, 2024, 06:30:55 am
content: A first test would be with function generator and scope, to get an idea of the signal level (depends on the core) and also suitable core length. The form with 3 coils in series depends quite a bit on the core length. The simpler form would be with only 2 coils side be side and the 3rd coild wound on top in the center, possibly all the way over the others.For the drive and detect part one has the choice of driving the center and detecting the difference of the outside coils or the other way around. The difference is in how much it couples to the outside: the 1st version is better in suppressing external interference and the 2nd version produces less external long range field.The generator does not need precision resistors / capacitors. However the caps should not be electrolytic or class 2 ceramics (e.g. X7R) - any film type or C0G ceramic should be OK.If the final signal is going to a µC, I would not use a separate generator anyway, but use the µC to generate a square wave and then apply some low pass filtering to this. The drive signal does not have to be a good sine - a rounded square wave (to reduce EMI) would be fine too.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 25, 2024, 10:49:50 am
content: I've been reading a bit about LVDT's and not really convinced this is a wonderful thing. It uses a complicated way to generatean analog voltage, and then you have to put that into an ADC.I also bumped into the AD598. This little chip costs EUR122 from mouser, which seems quite ridiculous.Now you've built your sensor coils and are doing some experiments, I suggest you also do some experiments with a simpler method.Ever since the '90-ies there are a bunch of circuits floating around the 'net for an LC meter. It's build as a free running LC oscillator and a microcontroller to measure the frequency of the oscillator though some reciprocal math. Years ago I did some experiments with this, and you can do quick measurements with about 0.1Hz resolution, (and could get more resolution by integrating over more oscillation periods). The hardware is very simple, and schematics and software is floating around the 'net.Note:Now re-posted in the right thread. I accidentally posted this in:https://www.eevblog.com/forum/projects/diy-variable-ac-voltage-and-frequency-source-for-calibration/msg5553581

author: Kleinstein
author_rank: Super Contributor
timestamp: June 25, 2024, 11:38:03 am
content: For the solution with µC / ADC the drive signal should ideally use the same reference as the ADC. So more like square wave from the µC with a little low pass filtering.Something ferromagnetic near the LVDT can interfere with the readings. It gets tricky to build a shielded LVDT.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: June 25, 2024, 05:02:19 pm
content: some useful stuff here-https://www.researchgate.net/publication/221918107_Linear_Variable_Differential_Transformer_Design_and_Verification_Using_MATLAB_and_Finite_Element_AnalysisThe strong point of an LVDT is almost unlimited resolution. If your needs are more modest, there are simpler ways as mentioned above. I've built simple LC oscillators with a longish coil and a ferrite that moved in and out, just measuring the resulting frequency. Worked fine but today everybody wants a digital solution with as little analog stuff as possible. Things like anhttps://ams-osram.com/products/sensors/position-sensors/ams-as5304-linear-sensoror it's many relatives are accurate and cheap.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 25, 2024, 10:58:46 pm
content: Those HALL based sensors don't give absolute position (i.e. the pattern repeats every 4mm).And there are more options, for example EE-SX1070 is an analog optical sensor. It costs EUR 3 and can have a resolution of 1um over a range of 1mm.I accidentally bumped into this sensor via:https://hackaday.com/2024/05/18/flexures-keep-this-printed-displacement-sensor-in-line/Edit / Addition: (not worth a second full post)I had a look at TCUT1800X01 datasheet (See post below).The sensors in these are staggered, and have a "linear range" of around 0.2mm These seem to be optimized for digital sensing, while the EE-SX1070 has a relatigely linear range of about 1mm and is desgned for linear position sensing.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 25, 2024, 11:45:24 pm
content: Quote from: Doctorandus_P on June 25, 2024, 10:58:46 pmThat's just a diode-transistor photo interrupter.The narrow slots give it a quasi linear transition with % of light transfer, but it isverytemperature and unit to unit dependent.A second sensor, mounted next to the working one, (or a dual sensor like TCUT1300X01) could give some tracking compensation if you wanted to push these.Vishay have some interesting ones with parts like TCUT1800X01 having 4 slots.

author: Muffins
author_rank: Regular Contributor
timestamp: July 01, 2024, 08:57:50 am
content: Hi guys,Just a quick update on this one. It's been slow progress since the coil was built but now I can get some things after payday. I've ordered a function generator off ebay and I'll order a couple supplies this week. Frustrating not having stock of the basic components.

author: Muffins
author_rank: Regular Contributor
timestamp: July 04, 2024, 08:38:14 pm
content: Quote from: Kleinstein on June 22, 2024, 10:12:18 pmI've picked up the RC4558Quote from: PCB.Wiz on June 22, 2024, 10:51:17 pmHaven't quite planned that far ahead. But I have managed to get a function generator. This morning I hooked it up to the main coil and managed to see a waveform on one of the output coils. It was faint but there. Tomorrow I'll build the audio amplifier circuit to drive the coil properly.Quote from: moffy on June 22, 2024, 11:50:14 pmI mounted the 3D printed tube to a drill and wound the coils under power. I used a small amount of tape to secure each layer in place which also helped the next layer wind over it neatly. The inductance calculator is pretty handy.Quote from: Kleinstein on June 23, 2024, 06:30:55 amWell the first test today was close to this. I input a signal to the centre coil and had the scope connected to one of the side coils. For the core I used a 10mm x 30mm dowel pin that happened to be on my desk. Sliding the dowel pin back and forth did cause the amplitude of the output waveform to vary which I was happy about. A small screwdriver I used to push the pin into the coil seemed to be magnetized to the pin so I used that to move it. I might experiment with other coil configurations after seeing how well 2 seem to work.Quote from: Kleinstein on June 25, 2024, 11:38:03 amI've picked up a triple output power supply. I was just looking for a dual rail one but then this one was really well priced. It has +-12v and a 5v supply. I thought I might use that to power the amplifier and a uC.I've attached a picture of the testing, the oscilloscope shows a good sine wave on the output coil. I had to turn the resolution way up, reading a 37mV peak to peak at around 1kHz! The output voltage of the function generator dropped down a lot when connected to the coil, I think I won't use it to drive them directly haha.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 04, 2024, 09:03:19 pm
content: Quote from: Muffins on July 04, 2024, 08:38:14 pmIt depends on your requirements.3 coil designs have a natural centre-zero balance point, that does not vary with inductance.They also have a balanced 's' curve that is somewhat linear near the centre, and they allow ratio metric (A-B)/(A+B) calculations.That said, MCUs these days have cheap memory for tables and calibrate is not hard, so 2 coil designs and even 1 coil designs are cheaper to make, and cheaper to connect, and may be 'good enough' with a calibrate step, and maybe temperature compensation.I see TI's inductance chips are getting cheaper, the LDC1101 1ch 180ksps TI says is 1ku | $0.850 and the 2 ch LDC1312 1ku | $0.850 i2c with moderate 80-160sps

author: Kleinstein
author_rank: Super Contributor
timestamp: July 05, 2024, 11:14:23 am
content: 37 mV is not such a small amplitude. AC is relatively easy to amplify before going to the phase sensitive rectifier or ADC.It may be easier to amplify the detected signal than to use a larger drive level.The connecting part to transfer the morement to the active core should be non metallic, like a plastic tube or glass tube.

author: moffy
author_rank: Super Contributor
timestamp: July 05, 2024, 11:33:16 am
content: Quote from: Muffins on July 04, 2024, 08:38:14 pmTry 10kHz, you should get greater amplitude as the coil impedance rises with frequency and signal generators typically have a 50R output impedance.

author: Muffins
author_rank: Regular Contributor
timestamp: July 05, 2024, 04:30:31 pm
content: I've made up the drive circuit with the OPA548T driving the coil. After a little fiddling to get it right I managed to get around a 4v peak to peak signal on the output coil driving with about 12v peak to peak at 20kHz.I taped a pen tube to the dowel pin and used that to move it in the coils. It works fine while the dowel pin is in the coils but seems to shut down when it's moved out of them. I'm guessing the coils pull too much current when the steel core is removed. When it's placed back in the coils the thing starts up again and works fine.I'm still just looking at one output coil. Time to work on the output circuit. And also add a few isolator switches so I don't have to keep unplugging the power supply.Quote from: Kleinstein on July 05, 2024, 11:14:23 amWouldn't a low amplitude signal need sensitive circuits?

author: Kleinstein
author_rank: Super Contributor
timestamp: July 05, 2024, 05:25:14 pm
content: The moderate excitation frequency implies a low to moderate bandwidth. Anyway reading the mechanical displacement is not fast by design.With a noise of some 20 nV/sqrt(Hz) and maybe a 40 kHz bandwidth to the ADC with would be noise of some 4 µV or about 1/20000 of the range. The typical µC internal 12 bit ADC would still be more noisy. If really needed lower noise amplifiers are available.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 05, 2024, 08:28:57 pm
content: Quote from: Muffins on July 05, 2024, 04:30:31 pmA series resistor reduces the effect of load inductor variations.