EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Rx7man on September 19, 2023, 03:42:21 am

Title: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 19, 2023, 03:42:21 am
I have a sensor I'm trying to interface that's a variable INDUCTANCE sensor, I have no access to the old interface to reverse engineer, it's basically a steel ring that moves up and down through the core of a coil, changing the inductance.. I've found it to be somewhere in the 60khz range
ONE way to do it is to feed it a steady frequency either above it's max or below it's minimum, and then as the coil moves it'll change the amplitude of the sine wave, though that's not really the best way..
Then you could feed it alternating minimum and maximum frequencies and read the amplitude of the sine wave.. and get two points from which to interpolate from
However, to sweep through the frequency to find the sweet spot is much too slow for this, I'd like to be able to get a reading about every 10ms, though 25ms could still work

So I guess I'd have to be able to find the phase shift between the current and voltage, then step my input frequency proportionally to the phase shift as that would have both direction and quantity information and should be fairly fast.

I'd really like to hear how other people would interface to this... Is there a specialized chip?  At the moment I'm thinking of using a pair of MAX9924 chips (Variable reluctance sensor chips with zero-crossing detection), though there's another in the family (max9927 I think?) that has quadrature output which might be usable for this, though I'd really have to read up on it to see if I could do it
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 19, 2023, 04:03:59 am
The simplest is to make a resonant circuit / oscillator and measure the frequency.
You can make a LC circuit, or you can make an L-R oscillator, via the same topology used to make R-C oscillators with gates

Or, you can meter the inductance directly

https://www.ti.com/sensors/specialty-sensors/inductive/overview.html?keyMatch=INDUCTANCE-TO-DIGITAL%20CONVERTER (https://www.ti.com/sensors/specialty-sensors/inductive/overview.html?keyMatch=INDUCTANCE-TO-DIGITAL%20CONVERTER)
Title: Re: on-the-fly inductor resonance frequency finding
Post by: DavidAlfa on September 19, 2023, 04:14:31 am
Driving it with a 10-100Hz square wave using a transistor will  show the natural resonant frequency as ringing.
Here you can see some basics.
You can avoid the mcu, if you  have a scope only a square driving signal is needed.
https://danyk.cz/avr_ring_en.html
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 19, 2023, 05:06:10 am
The resonant frequency will always be changing and I need to know what it is though.. your solution sounds good if you have an unknown inductor on a bench.  I'll think about ways to adapt this though.. in some ways it sounds less processor intensive if I can use an interrupt to do the timing. perhaps with an op amp to give it a square wave..

One thing I'll take note of from that article (I think I've come across it before) is to use a polypropylene cap
Title: Re: on-the-fly inductor resonance frequency finding
Post by: T3sl4co1l on September 19, 2023, 05:12:39 am
The canonical approach is an impedance bridge, with I-Q detection.  That is, measuring the sin and cos components of the output, relative to the source (which might be defined as purely sin).  This gives a complex result, i.e. including inductance and resistance.

Depending on the bridge design, I and Q may vary in a straightforward manner, or jointly, as inductance or resistance varies, but in any case there exists a transformation between the measured signals and the element's reactance and resistance.  You could arrange a circuit to read mostly inductance, or impedance, but you might as well go for both, the added effort is small and the complete measurement makes more opportunities for measuring precision.

For more simpler analog approaches, you can arrange an oscillator to run at resonance (no need to track resonant peak), and count the frequency, and measure the current consumption, to find inductance and resistance respectively.  Generally with more sources of error than the bridge approach.  Or even just do a dumb impedance divider and assume voltage sensed corresponds to inductance -- it doesn't, it depends on impedance and phase -- but this gets close enough for most capacitor ESR tester circuits for example.

I'm particularly a fan of doing the I-Q (synchronous detector) method with an MCU, as it's pretty easy to do with a moderately fast ADC (for 60kHz, at least 240kSps is required; many MCUs offer this), and a bit of clever math.

