# Gas station without pumps

## 2013 June 23

### Colpitts LC oscillator

Filed under: home school — gasstationwithoutpumps @ 19:07
Tags: , , ,

I wanted to try a different way of estimating the inductance of the large coil that we used for the L/R time constant lab.  In that lab, we had fitted an exponential to the current curve after a step change in the voltage, and gotten an estimate of L=0.41H, with a series resistance of 78.5Ω, but the resistance measurement was not quite compatible with the DC resistance measurement of 69.71Ω.  (The DC measurements are different each time I report them, because I’m using different connection wires, and the flexible breadboard wires have significant resistance.  With the connection wire resistance removed, the DC resistance of the coil is about 68.82Ω.)

Op-amp-based LC oscillator using the Colpitts oscillator design.

I expected the oscillator to oscillate at the frequency of the LC tank, when the gain was set high enough to meet the Barkhausen stability criterion, that the loop gain be one and the phase shift be 0 (or an integer multiple of 2π).

The frequency of oscillation should be determined by $(2 \pi f)^2 = \frac{1}{LC}$,

I built the circuit with two different inductors, one the AIUR-06-221 inductor, which from the spec sheet has an inductance of 220µH and a series resistance of 0.252Ω, the other the large unknown inductor.

• With the 220µH AIUR-06-221 inductor and the 2 4.7µF capacitors in series, the resonant frequency should be 7kHz. What I actually measured for the oscillator was 9024Hz (with R3 at 1kΩ, not 3.9kΩ), which is way off from what I expected.  The gain needed from the inverting amplifier was –16.6, so the tank feedback circuit had a loss of about 24.4dB. The frequency is dependent on the gain setting: with the gain set so high that the output was very clipped, the frequency was around 8881Hz, while with the gain set barely high enough to get oscillation, the frequency was 9080Hz.
• With the large inductor, I measured 229±2Hz, with R3=3.9kΩ and a gain of about –15.6 (23.9dB).  Scaling the known inductance of the 220µH inductor by the square of the frequency ratio implies that the large inductor is about 0.34H (not 0.41H).

I don’t understand why the frequencies are so far off from what I expected. I don’t see how to analyze the circuit to get the observed frequency—the phase shift of the feedback network is not particularly dependent on the gain of the amplifier, even if I include the input impedance of the amplifier in the analysis.  The op amp spec sheet makes a big deal about the phase not shifting even when the output is clipped, and I’m definitely observing a 180˚ phase shift in the feedback network at the oscillator frequency.  Perhaps I need to remove the tank circuit from the oscillator, and drive it with an external sine wave, to see how the phase shift varies with frequency, and compare that to my calculations using gnuplot.

I tried putting a sine wave into the 1kΩ resistor plus LC tank, and measuring the sine wave.  I used the Bitscope USB oscilloscope both to produce the sine wave and to observe it.  By using the XY plot and tweaking the frequency, I found a 180˚ phase shift at 9020Hz, which is consistent with how the oscillator behaved at moderate gains.  With the large inductor, I get the 180˚ phase shift around 225Hz, again fairly consistent with the behavior of the oscillator.  I confirmed that this was not an artifact of the Bitscope by observing the same signals on my Kikusui Cos5060 analog scope.   The frequency at which the phase shift was 180˚ varied slightly at different times (possibly temperature dependent?)—for the 220µH inductor, it was 9kHz±30Hz.

When I use an external oscillator, I see the 180˚ phase shift and peak in the output amplitude at 12.7kHz, not at 9kHz.    Now I’m even more confused.

One possible cause of confusion is that my external oscillator has a large DC offset.  When I add a 220µF DC-blocking capacitor, the resonance is around 8.6–8.8kHz, almost consistent with the oscillator behavior.  But when I use the DC blocking capacitor to decouple the Bitscope sine wave source, I  get the resonance initially at 7.6kHz, gradually rising to 8.4kHz.  If I use the external oscillator with the DC-blocking capacitor, but briefly short the inductor to rezero the big capacitor, I again get a resonance around 8.4kHz.

