# Blocking oscillator

A blocking oscillator (sometimes called a pulse oscillator) is a simple configuration of discrete electronic components which can produce a free-running signal, requiring only a resistor, a transformer, and one amplifying element such as a transistor or vacuum tube. The name is derived from the fact that the amplifying element is cut-off or "blocked" for most of the duty cycle, producing periodic pulses on the principle of a relaxation oscillator. The non-sinusoidal output is not suitable for use as a radio-frequency local oscillator, but it can serve as a timing generator, to power lights, LEDs, EL wire, or small neon indicators. If the output is used as an audio signal, the simple tones are also sufficient for applications such as alarms or a Morse code practice device. Some cameras use a blocking oscillator to strobe the flash prior to a shot to reduce the red-eye effect.
Due to the circuit's simplicity, it forms the basis for many of the learning projects in commercial electronic kits. The secondary winding of the transformer can be fed to a speaker, a lamp, or the windings of a relay. Instead of a resistor, a potentiometer placed in parallel with the timing capacitor permits the frequency to be adjusted freely, but at low resistances the transistor can be overdriven, and possibly damaged. The output signal will jump in amplitude and be greatly distorted.

## Circuit operation

The circuit works due to positive feedback through the transformer and involves two times—the time T$_{closed}$ when the switch is closed, and the time T$_{open}$ when the switch is open. The following abbreviations are used in the analysis:
* t, time, a variable
* T$_{closed}$: instant at the end of the closed cycle, beginning of open cycle. Also a measure of the time duration when the switch is closed.
* T$_{open}$: instant at the end of the open cycle, beginning of closed cycle. Same as T=0. Also a measure of the time duration when the switch is open.
* V$_b$, source voltage e.g. V$_{battery}$
* V$_p$, voltage across the primary winding. An ideal switch will present supply voltage V$_b$ across the primary, so in the ideal case V$_p$ = V$_b$.
* V$_s$, voltage across the secondary winding
* V$_z$, fixed load voltage caused by e.g. by the reverse voltage of a Zener diode or the forward voltage of a light-emitting diode (LED).
* I$_m$, magnetizing current in the primary
* I$_{peak,m}$, maximum or "peak" magnetizing current in the primary. Occurs immediately before T$_{open}$.
* N$_p$, number of primary turns
* N$_s$, number of secondary turns
* N, the turns ratio defined as N$_s$/N$_p$, . For an ideal transformer operating under ideal conditions, I$_s$ = I$_p$/N, V$_s$ = N×V$_p$.
* L$_p$, primary (self-)inductance, a value determined by the number of primary turns N$_p$ squared, and an "inductance factor" A$_L$. Self-inductance is often written as L$_p$ = A$_L$×N$_p$$^2$×10$^{−9}$ henries.
* R, combined switch and primary resistance
* U$_p$, energy stored in the flux of the magnetic field in the windings, as represented by the magnetizing current I$_m$.
A more-detailed analysis would require the following:
* M = mutual inductance, its value determined by degree to which the magnetic field created by the primary couples to (is shared by) the secondary, and vice versa. coupling. Coupling is never perfect; there is always so-called primary and secondary "leakage flux". Usually calculated from short-circuit secondary and short-circuited primary measurements.
** L$_{p,leak}$ = self-inductance that represents the magnetic field created by, and coupled to the primary windings only
** L$_{s,leak}$ = self-inductance that represents the magnetic field created by, and coupled to the secondary windings only
* C$_{windings}$ = interwinding capacitance. Values exist for the primary turns only, the secondary turns only, and the primary-to-secondary windings. Usually combined into a single value.

### Operation during T$_{closed}$ (time when the switch is closed)