Tim
Title: Re: on-the-fly inductor resonance frequency finding
Post by: moffy on September 19, 2023, 05:32:23 am
The article in Silicon Chip: https://www.siliconchip.com.au/Issue/2017/June/Arduino-based+Digital+Inductance+%2526+Capacitance+Meter (https://www.siliconchip.com.au/Issue/2017/June/Arduino-based+Digital+Inductance+%2526+Capacitance+Meter)   gives a simple circuit that works reasonably well for measuring L or C. The relevant formulas are provided, so all you need to do is measure the frequency. If you talk about measuring its frequency at 60kHz that sounds like self resonance, not really inductance though the self resonant frequency will change with inductance and can be calculated as long as the self resonant capacitance is constant and known. The method mentioned should work as long as the Q of the coil is relatively high but you would need to take into account the parasitic or total parallel capacitance also.
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 19, 2023, 06:19:48 am
I've been playing around with spice models, and I think setting it up to self oscillate and counting the oscillations is going to be a good way of doing it for me with adequate resolution and speed of measurement...  I have a bunch of PIC10 chips I could set up to read and divide by lets say 30 and that would give you a source for an interrupt driven every millisecond, give or take and prevent the main processor from going into 60,000 interrupt routines every second

Does this link work?  It actually starts up on its own, though I wouldn't rely on that in the real world
https://www.multisim.com/content/kgDr2u5EN3EuFNynVBr7fS/copy-of-resonant-frequency-by-counted-pulses/open/ (https://www.multisim.com/content/kgDr2u5EN3EuFNynVBr7fS/copy-of-resonant-frequency-by-counted-pulses/open/)
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 19, 2023, 06:25:42 am
.. I've found it to be somewhere in the 60khz range
is that the self resonance, or does it already have some parallel load cap ?
What range does it change over ?

I have a bunch of PIC10 chips I could set up to read and divide by lets say 30 and that would give you a source for an interrupt driven every millisecond, give or take and prevent the main processor from going into 60,000 interrupt routines every second
Or, you could use a 74AHC1G4208/10/12 as the local oscillator and divider, and keep local loads on the inductor.
your MCU then period measures the lower 10~25ms periods
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 19, 2023, 07:23:25 am
I think it's around 55-65khz with no load cap, so I'll probably add a cap in there to get a bit more predictable capacitance (at this point it was just the capacitance of the coil and wiring), maybe it'll fall to about 30-40khz... exact frequency isn't important as long as it's stable and predictable
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 19, 2023, 07:53:23 am
Does this link work?  It actually starts up on its own, though I wouldn't rely on that in the real world
https://www.multisim.com/content/kgDr2u5EN3EuFNynVBr7fS/copy-of-resonant-frequency-by-counted-pulses/open/ (https://www.multisim.com/content/kgDr2u5EN3EuFNynVBr7fS/copy-of-resonant-frequency-by-counted-pulses/open/)
The link works, tho asking a LM324 to give large swings at 30-60kHz is optimistic.
You need a higher slew rate opamp if you want to use an opamp.
An ordinary CMOS osc/divider should also work here, choose a division scaled down to your desired update rate, then the host MCU measures period using the SysCLK.

I think it's around 55-65khz with no load cap, so I'll probably add a cap in there to get a bit more predictable capacitance (at this point it was just the capacitance of the coil and wiring), maybe it'll fall to about 30-40khz... exact frequency isn't important as long as it's stable and predictable

Your sim uses 320nF (quite large?) and 60uH, were those just nominal values chosen ?
You should try to measure the inductance range and series resistance of the actual coil, for better sim results.
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Infraviolet on September 19, 2023, 03:14:51 pm
"your solution sounds good if you have an unknown inductor on a bench"

The trick in your application is to size the capacitors of your LC oscillator circuit so their resonant frequency is well above the frequency at which you need to track the steel ring's motion. And then to amplify the LC signal in to a square wave between 0V and the Vcc of your microcontroller, so it can be read quickly digitally, not slowly as an analogue level.

You could always have a separate slave microcontroller to count edges for frequency measurement purposes, that way the interrupts on it need not interfere with the timing of other tasks you want to do, you could even have this slave MCU constantly polling the digital input on which the LC square waveform arrives, hence avoiding any time penalty involved in entering an interrupt. A separate interrupt (I2C or something) could let this MCU provide a "count during the last millisecond*" when requested by a master.