Would adding a DC component to the signal change the inductance of a ferrite-core inductor? I suspect so, due to changes in the distribution of magnetic domains in the ferrite—but that much??  The 220µH inductor would have to behave like a 150µH inductor to get the observed frequencies, unless all my thinking is messed up.  I’m now trying to think up a way I could test this: perhaps providing an adjustable DC bias to the tank circuit and measuring the inductance by change in the resonant frequency?  I think I’ll post this as is and hope for another post later.

Note: the CircuitlLab schematics now come with a “Thanks for using the free edition …” chunk of text at the bottom. I could have cut this off easily enough, but see no harm in advertising their service, which I’ve been using for about a year.  I had been wondering how they were going to monetize the service, but now I know—the free service now puts up obnoxious “please upgrade” messages every few minutes and blocks you from doing further work for a minute.  Their why-upgrade? page explains:

CircuitLab has been our primary project over the past two years, and we’ve been honored to deliver our user-friendly and high quality product without charge over this time. We are so excited to be able to offer you this continually improving software for a small monthly fee. Though we know this may take some of our loyal users as a surprise, we look forward to your continued support as we develop CircuitLab into everything we’ve always imagined it could be!

While I would not mind buying the circuit lab software, I’ve never been fond of the “small monthly fee” model, especially as their “small fee” is $5 a month for Hacker Lite, the equivalent of their old free service with no commercial use allowed, up to$100 a month for the “Platinum Service”, which includes commercial use, beta testing of new features, and priority support.  Given that I’ve had very few circuits that were actually simulatable with their simulator (they don’t handle oscillators well and their op amp models have stability problems), and they don’t have all the parts I need (they don’t have Schmitt triggers, instrumentation amps, or phototransistors; their  microphones are non-simulatable; and they don’t have parameters for the MCP6002 op amps I use), it isn’t clear to me that the schematic editor alone is worth $5/month or$49/year.  I may be looking for another schematic capture system (the Eagle schematics are too ugly to be a viable alternative).  I wonder if CircuitLab has any way to get the schematics out of their system into some other schematic representation (or vice versa).  Having a closed system was ok as long as it was free, but I would not want to invest money as well as time in something that I could not use on my own later. I already have 105 circuits in their system, and it would be nice to be able to have a backup copy on my own machine.

1. I looked up the specs for the AIUR-06-221 inductor and saw that they spec a 10% drop in inductance at 1.9A (the saturation current). I’m estimating that the current at 9kHz is at most 0.2A, and the DC current close to 0A, so I should not be seeing saturation effects. I’ll try measuring the AC and DC currents to make sure I did not drop a decimal point somewhere. (They did their measurements for the data sheet at 1kHZ and 0.1V rms, so I suppose there could be a frequency-dependent change in inductance also. I’ll have to figure out a way to measure that. Perhaps a simple voltage measurement across the inductor and across a series resistor will do, as I did for modeling the loudspeaker.)

Comment by gasstationwithoutpumps — 2013 June 24 @ 12:02

2. […] decided to measure the two inductors that were confusing me in Colpitts LC oscillator, using the same method I’ve used before to model loudspeakers, that is, applying a known […]

Pingback by Fitting L and R values | Gas station without pumps — 2013 June 24 @ 23:54

3. […] then made a tank circuit like the one in the Colpitts oscillator, with the AIUR-06-221 inductor in parallel with a pair of the (nominally) 4.7µF capacitors in […]

Pingback by LC resonance | Gas station without pumps — 2013 June 25 @ 20:17

4. […] think I now understand why my Colpitts oscillator oscillated at a different frequency than I expected, and why the 4.7µF capacitor appeared to be a […]

Pingback by Capacitance depends on DC bias in ceramic capacitors | Gas station without pumps — 2013 June 26 @ 06:56

5. […] figured out that DC bias changes capacitance of ceramic capacitors enormously, I managed to get a Colpitts oscillator to work. I should be able to use the frequencies of oscillation with the small inductor and with […]

Pingback by Inductance of large inductor summarized | Gas station without pumps — 2013 June 27 @ 11:26

Create a free website or blog at WordPress.com.