Oscillators such as a Wein-bridge sinusoid or a square wave Schmitt trigger oscillator. Is it possible to bias these so they oscillate above 0V?
Electronic – Can oscillators be made from a single supply
Relaxation oscillators are prone to such behavior because
- When they are very near the threshold, it only takes a very slight disturbance to push them over 'sooner' than they should go
- When a relaxation oscillator hits its threshold, it's apt to generate a disturbance on the power supply.
Three ways of avoiding this problem are to use a resonant oscillator design, do a better job of isolating the oscillators and their power supplies, or use a slightly modified relaxation oscillator which subtracts a fixed amount of charge from its storage cap each time it trips, rather than discharging the cap to a fixed level, so that even if it trips "early" on one cycle, it will compensate by taking longer to trip on the next cycle. Note that the latter approach won't entirely avoid phase jitter when oscillators' phases pass near each other, but it will greatly reduce the "locking" effect.
I don't have a practical design handy, but consider the following main circuit with a constant current source, two caps (for discussion, assume they're equal), two NPN transistors with base resistors (for discussion, assume trivial base-emitter current is required to turn them on), and some control circuitry:
- The cathodes of C1 and C2, and the emitter of Q2, are grounded.
- The anode of C1 is connected to a positive constant-current source and the collector of Q1, and also feeds into the control circuitry.
- The anode of C2 is connected to the emitter of Q1 and the collector of Q2. The emitter of Q2 is connected to ground.
- The bases of Q1 and Q2 are connected via resistors to separate outputs from the control logic.
Behavior should be as follows:
- Reset the circuit by turning on both Q1 and Q2, so both caps start out discharged.
- During the first part of each cycle, Q1 should be off; Q2 may start out on, but should switch off sometime before the next step; C1 will charge through the constant current source, while C2 will sit at zero.
- Once C1 reaches a certain threshold, which should be at least twice the voltage level output by the control logic, Q1 should switch on. This will transfer an amount of charge from C1 to C2 equal to the emitter voltage on Q1 (i.e. the voltage from the control circuitry, minus 0.7 volts), times the capacitance. If C1 and C2 are equal, this will drop the voltage on C1 an amount equal to that emitter voltage.
- Sometime after C2 has reached its equilibrium voltage, but before C1 reaches the threshold again, Q1 should switch off and Q2 switch on.
- Repeat the cycle, switching Q2 off sometime after C2 has been discharged.
- If turning on Q1 for awhile doesn't push C1's voltage below the threshold, then the circuit should be reset (by turning on Q2 while Q1 is still on). Unless the transistors take too long to charge or discharge C2, or the control circuit forces overly-slow timings on them, this should never happen.
Note that in this circuit, it won't matter how long Q1 and Q2 are switched on each cycle provided they're switched on long enough for C2 to reach its equilibrium state. The only path for charge to flow into C1 is the constant current source, and the only way for current to flow out is by filling up C2. The only path for current to flow into C2 is from C1 (assume transistor BE current is trivial), so each time C2 is charged and discharged it will take a fixed amount of energy from C1. The net effect is that the overall average oscillation rate will be the number of amps into C1, divided by the number of coulombs dumped each cycle in C2, independent of the threshold voltage for C1 or the durations that Q1 and Q2 are switched on.
Try this circuit.
The upper-left op amp and one capacitor form a charge accumulator. The other cap and mosfets form a charge dumper which will dump a fixed amount of charge each time the mosfets are cycled with non-overlapping signal. The bottom center is a control circuit which will generate discharge cycles if there's too much charge on the cap. I have outputs showing the generated pulses, generated pulse/2, and generated pulse/16, along with 100Hz and divided-down reference waves for comparison.
Note that you may adjust the threshold voltage for the comparator; this will vary the phase of the output, and with the slider values I've provided may delay it by up to 16 cycles. Note, however, that when the slider is returned to the right (+2 volts) the wave will return to being essentially in phase with the original, and will count at up to 1/4 of the 673Hz (value chosen arbitrarily, but must be at least 4x count rate) signal until it has "caught" up.
The oscillation frequency is determined solely by the charge current, the anode voltage of that cap which is held by the left op amp, and the size of the dumping cap. You may find it interesting to play around with the size of the accumulating cap; it will affect phase, but not frequency. The simulated oscillator speed isn't quite precise, but it's pretty close. The notable thing is that one can move the threshold slider around to try to jinx the oscillator, but it will not only get back to being in the correct phase relationship with where it should have been but the count/16 output will show the correct phase as well.
If the gain of a system at every particular delay is constant, the system will produce oscillations with those periods which have a gain of one. At periods where the gain exceeds one, the strength of the oscillations will grow unless or until something causes the gain falls to below one. If there were one frequency where the gain stabilized at exactly one, and it were less than one at all other frequencies, the circuit would produce a sine wave at the frequency in question. The wave would be a sine wave because any other type of wave would have content at frequencies where the gain is less than one.
Note that in practice, many types of oscillating circuits have gains which vary widely during the course of each "cycle". Such variations make it very difficult to predict analytically the frequency content of their output. Because there is a very fine line between having oscillations die down to nothing, and having oscillations grow without bound, even circuits which are intended to produce sine waves generally end up having a gain which is sometimes greater than 1 and sometimes less than one, though ideally there's a gain control mechanism that will try to settle on the right value.
Incidentally, some circuits use incandescent light bulbs for that purpose, since their resistance varies with temperature. If the power fed to a light bulb is proportional to the strength of an oscillator's signal, and if an increase in resistance will cause a reduction in gain, then the light bulb's temperature will tend to reach an equilibrium where the gain is 1. If the frequency in question is fast enough, the light bulb will only heat up or cool down a little bit during each cycle, allowing reasonably-clean sine waves to be generated.
Rather than using the term "constant gain", it may be more helpful to use the term "linear circuit". To borrow an analogy from a magazine I read some years back, comparing "linear circuits" to "non-linear circuits" is like comparing "kangaroo biology" to "non-kangaroo biology"; linear circuits are a particular subcategory of circuits, and non-linear circuits are everything else.
A one-input one-output linear black box is one which takes an input signal and produces an output signal, with the characteristic that if F(x) represents the signal produced by the box when it is fed signal x, and if A and B are two input signals, then F(A+B) will equal F(A)+F(B). There are many kinds of things a linear black box can do to a signal, but all must obey the above criterion. The output produced by a linear black box when given a combination of many different frequency signals will be the sum of the outputs that would be produced for each frequency in isolation.
The behavior of many practical circuits is close to that of a one-input one-output linear black box. Since any wave other than a sine wave is a combination of sine waves at multiple frequencies, for a circuit to oscillate with anything other than a sine wave, there must be multiple frequencies which, if fed in individually, would cause the output to precisely match the input in phase and amplitude. While it is certainly possible to construct such circuits, most practical circuits will only have one frequency where such behavior will occur.
- How LC oscillators work with a continous DC power supply
- Electronic – Goral Oscillators
- Electronic – Kickstarting an opamp for oscillating
- Electronic – Why is this BJT Schmitt trigger producing a sine wave
- Electronic – More Fun with the CD4093 IC as Schmitt Trigger Oscillator. Any practical difference between circuit version with “Enable” pin and Without
Creating a single-supply version of a dual-supply circuit is fairly trivial - the key is to generate a pseudo-ground. Take a dual-supply oscillator of your choice. Replace the positive supply with one with twice the amplitude. Instead of a negative supply, ground these points. Now, create a pseudo ground by making a voltage divider with 2 equal resistors of, let's say, 1k to 10k. Buffer the output of the divider with an opamp follower. All of the ground connections of the original circuit get connected to this opamp, and you should be in business.
The buffer amp should be faster than the other opamps, and it should have a fairly high current capability, but other than that it's a straightforward proposition.
Note that the new oscillator output is referenced to pseudo-ground, rather than ground, and the amount of noise and distortion present if you reference it to ground will depend entirely on your ability to generate a clean, stable pseudoground. With this in mind, the lower leg of the voltage divider may profitably be replaced with a zener, or the entire divider with a good voltage reference. The reference does not have to be exactly half the positive supply voltage, but doing this will maximize the voltage swing you can get for the AC value of the oscillator.