Or, if you can find an op amp of the right speed and combine it with some analogue switch ICs then there are ways to make an integrator which would give a sampled-and-held DC otuput level proportional to the length of the LC waveform's ON pulses. I have done this for a metal detecting circuit which had an LC waveform at about 1KHz and was able, as it used the time length of each ON pulse of that waveform to charge up an integrator, to give an analogue DC output proportional to the inductance updated at the same 1KHz frequency as the LC waveform itself ran. I'll explain more if this method interests you.

*or longer or shorter time as appropriate for how fast the ring moves and how fast you need updates on its position
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 19, 2023, 04:56:58 pm
That spice simulator doesn't have much for ready-made op amps in it's library, so I just took the LM324.. I do have an AD712 in my project already.. Is there an op amp you think would be particularly suited for this? I'm thinking of an OPA2677, and it's in a pretty standard SOIC-8 pinout that I could change out if need be, has decent current drive capability.
https://www.ti.com/product/OPA2677 (https://www.ti.com/product/OPA2677)

This application has one big fat solenoid coil that actuates linear rod, and on that rod is the position sensor, I need to have a PID loop that modifies the PWM and places it accurately and quickly

I did measure the inductance of it with a cheap chinese meter and it was 25uH,  and the capacitance was 340uF, and resistance was 25 Ohm.. Now if you plug that into the formula it come out to 55khz

I like the idea of the 74AHCwhatever  divider chip and it's so simple to implement I think I'll use that.. probably a divide by 12bit will give me a pulse ever ms at 40khz which should do nicely,

Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 19, 2023, 06:08:59 pm

This application has one big fat solenoid coil that actuates linear rod, and on that rod is the position sensor, I need to have a PID loop that modifies the PWM and places it accurately and quickly

I did measure the inductance of it with a cheap chinese meter and it was 25uH,  and the capacitance was 340uF, and resistance was 25 Ohm.. Now if you plug that into the formula it come out to 55khz

I like the idea of the 74AHCwhatever  divider chip and it's so simple to implement I think I'll use that.. probably a divide by 12bit will give me a pulse ever ms at 40khz which should do nicely,
Has this setup been used in linear feedback position control before ?

Since this is an experimental control loop, I’d suggest a 4060, as that has output choices so you can trade off update rate and precision.
The 4060 should manage the oscillate part too, with the right L & C

 The meter numbers sound very suss?
C is totally wrong for just a coil, likely the meter measures mV at 1kHz and calculates C from that.
You should use impulse ringing tests initially as above to find resonance and Q with a chosen added good quality C.
Start with a 1nF ballpark for that L & R
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 19, 2023, 09:07:31 pm
The coil is a factory Bosch (diesel fuel injection) part from a Komatsu V12 diesel.. I'm using it on another application.. So I know that the hardware side of it is working and tested, but I have no clue as to the interface Bosch used in the ECU, and you know Bosch isn't going to help a guy out  :palm:

I had designed this originally to use the amplitude of the signal to determine position, and I'll still have that just for informational purposes (IE: make sure the oscillator is working within the correct amplitude range), and just added the binary divider.. I still have an input (through a diode) from the DAC to kick start the oscillator should it be necessary
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 19, 2023, 11:33:26 pm
I had a signal generator hooked up to it through a resistor and watched the peak wave amplitude on an oscilloscope and it was right around 60khz.. No additional capacitors on it... seeing the formula with the given values says 55khz it doesn't seem too far off

