Controlling electrical power through a load by means of quickly switching it on and off, and varying the on-time, is known as pulse-width modulation (PWM). PWM is a very efficient means of controlling electrical power because the controlling element (a power transistor) dissipates comparatively little power in switching on and off, especially if compared to the wasted power dissipated by a rheostat in a similar situation.
In this project, you will build the PWM modulation circuit shown in Figure 1.
The PWM signal generator of Figure 1 uses a 555 timer to generate a sawtooth voltage waveform across a capacitor. It then compares that signal against a variable reference voltage using open-loop operational amplifiers (op amps) operating as comparators. The comparison of these two voltage signals produces a square-wave output from the op amp, varying in duty cycle (ratio of high to low) according to the variable reference voltage.
This variable duty cycle signal then drives the base of a power transistor, switching current on and off through the lamp load. The 555’s oscillation frequency is much higher than the lamp filament’s ability to thermally cycle (heat and cool), so any variation in duty cycle, or pulse width, has the effect of controlling the total power dissipated by the load over time. When the transistor is in cutoff (input low), its power dissipation is zero because there is no current through it. When the transistor is saturated (input high), its dissipation is very low because there is a little voltage drop between the collector and emitter while it is conducting current.
When you examine the schematic, you will notice two op amps connected in parallel. This is done to provide maximum current output to the base terminal of the power transistor. A single op amp (one-half of a 1458 IC) may not be able to provide sufficient output current to drive the transistor into saturation, so two op amps are used in tandem.
This should only be done if the op amps in question are overload-protected, which the 1458 series of op amps are. Otherwise, it is possible (though unlikely) that one op amp could turn on before the other, and damage results from the two outputs short-circuiting each other (one driving high and the other driving low simultaneously). The inherent short-circuit protection offered by the 1458 op amp allows for direct driving of the power transistor base without needing a current-limiting resistor.
The three diodes in series connecting the op amps’ outputs to the transistor’s base are there to drop voltage and ensure the transistor falls into cutoff when the op amp outputs go low. Since the 1458 op amp cannot swing its output voltage all the way down to ground potential but only to within about 2 V of ground. A direct connection from the op amp to the transistor would mean the transistor would never fully turn off. Adding three silicon diodes in series drops approximately 2.1 V (0.7 V times 3) to ensure there is a minimal voltage at the transistor’s base when the op amp outputs go low.
Step 1: Build the circuit of Figure 1 and represent it by the breadboard implementation shown in Figure 2.
Step 2: If you have an oscilloscope, view the capacitor voltage, potentiometer voltage, and op amp output waveforms to see how they relate to one another and to the load power. In Figure 3, the capacitor voltage waveform (EC) is shown in green.
It does not change as a function of the control voltage output by the potentiometer (shown in black). The output from the op amps is illustrated in red.
When the capacitor voltage (green) is greater than the control voltage (black), the output (red) is low. By adjusting the level of the control voltage, we can change the percentage of each capacitor voltage cycle in which the capacitor voltage is greater than the control voltage. This percentage (time on divided by time off) is the duty cycle.
Step 3: However, most of us have no access to a triple-trace oscilloscope, much less any oscilloscope at all, so an alternative method is to slow the 555 oscillator down enough that the three voltages may be compared with a simple DC voltmeter. Replace the 0.1 µF capacitor with one that is 100 µF or larger. This will slow the oscillation frequency down by a factor of at least a thousand, enabling you to measure the capacitor voltage slowly rising over time and the op amp output transition from high to low when the capacitor voltage becomes greater than the potentiometer voltage.
With such a slow oscillation frequency, the load power will not be proportioned as before. Rather, the lamp will turn on and off at regular intervals.
Step 4: Feel free to experiment with other capacitor or resistor values to speed up the oscillations enough so the lamp never fully turns on or off but is throttled by the quick on-and-off pulsing of the transistor.
Step 5: It is interesting to listen to the op amp output signal through an audio detector as the potentiometer is adjusted through its full range of motion. Adjusting the potentiometer has no effect on signal frequency, but it greatly affects the duty cycle.
Note the difference in tone quality, or timbre, as the potentiometer varies the duty cycle from 0% to 50% to 100%. Varying the duty cycle has the effect of changing the harmonic content of the waveform, which makes the tone sound different.
You might notice a particular uniqueness to the sound heard through the detector headphones when the potentiometer is in the center position (50% duty cycle—50% load power) versus a kind of similarity in sound just above or below 50% duty cycle. This is due to the absence or presence of even-numbered harmonics. Any symmetrical waveform above and below its centerline, such as a square wave with a 50% duty cycle, contains no even-numbered harmonics, only odd-numbered.
If the duty cycle is below or above 50%, the waveform will not exhibit this symmetry, and there will be even-numbered harmonics. The presence of these even-numbered harmonic frequencies can be detected by the human ear, as some of them correspond to octaves of the fundamental frequency and thus fit more naturally into the tone scheme.
You can also observe the changes in the harmonics and frequency spectrum if you have an oscilloscope that can display the spectrum of a signal. A spectrum analyzer, as its name suggests, will also provide this information.
Learn more about the fundamentals behind this project in the resources below.
In Partnership with Geehy Semiconductor
by Jake Hertz
by Robert Keim