When the switch (transistor, vacuum tube) closes it places the source voltage V$_b$ across the transformer primary. The magnetizing current I$_m$ of the transformer is I$_m$ = V$_{primary}$×t/L$_p$; here t (time) is a variable that starts at 0. This magnetizing current I$_m$ will "ride upon" any reflected secondary current I$_s$ that flows into a secondary load (e.g. into the control terminal of the switch; reflected secondary current in primary = I$_s$/N). The changing primary current causes a changing magnetic field ("flux") through the transformer's windings; this changing field induces a (relatively) steady secondary voltage V$_s$ = N×V$_b$. In some designs (as shown in the diagrams) the secondary voltage V$_s$ adds to the source voltage V$_b$; in this case because the voltage across the primary (during the time the switch is closed) is approximately V$_b$, V$_s$ = (N+1)×V$_b$. Alternately the switch may get some of its control voltage or current directly from V$_b$ and the rest from the induced V$_s$. Thus the switch-control voltage or current is "in phase" meaning that it keeps the switch closed, and it (via the switch) maintains the source voltage across the primary.
In the case when there is little or no primary resistance and little or no switch resistance, the increase of the magnetizing current I$_m$ is a "linear ramp" defined by the formula in the first paragraph. In the case when there is significant primary resistance or switch resistance or both (total resistance R, e.g. primary-coil resistance plus a resistor in the emitter, FET channel resistance), the L$_p$/R time constant causes the magnetizing current to be a rising curve with continually decreasing slope. In either case the magnetizing current I$_m$ will come to dominate the total primary (and switch) current I$_p$. Without a limiter it would increase forever. However, in the first case (low resistance), the switch will eventually be unable to "support" more current meaning that its effective resistance increases so much that the voltage drop across the switch equals the supply voltage; in this condition the switch is said to be "saturated" (e.g. this is determined by a transistor's gain h$_{fe}$ or "beta"). In the second case (e.g. primary and/or emitter resistance dominant) the (decreasing) slope of the current decreases to a point such that the induced voltage into the secondary is no longer adequate to keep the switch closed. In a third case, the magnetic "core" material saturates, meaning it cannot support further increases in its magnetic field; in this condition induction from primary to secondary fails. In all cases, the rate of rise of the primary magnetizing current (and hence the flux), or the rate-of-rise of the flux directly in the case of saturated core material, drops to zero (or close to zero). In the first two cases, although primary current continues to flow, it approaches a steady value equal to the supply voltage V$_b$ divided by the total resistance R in the primary circuit. In this current-limited condition the transformer's flux will be steady. Only changing flux causes induction of voltage into the secondary, so a steady flux represents a failure of induction. The secondary voltage drops to zero. The switch opens.

### Operation during T$_{open}$ (time when the switch is open)

Now that the switch has opened at T$_{open}$, the magnetizing current in the primary is I$_{peak,m}$ = V$_p$×T$_{closed}$/L$_p$, and the energy U$_p$ is stored in this "magnetizing" field as created by I$_{peak,m}$ (energy U$_m$ = 1/2×L$_p$×I$_{peak,m}$$^2$). But now there is no primary voltage (V$_b$) to sustain further increases in the magnetic field, or even a steady-state field, the switch being opened and thereby removing the primary voltage. The magnetic field (flux) begins to collapse, and the collapse forces energy back into the circuit by inducing current and voltage into the primary turns, the secondary turns, or both. Induction into the primary will be via the primary turns through which all the flux passes (represented by primary inductance L$_p$); the collapsing flux creates primary voltage that forces current to continue to flow either out of the primary toward the (now-open) switch or into a primary load such as an LED or a Zener diode, etc. Induction into the secondary will be via the secondary turns through which the mutual (linked) flux passes; this induction causes voltage to appear at the secondary, and if this voltage is not blocked (e.g. by a diode or by the very high impedance of a FET gate), secondary current will flow into the secondary circuit (but in the opposite direction). In any case, if there are no components to absorb the current, the voltage at the switch rises very fast. Without a primary load or in the case of very limited secondary current the voltage will be limited only by the distributed capacitances of the windings (the so-called interwinding capacitance), and it can destroy the switch. When only interwinding capacitance and a tiny secondary load is present to absorb the energy, very high-frequency oscillations occur, and these "parasitic oscillations" represent a possible source of electromagnetic interference.
The potential of the secondary voltage now flips to negative in the following manner. The collapsing flux induces primary current to flow out of the primary toward the now-open switch i.e. to flow in the same direction it was flowing when the switch was closed. For current to flow out of the switch-end of the primary, the primary voltage at the switch end must be positive relative to its other end that is at the supply voltage V$_b$. But this represents a primary voltage opposite in polarity to what it was during the time when the switch was closed: during T$_{closed}$, the switch-end of the primary was approximately zero and therefore negative relative to the supply end; now during T$_{open}$ it has become positive relative to V$_b$.
Because of the transformer's "winding sense" (direction of its windings), the voltage that appears at the secondary must now be negative. A negative control voltage will maintain the switch (e.g. NPN bipolar transistor or N-channel FET) open, and this situation will persist until the energy of the collapsing flux has been absorbed (by something). When the absorber is in the primary circuit, e.g. a Zener diode (or LED) with voltage V$_z$ connected "backwards" across the primary windings, the current waveshape is a triangle with the time t$_{open}$ determined by the formula I$_p$ = I$_{peak,m}$ - V$_z$×T$_{open}$/L$_p$, here I$_{peak,m}$ being the primary current at the time the switch opens. When the absorber is a capacitor the voltage and current waveshapes are a 1/2 cycle sinewave, and if the absorber is a capacitor plus resistor the waveshapes are a 1/2 cycle damped sinewave.
When at last the energy discharge is complete, the control circuit becomes "unblocked". Control voltage (or current) to the switch is now free to "flow" into the control input and close the switch. This is easier to see when a capacitor "commutates" the control voltage or current; the ringing oscillation carries the control voltage or current from negative (switch open) through 0 to positive (switch closed).

### Repetition rate 1/(T$_{closed}$ + T$_{open}$)

In the simplest case, the duration of the total cycle (T$_{closed}$ + T$_{open}$), and hence its repetition rate (the reciprocal of the cycle duration), is almost wholly dependent on the transformer's magnetizing inductance L$_p$, the supply voltage, and the load voltage V$_z$. When a capacitor and resistor are used to absorb the energy, the repetition rate is dependent on the R-C time-constant, or the L-C time constant when R is small or non-existent (L can be L$_p$, L$_s$ or L$_{p,s}$).

## Patents

* US Patent 2211852, filed in 1937, "Blocking oscillator apparatus". (based around a vacuum tube).
* US Patent 2745012, filed in 1951, "Transistor blocking oscillators".
* US Patent 2780767, filed in 1955, "Circuit arrangement for converting a low voltage into a high direct voltage".
* US Patent 2881380, filed in 1956, "Voltage converter".