Electronics Experiments: Adjustable Duty-Cycle Oscillator
In contrast, the circuit shown in Figure 1 can be built with a single IC, two capacitors, three resistors, two trim-pots, and a diode. The component values and time-constants are not critical. And with this simple circuit, here is what you can demonstrate:
Figure 1
Of course, with such a simple circuit you would expect that there was some kind of trade-off. And you're right: this circuit changes frequency as you change duty-cycle. But even with that limitation, you can still demonstrate all the items listed above. And you can use this circuit as a lead-in to a follow-up experiment with a circuit that maintains constant frequency as you vary duty-cycle.
The key to the circuit is the CD4093 CMOS digital IC. It's a quad two-input NAND gate chip with Schmitt-trigger inputs. In an inverting configuration, driving the inputs high will force the output low, while driving the inputs low will force the output high. The value of the input voltage that causes the output to change is the switching-threshold. The switching-threshold on a Schmitt-trigger input is not fixed; it has one of two different values depending on whether the output is high or low. In the 4093, the input voltage to force the output low is higher than the input voltage that forces the output high (see Figure 2). The result is a hysteresis effect.
Figure 2
We all have experience with the property of hysteresis. It can be seen in an old-fashion oil-can, the kind with a long flexible spout on a semi-spherical can with a wide, flat bottom. You pick the can up with one hand: the spout between your fingers and your thumb on the bottom. As you press on the bottom of the can, nothing happens until there is enough pressure to "pop" the bottom in and a squirt of oil comes out. As you release the pressure, the bottom will "pop" back out at less pressure than it took to "pop" it in.
The way hysteresis leads to oscillation can be seen in an automobile with a loose "front end". As you turn the steering wheel, nothing happens at first. Then, at a certain point, the car will turn. As you turn the wheel back to "straighten out", again nothing happens until you get to a point where the car suddenly swerves the other way. The result is that, as you travel down the road, the car is swerving left and right. You can't get it to go in a straight line. In effect, you're oscillating.
In this circuit, let's assume that C1 is discharged, making the input of the IC low and causing its output to go high. The voltage on the high output is fed back to the input through R1, R2, D1 and R3. The resistors limit the current, so C1 charges up with a certain time-constant. When the Voltage on C1 reaches a certain point, call it V1, it will be high enough to force the output low. At that point C1 will start to discharge through R3 only, since D1 will be reverse-biased. When the Voltage on C1 drops to a certain point, call it V2, it will be low enough to force the output high again. The cycle then repeats, and we have made a square-wave oscillator. Note that it is necessary that V1 be a higher value than V2 so that there is a fixed amount of Voltage that C1 must charge and discharge to produce a cycle. Then by changing the resistance, the time needed to charge and discharge (and thereby the frequency) can be changed.
The square-wave output can be seen by placing the probe of a oscilloscope at output 'A'. We will define the "on-time" of the cycle to be when the output is high, and the "off-time" when the output is low. Duty-cycle is defined to be:
On-Time Duty-Cycle = ----------------- On-Time = Off-Time
Since C1 discharges through R3 only, the "off-time" of the cycle is fixed. But C1 charges partly through the R1-R2 path, so adjusting the R2 trim-pot will vary the "on-time" and thereby vary the duty-cycle. Since the square-wave output goes from 0 to +12 Volts and back to 0, it can be thought of as an AC signal riding on top of a DC voltage. The value of the DC can determined from the duty-cycle by the relationship:
DC Voltage = (Duty-Cycle) x (High-Output Voltage)
where, in this case, the high-output voltage is 12 Volts. The square-wave output is fed through an R-C low-pass filter made up of R4, R5, and C2. The purpose of the filter is to "smooth-out" (or "integrate") the square-wave. In effect, it removes the AC signal and leaves only the DC Voltage on C2. the filtered voltage can be seen on output 'B'. Just how "smooth" the DC will appear (i.e. how much AC "ripple" will be seen) depends on the RC time-constant of the filter. The "cut-off" frequency (f0) of the filter is given by:
1 f0 = ----- 2pRC
Define N to be the ratio of the oscillator frequency (f) to f0 as follows: N=f/f0. Then the bigger N is, the smoother the DC will be, as will be seen by adjusting the R5 trim-pot. One note about using CMOS gates: don't leave any inputs "floating". Be sure to ground all unused inputs on the CD4093 chip.
So have some fun with this circuit. Play around with it and try different values for the resistors and capacitors. Try reversing the direction of D1 and see what happens. And see if you can think of some interesting applications for it. Maybe you can get it published in this newsletter.
C1 0.1 uF Capacitor C2 10 uF Capacitor D1 1N914 Diode IC CD4093 R1, R4 1K Ohm 1/4 Watt Resistor R2, R5 100K Ohm Potentiometer (STC) R3 100K Ohm 1/4 Watt Resistor
This kit may be purchased from R.S.R. Electronics for $1.50! To purchase this kit, please call Jack at 732-381-8777 or 800-972-2225, FAX 732-381-1572 and ask for the "Duty Cycle PK".
Minimum Order 10 Kits
Copyright © 1996-2002 Electronix Express
A Division of R.S.R. Electronics, Inc.
365 Blair Road
Avenel, New Jersey 07001
Phone 1-800-972-2225 (In NJ 1-732-381-8020)
Fax 1-732-381-1006; 1-732-381-1572
Last Modified November 10, 1998