Author Topic: Problem with LC oscillator circuit  (Read 5273 times)

0 Members and 1 Guest are viewing this topic.

Offline tatus1969Topic starter

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Problem with LC oscillator circuit
« on: January 27, 2017, 07:57:53 pm »
the circuit below is an inductive proximity sensor that I use in one of my projects. It works very well, but there is one unsolved problem, to which I didn't find a reliable solution that does not add much complexity.

The circuit works as follows:
L6 is a standard unshielded power inductor, metal in its vicinity mainly decreases its quality factor.
L6 and C49 form a resonant LC tank.
R51 senses the current through the LC tank.
IC12A is a zero-crossing detector (the chip can work with voltages at and below GND) and its output excites the LC tank.
The rest of the circuit forms a peak detector with filtering, the result goes to the ADC of a miro.

So far so good, once the circuit oscillates it works very well. But that is also the problem, it does not always start. When all voltages are zero during startup, IC12A has no reason to do anything at its output, and nothing is exciting the LC tank.

I have made a quick fix and bodged a 10MEG resistor across pins 3 and 8 of IC12. This raises the voltage above its hysteresis, and the comparator begins with a HIGH level at its output. That is enough to start oscillation. But I don't really like that solution - the design is meant for mass production.

There are many RF guys around here, maybe someone has a better idea?


We Are The Watt - Resistance Is Futile!
 

Offline tatus1969Topic starter

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: Problem with LC oscillator circuit
« Reply #1 on: February 01, 2017, 11:42:17 am »
hmm... Maybe it was a bad idea posting this over the weekend. Is there any of the many analog designers around here who can help me here? I'm quite stuck. I need a self-contained solution, hopefully using only passives, to realize a reliable startup. Thinking of some sort of additional feedback.
We Are The Watt - Resistance Is Futile!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Problem with LC oscillator circuit
« Reply #2 on: February 01, 2017, 12:21:38 pm »
You might find it a better idea to have a free-running oscillator drive the tank, rather than use the tank for self-oscillation.

This way it will always start up, though it won't always be right on resonance.  The frequency error can be sensed (using a phase locked loop), or this can be considered a feature rather than a bug (both loading and detuning will reduce the inductor's signal).

The second comparator is basically free for use, so this doesn't require a ton of additional components.  Replace the detector with a diode.

Note, by the way, the node between L and C has a high voltage (at resonance, it's about Q-factor * supply voltage), which can be used to make a very sensitive detector (as long as the detector itself doesn't reduce Q -- use a very high load resistance so the detector draws only little energy out of the tank).  That also saves you the loss of R51.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: tatus1969

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Problem with LC oscillator circuit
« Reply #3 on: February 01, 2017, 12:26:51 pm »
Starting an oscillator usually relies on some noise that is amplified and then causes the tank to oscillate. If you find a reliable way to introduce a high enough level of noise into the first comparators input, the circuit should start more reliable. Maybe remove C48 and make R46 larger
Safety devices hinder evolution
 
The following users thanked this post: tatus1969

Offline tatus1969Topic starter

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: Problem with LC oscillator circuit
« Reply #4 on: February 05, 2017, 08:29:23 pm »
You might find it a better idea to have a free-running oscillator drive the tank, rather than use the tank for self-oscillation.
This way it will always start up, though it won't always be right on resonance.  The frequency error can be sensed (using a phase locked loop)
I like that idea, but I have no idea how to realize that with just a spare comparator (if it is spare, see below). I would need a VCO, that comparator to digitize the LC tank phase, an XOR gate, and some passives to realize that. That would add a lot complexity/cost. Currently the [almost] solution is ~ 10x10mm without coil, and <3Euros.

this can be considered a feature rather than a bug (both loading and detuning will reduce the inductor's signal).
When thinking of an uncontrolled free-running RC oscillator, that will not work. Q is 80 in the circuit, so bandwidth is only 2kHz or 1.2%. Plus, the available change in amplitude from detecting metal is only ~ 10%, so I cannot allow for much detuning. I only observed marginal detuning effect at the chosen operating frequency, it is optimized for best eddy current sensitivity.

The second comparator is basically free for use, so this doesn't require a ton of additional components.  Replace the detector with a diode.
It was not there in the first design, but I experienced that I could not allow for the temperature dependency of a real diode.

Note, by the way, the node between L and C has a high voltage (at resonance, it's about Q-factor * supply voltage), which can be used to make a very sensitive detector (as long as the detector itself doesn't reduce Q -- use a very high load resistance so the detector draws only little energy out of the tank).  That also saves you the loss of R51.
R51 has three purposes:
- it measures the current through the LC tank (which is proportional to the L-C node voltage, so same sensitivity here). The peak voltage is around 1.5V, which is good for the following ADC (3.3V supplied, 12 bit).
- it allows IC12A to detect the current's zero crossing, and generate a perfect 180° drive signal.
- it dominates the DC resistance of L6, which greatly improves temperature stability.
« Last Edit: February 05, 2017, 08:37:58 pm by tatus1969 »
We Are The Watt - Resistance Is Futile!
 

Offline tatus1969Topic starter

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: Problem with LC oscillator circuit
« Reply #5 on: February 05, 2017, 08:33:06 pm »
Starting an oscillator usually relies on some noise that is amplified and then causes the tank to oscillate. If you find a reliable way to introduce a high enough level of noise into the first comparators input, the circuit should start more reliable. Maybe remove C48 and make R46 larger
I will definitely try that. The comparator will allow this because it has input bias/offset currents in nA range. Time for a revival of carbon film resistors? Needs to work reliably from -10°C to 80°C though.
We Are The Watt - Resistance Is Futile!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Problem with LC oscillator circuit
« Reply #6 on: February 06, 2017, 01:44:06 am »
I like that idea, but I have no idea how to realize that with just a spare comparator (if it is spare, see below). I would need a VCO, that comparator to digitize the LC tank phase, an XOR gate, and some passives to realize that. That would add a lot complexity/cost. Currently the [almost] solution is ~ 10x10mm without coil, and <3Euros.

Well, 4046s are at least a third of the footprint, and a tenth of the cost... ;)