Don't know if it helps at all but I attached a couple pictures, the green circled copper square ring moves inward and outward over the green circled laminated center of the pickup coil
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 19, 2023, 11:39:01 pm
I had a signal generator hooked up to it through a resistor and watched the peak wave amplitude on an oscilloscope and it was right around 60khz..
How sharp is the peak, and how much does it move over the sense range ?
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 19, 2023, 11:45:48 pm
I didn't test all that and things are kinda boxed up right now, I'll dig it out in a month or so and do some more tests (I'm moving right now)
Title: Re: on-the-fly inductor resonance frequency finding
Post by: EugenioN on September 22, 2023, 12:34:39 pm
I'm particularly a fan of doing the I-Q (synchronous detector) method with an MCU, as it's pretty easy to do with a moderately fast ADC (for 60kHz, at least 240kSps is required; many MCUs offer this), and a bit of clever math.

Tim, do you have any resource I can study?
Google shows me lots of randomness, no exact match for this *very* specific task  :-//

Super thank you!
Title: Re: on-the-fly inductor resonance frequency finding
Post by: T3sl4co1l on September 22, 2023, 01:57:37 pm
Ah, you're looking for synchronous or quadrature detection.

Tim
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 23, 2023, 04:50:58 am
I think it's the max9226 (or 9227) that does quadrature encoding, though I think counting pulses with a divider is going to be the way to go.
I got the stuff out again last night (curiosity was killing me), and from my frequency generator I used a scope probe at 10x, then a 1x probe to the scope, without adding any capacitance, resonance was at 70-110 khz, and then I put a 450pF cap across it and it went from about 40-60khz.
Now I'll just have to see about creating a circuit that keeps the resonance going and if possible starts up on its own
Title: Re: on-the-fly inductor resonance frequency finding
Post by: moffy on September 23, 2023, 05:04:46 am
The article in Silicon Chip: https://www.siliconchip.com.au/Issue/2017/June/Arduino-based+Digital+Inductance+%2526+Capacitance+Meter (https://www.siliconchip.com.au/Issue/2017/June/Arduino-based+Digital+Inductance+%2526+Capacitance+Meter)   gives a simple circuit that works reasonably well for measuring L or C. The relevant formulas are provided, so all you need to do is measure the frequency. If you talk about measuring its frequency at 60kHz that sounds like self resonance, not really inductance though the self resonant frequency will change with inductance and can be calculated as long as the self resonant capacitance is constant and known. The method mentioned should work as long as the Q of the coil is relatively high but you would need to take into account the parasitic or total parallel capacitance also.

The circuit shown with the comparator in the Silicon Chip article will do just that. You can simplify it for your purposes and the micro is only for calculations and display.
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 23, 2023, 07:45:13 pm
…., resonance was at 70-110 khz, and then I put a 450pF cap across it and it went from about 40-60khz.
Now I'll just have to see about creating a circuit that keeps the resonance going and if possible starts up on its own
How high was the Q ?
Did you feed the generator through a high impedance, so as to not affect the true Q ?
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 24, 2023, 03:56:36 am
I'm not sure how to determine Q
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 24, 2023, 04:57:42 am
I'm not sure how to determine Q

Showing results for determine Q from frequency sweep:

The peak of the response is taken to be the resonant frequency, and then two markers are placed 3 dB down from the peak value. The peak frequency divided by the 3-dB width of the peak is then equal to the Q factor.


3db is 0.707 in voltage.
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 24, 2023, 03:35:55 pm
I've been reading up on it, not sure if with the equipment I have I can measure it.
What I can say is that it was pretty easy to find the resonant frequency +/- 500hz visually on the scope

I'll dig into what my hardware can do and try and find some actual numbers
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 24, 2023, 04:50:12 pm
Well, I fiddled and fiddled, got an FFT, but I can't get cursors on it, or zoom in/out to get a better view, so I did it manually, adjusting the frequency generator so I'd get 1V peaks at center resonance, then moving up/down in frequency until I had .700V peaks (within the capability of the scope's resolution)
Here's what I got

No parallel capacitor
no interference from the measuring ring:
Center F: 72khz,
3db range from 65 - 82khz
With full engagement of measuring ring
Center F: 110khz
3db range 100-122khz

With 330pF cap in parallel
no engagement
42khz, 3db from 38.8 to 46.8khz
full engagement
62khz, 3db from 58-75khz

with the additional cap in parallel the relative peak of supply voltage to peak voltage was considerably lower, I needed a 9v supply with the cap and only a 4.1V supply without it

Not really sure how to interpret this, but I hope you can enlighten me on it
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 24, 2023, 07:38:22 pm
with the additional cap in parallel the relative peak of supply voltage to peak voltage was considerably lower, I needed a 9v supply with the cap and only a 4.1V supply without it
So 4.1V peak, or 9V peak, gave 1V peak on the probe ?
What was the injection resistance you used for test ?

Not really sure how to interpret this, but I hope you can enlighten me on it

The calcs are simple for Q
Cp = internal + wiring
72/(82-65) = 4.24
110/(122-100) = 5

Cp=330pF
42/( 46.8-38.8 ) = 5.25
62/( 75-58 )  = 3.65

Not sure about the last one ? - you would expect the change in Q to be the same direction.

A conventional CMOS inverter oscillator as in 4060 etc, expects a lumped inductor and split caps, but that means your test case 1 is hard to make oscillate.
(http://www.learningaboutelectronics.com/images/Colpitts-oscillator.png)

You can use a different oscillator config, for a parallel resonant circuit, with no external caps  : some examples


(https://sub.allaboutcircuits.com/images/quiz/02671x01.png)

(https://www.indiabix.com/_files/images/electronics-circuits/emitter-coupled-lc-oscillator.png)

In the latter one, you would adjust the emitter resistor, starting much higher than their 100 ohms.
Addit: I'd suggest flip to PNP to allow a GND pin on the LrC osc and +ve supply, and the output swings appx +/- 700mV so it can AC couple into a 74HC4060 counter IP stage, with a feedback resistor.
A quick spice sim on a Q ~ 5 resonant circuit at ~55KHz shows > 3mA is need to start, and  at ~6mA, start time drops to under 1ms
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 24, 2023, 10:37:59 pm
With 330pF cap in parallel

Did you really mean 330pF, or was that 330nF ?  330pF is not consistent with your other reported  measurements.  ???
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 25, 2023, 05:20:01 pm
I did mean 330nF, this is an external cap and I was playing around with values, the 330nF dampened waaay too much and it was resonating around 10khz with very poor peaks, in the simulation, well, I have a 330pF shown there as working, and that would include the internal capacitance of the inductor as well.

Now I can't remember if I had a dedicated resistor in line or just my scope probe set to 10x (which I just measured to be 9M Ohm), but I may have used a 1M resistor as well

My circuit in Multisim spice looks to be a lot like the 2nd pic you posted.. I put a couple clamp diodes to be nice to the op amp.. I'm not too worried about actual component values at this point, they can be changed and tweaked, but the general architecture..
Also, can't remember who mentioned it but they were saying the LM324 was probably not going to do the job, do you have a part number of something that's more suited?  I was thinking an AD712 perhaps?  Only thing I can't figure out with certainty from the datasheet is if it'll work from a single 5V supply or it needs +/- 5V (or just say it, 10V).. I'd like to stay with a 5V supply https://www.analog.com/media/en/technical-documentation/data-sheets/AD712.pdf (https://www.analog.com/media/en/technical-documentation/data-sheets/AD712.pdf)  (100mA output, 3mhz, 1mV max offset voltage)
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 25, 2023, 07:26:23 pm
I just noticed something... I have two capacitance/inductance meters, a "bside ESR02 Pro" component tester and a "Holdpeak HP4070D".. both are saying this coil is about 40 MILLIHENRY and 25 ohm.. is that possible from such a tiny coil.. to me it sounds like off by a factor of 1000 and they're micro henry.. the ESR meter won't give me a capacitance on it, and I think the Holdpeak doesn't like the inductance, it measures the capacitance at -142 uF (yes, negative)

Anyhow, since I couldn't with certainty remember how I tested everything last time, I did it again, and I played around with series resistance and parallel capacitance to narrow the Q and bring the frequency down a bit.. bear in mind my parallel capacitance is considerably higher than the actual cap I have in there, between all the wires, probes, and coil capacitance...

So here's what I found looked like a good compromise between everything
100K ohm series resistor, 680pF parallel cap

I also used 1.0 Vrms to find my center frequency which made the math to find the center frequency which made the math to find the 3db points easy (1V peak)

with the slip ring disengaged
33.7khz center frequency, it took 11.41 V peak sine wave input to get a 1VRMS output
3db (1V peak) from 29.2 to 38.3 khz

With the slip ring fully engaged
56.1khz center frequency, it took 11.77V to get 1Vrms output
3db peak from 52.0 to 60.6 khz

With this setup the peak voltage alone is very sensitive to movement,  giving me both the frequency and amplitude options for measuring.  Also noticed the phase shift is very sensitive where the voltage drop is not, and vice versa, which may

Thank you for asking me questions that made me look up things I hadn't thought of (like Q and what affects it).. definitely learned and understood a lot more in the last couple days!

One thing I'm not sure of yet is which definition of Q to use, but it seems like the bandwidth at 3db?  Going by that my Q goes from about 3.7 to 8.6 from my above data  33.7/(38.3-29.2) = 3.7Q, 51.6/(60.6-52) = 8.6
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 25, 2023, 07:51:54 pm
Also, can't remember who mentioned it but they were saying the LM324 was probably not going to do the job, do you have a part number of something that's more suited? 
I was thinking an AD712 perhaps? 
Only thing I can't figure out with certainty from the datasheet is if it'll work from a single 5V supply or it needs +/- 5V (or just say it, 10V).. I'd like to stay with a 5V supply

These days you would select a RRIO (Rail to Rail Input Output) opamp, they are just easier to use especially at 5V.

The AD712 is very poor, it needs 9V min (+/-4.5V), and common mode is V- +4V ... V+ -2V : it cannot work near either supply.

You do need a decent slew rate and power bandwidth.
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 25, 2023, 07:53:08 pm
Quote
One thing I'm not sure of yet is which definition of Q to use, but it seems like the bandwidth at 3db?  Going by that my Q goes from about 3.7 to 8.6 from my above data  33.7/(38.3-29.2) = 3.7Q, 51.6/(60.6-52) = 8.6
Yes

I just noticed something... I have two capacitance/inductance meters, a "bside ESR02 Pro" component tester and a "Holdpeak HP4070D".. both are saying this coil is about 40 MILLIHENRY and 25 ohm.. is that possible from such a tiny coil..
Yes, small solenoids I have here, measure ~20mH
You can sanity check any measurements with a spice sweep.

Quote
100K ohm series resistor, 680pF parallel cap  33.7khz center frequency, it took 11.41 V peak sine wave input to get a 1VRMS output   3db (1V peak) from 29.2 to 38.3 khz

eg I start with your injection of 100k and 680pF and add 10pF extras, then adjust L until I get 33kHz ballpark gives 33mH for 33.4kHz ( and 11.5mH for 56.515kHz)
(your meters likely measure L at 1kHz)

I then adjust ESR up until Q drops to the right area.  75 Ohms is 34.7kHz  150 ohms is 34.93kHz etc  until ESR 1400 is -11.7dB and 29.32kHz ~ 38.362kHz
ie 33mH in series with 1400 ohms, parallel with 690pf simulates to match your peak and Q readings.

Modeled ESR here is much higher than your DC meter, because it includes the core losses, and is measured at the operating frequency.
You can load with a Equiv Series Resistance, or an Equivalent Parallel Resistance, EPR here is ~ 35k for same Q.
ie 33mH in parallel with 35k and 690pf simulates to match your peak and Q readings.

- however the injection loss here is a bit lower/better than your measurements indicate. I get a ratio of 0.26.

Can you check with a scope on both Gen and LCR point ? - Meters may not be RMS precise at 33kHz
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 25, 2023, 10:07:49 pm
I'm glad I got the Q calculation correct

I'll have to read and digest the middle part of your message a few times to hopefully get it

I was measuring RMS with a Fluke 8840 and the scope (Keysight 1052), they were pretty close (few percent)..

I'm trying to breadboard something together based on the 2nd example you posted yesterday and really not getting anything out of it.. I just see I overlooked the RC4558 that looks like it may be a good match, 3mhz, few mV offset, nanoAmp current, adn better than 20V/mV gain...  5V input capable, Much like a 741... https://www.ti.com/lit/ds/symlink/rc4558.pdf (https://www.ti.com/lit/ds/symlink/rc4558.pdf)
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 25, 2023, 11:45:49 pm
.. I just see I overlooked the RC4558 that looks like it may be a good match, 3mhz, few mV offset, nanoAmp current, adn better than 20V/mV gain...  5V input capable, Much like a 741...

Too much like a 741  8)
It is not rail to rail, and the min supply is too high.

maybe TLV9151 / TLV9152 ? or equivalents ?

I'm trying to breadboard something together based on the 2nd example you posted yesterday and really not getting anything out of it..
I like the PNP cross coupled oscillator, as it allows simple biasing and a grounded inductor.
based on the SIM equiv of 33mH//680pF//35k, Q~4, emitter injection current of ~ 22uA is 1v p-p sine - lower current down to 3.5uA takes longer to start and reduces the swing.
Higher than 22uA has excess current, and hits the ~ 1.2V clamping harder, and starts to drop the frequency.
You can easily add a PNP as a buffer/emitter follower, if you mounted this remote at the coil.

For an OpAmp, you would start with your test bench results.
ie 100k as the injection resistor (positive feedback side) and the negative feedback side needs a gain equivalent to more than your measured insertion loss.

That circuit is simplified and assumes split rail opamps. Single rail opamps would need a couple of bias resistors.
eg if you find you need a gain of >8, you can bias the coil side to Vcc/16, and the gain will give you mid rail DC operating point. No coupling caps needed

Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 26, 2023, 01:36:41 am
I'm trying to breadboard something together based on the 2nd example you posted yesterday and really not getting anything out of it..
I could not google-fu any single-rail grounded inductor oscillators, so here is one I quickly did. (No coupling caps needed)  8)

I picked the cheapest ADi RRIO opamp model, with a slew-rate in the right ballpark.  Similar to the TLV9151

Once working, sim shows the OpAmp needs to comfortably slew at least 33mH ~1.6V/us, 11.5mH ~ 2.9V/us to follow the sine during the not-clipped parts.
You need an opamp with a margin better than that, it can actually be In to V-, rather than RR in, but TI shows RR in as the lowest cost ones these days.  8)

It should have no polarity inversion/phase reversal, when the VP pin swings below the -ve rail. 

Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 26, 2023, 05:21:19 am
Is there something inherently bad about the DC decoupling cap method?

I'll look at getting some more op amps to play with

I've modified my model a little.. What is it about this that you don't like? seems really simple.  "works on paper" https://www.multisim.com/content/kgDr2u5EN3EuFNynVBr7fS/copy-of-resonant-frequency-by-counted-pulses/open/ (https://www.multisim.com/content/kgDr2u5EN3EuFNynVBr7fS/copy-of-resonant-frequency-by-counted-pulses/open/)
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 26, 2023, 05:43:10 am
Is there something inherently bad about the DC decoupling cap method?
Not inherently bad, it's another component, or more, on the BOM.

I've modified my model a little.. What is it about this that you don't like? seems really simple.  "works on paper" https://www.multisim.com/content/kgDr2u5EN3EuFNynVBr7fS/copy-of-resonant-frequency-by-counted-pulses/open/ (https://www.multisim.com/content/kgDr2u5EN3EuFNynVBr7fS/copy-of-resonant-frequency-by-counted-pulses/open/)

that looks to be using the old incorrect LC values ?
You also should include the loss resistance in any simulation.  Otherwise things are wildly optimistic.  8)

See my example, where I have both the DC resistance as series with L and the loss resistance done as parallel resistor.
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 26, 2023, 07:25:47 am
Oops, I didn't save what i had before I sent the link.. I had already updated it with the series/parallel resistances much like your schematic..
It's be resaved now
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 26, 2023, 08:00:11 pm
Oops, I didn't save what i had before I sent the link.. I had already updated it with the series/parallel resistances much like your schematic..
It's be resaved now
That looks to have a simplistic model.
With single supply, you need some way to ensure the DC operating point is not 'stuck at the rails' due to small offsets, or it will never start.

My 1Meg / 51k biases things to ~ 50% of supply.
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 27, 2023, 08:14:58 am
OK, that makes sense.

I'm not too concerned about the slew rate pulling the frequency away from the theoretical ideal, as long as it's kinda predictable/steady
Title: Re: on-the-fly inductor resonance frequency finding
Post by: PCB.Wiz on September 27, 2023, 08:58:44 pm
OK, that makes sense.

I'm not too concerned about the slew rate pulling the frequency away from the theoretical ideal, as long as it's kinda predictable/steady

You need to check with a scope that the lowest inductance end (11.5mH?) still at least manages a full swing, even if it is more a clipped triangle, than slow square wave.
Title: Re: on-the-fly inductor resonance frequency finding
Post by: Rx7man on September 29, 2023, 06:42:30 pm
With my upcoming move I'm going to have to put this on the back burner for a bit, and I'll work on just learning more in the meantime!
Thanks for all the help, making sure I know where i am on the dunning-kruger curve!  :phew: