Problem with LC oscillator circuit - Page 1
Forum section: electronics / general

author: tatus1969
author_rank: Super Contributor
timestamp: January 27, 2017, 07:57:53 pm
content: 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?

author: tatus1969
author_rank: Super Contributor
timestamp: February 01, 2017, 11:42:17 am
content: 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 01, 2017, 12:21:38 pm
content: 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

author: capt bullshot
author_rank: Super Contributor
timestamp: February 01, 2017, 12:26:51 pm
content: 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

author: tatus1969
author_rank: Super Contributor
timestamp: February 05, 2017, 08:29:23 pm
content: Quote from: T3sl4co1l on February 01, 2017, 12:21:38 pmI 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  solution is ~ 10x10mm without coil, and <3Euros.Quote from: T3sl4co1l on February 01, 2017, 12:21:38 pmWhen 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.Quote from: T3sl4co1l on February 01, 2017, 12:21:38 pmIt was not there in the first design, but I experienced that I could not allow for the temperature dependency of a real diode.Quote from: T3sl4co1l on February 01, 2017, 12:21:38 pmR51 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.

author: tatus1969
author_rank: Super Contributor
timestamp: February 05, 2017, 08:33:06 pm
content: Quote from: capt bullshot on February 01, 2017, 12:26:51 pmI 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 06, 2017, 01:44:06 am
content: Quote from: tatus1969 on February 05, 2017, 08:29:23 pmWell, 4046s are at least a third of the footprint, and a tenth of the cost...QuoteSo you're saying it's too sensitive? Put more resistance on it!QuoteAhh. 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

author: tatus1969
author_rank: Super Contributor
timestamp: February 07, 2017, 02:22:25 pm
content: Quote from: T3sl4co1l on February 06, 2017, 01:44:06 amThat's maybe a bit "unfair", the 10x10 does already account for all the passives (0603). To the price point I agree.Quote from: T3sl4co1l on February 06, 2017, 01:44:06 amI'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.Quote from: T3sl4co1l on February 06, 2017, 01:44:06 amIf 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.Quote from: T3sl4co1l on February 06, 2017, 01:44:06 amAC coupling won't do because there would still be a stable condition. But I think I have a solution.

author: tatus1969
author_rank: Super Contributor
timestamp: February 11, 2017, 11:24:29 am
content: 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.