Quote
When thinking of an uncontrolled free-running RC oscillator, that will not work. Q is 80 in the circuit, so bandwidth is only 2kHz or 1.2%. Plus, the available change in amplitude from detecting metal is only ~ 10%, so I cannot allow for much detuning. I only observed marginal detuning effect at the chosen operating frequency, it is optimized for best eddy current sensitivity.

So you're saying it's too sensitive?  Put more resistance on it! ;D

Quote
It was not there in the first design, but I experienced that I could not allow for the temperature dependency of a real diode.

Ahh.  Well, with a Q over 10, you can get plenty of voltage on the node (>50V!).  If you use a 74HC4046, the logic pin output resistance is around 50 ohms.  For L and C in series, 10mH and 100pF gives Fo = 159kHz and Zo = 10kohms.  With an ESR of 50 ohms, Q max is 200, not bad at all!  (If you measured Q = 80, then I'm guessing the inductor has 125 ohms ESR.  Unclear if that was including the comparator and sense resistor.)

With a PLL tracking resonance, you'll have all the signal in the world (up to 250V, apparently!), no worries on diode offsets.

The diodes are actually a rather difficult part, because to retain the same Q factor, the load needs to be over 1Mohm.  That's pretty high for a diode; and, needless to say, you can't use anything near that (i.e., at least 4Meg) for the voltage sense divider.

But also with so much signal, I doubt a PLL is really necessary.  It should be no trouble getting that to start, with any kind of oscillator design.  Going back to your original circuit: make sure it is astable, not bistable.  Change the negative feedback divider so it hunts around Vdd/2, and, maybe cap-couple (with just a few pF) the high voltage signal to the +in?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: tatus1969

Offline tatus1969Topic starter

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: Problem with LC oscillator circuit
« Reply #7 on: February 07, 2017, 02:22:25 pm »
Well, 4046s are at least a third of the footprint, and a tenth of the cost... ;)
That's maybe a bit "unfair", the 10x10 does already account for all the passives (0603). To the price point I agree.

So you're saying it's too sensitive?  Put more resistance on it! ;D
I'm not saying that the circuit is too sensitive (can there be such thing for a metal detector anyway?  ;)). It's the other way round. I need high initial Q to become sensitive to eddy currents. If Q would be low from the beginning, then external loading would have less effect. What I meant is that I think that a free-running oscillator would not fit the precision requirements.

Ahh.  Well, with a Q over 10, you can get plenty of voltage on the node (>50V!).  If you use a 74HC4046, the logic pin output resistance is around 50 ohms.  For L and C in series, 10mH and 100pF gives Fo = 159kHz and Zo = 10kohms.  With an ESR of 50 ohms, Q max is 200, not bad at all!  (If you measured Q = 80, then I'm guessing the inductor has 125 ohms ESR.  Unclear if that was including the comparator and sense resistor.)

With a PLL tracking resonance, you'll have all the signal in the world (up to 250V, apparently!), no worries on diode offsets.

The diodes are actually a rather difficult part, because to retain the same Q factor, the load needs to be over 1Mohm.  That's pretty high for a diode; and, needless to say, you can't use anything near that (i.e., at least 4Meg) for the voltage sense divider.
If I fail finding a simpler solution, then I'll probably go for the HC4046. When I calculated Q=80 in my last post, I included coil DCR and sense resistor, but forgot comparator output resistance, which is an additional ~ 35 ohms.

But also with so much signal, I doubt a PLL is really necessary.  It should be no trouble getting that to start, with any kind of oscillator design.  Going back to your original circuit: make sure it is astable, not bistable.  Change the negative feedback divider so it hunts around Vdd/2, and, maybe cap-couple (with just a few pF) the high voltage signal to the +in?
AC coupling won't do because there would still be a stable condition. But I think I have a solution.
« Last Edit: February 07, 2017, 07:17:45 pm by tatus1969 »
We Are The Watt - Resistance Is Futile!
 

Offline tatus1969Topic starter

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: Problem with LC oscillator circuit
« Reply #8 on: February 11, 2017, 11:24:29 am »
I think that I have found a good solution. This is an RC oscillator that utilizes the built-in hysteresis of the TLV3201, working in parallel to the LC oscillator. The only thing that I had to sacrifice was that nice GND referenced biasing. Now I have VCC/2 offset at the output, but as the ADC is working from the same 3.3V supply, it is working ratiometric and does not introduce an additional offset error.

I also had the chance to do some measurements yesterday. Frequency is as expected around 150kHz, but the effective Q is only 20 (peak voltage is ~ 45V), so I think the coil's ferrite core adds a lot of AC impedance. I think I should lower the working frequency a bit.

« Last Edit: February 11, 2017, 11:28:06 am by tatus1969 »
We Are The Watt - Resistance Is Futile!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf