Electronic – Why doesn’t this schmitt PWM circuit work as expected

oscillatorpwmschematicsschmitt-trigger

I've designed and built an adjustable PWM generator using schmitt trigger inverters. However, it doesn't seem to be working.

Here is the circuit:

schmitt PWM circuit

The capacitors at the bottom are intended to be switched in and out, to vary the frequency of the oscillation. The potentiometer is for adjusting the duty cycle.

Initially, I designed the circuit without the resistive divider on the input of the first inverter, but discovered that the frequency of the oscillator varied as I adjusted the potentiometer. Looking at the datasheet for the inverter chip (HD74LS14) I discovered it was asymmetrical, with thresholds of 0.7v and 1.6v. Adding the resistive divider lowered the input level to more evenly distribute the input across the threshold region.

It works perfectly in this simulator here. In reality, however, it's not working.

I get no illumination from the LED at one extreme of the potentiometer, and full-on at the other extreme. That would of course be normal, except that there is no gradual fading as you adjust the pot. It stays full-on for some of the turn, then gives a flashing output (when the 100uF capacitor is used) for a couple of degrees of turn, then goes off for the remainder of the turn.

Can someone explain what is happening please? I'm completely stumped.

Best Answer

I'm afraid your simulator is lying to you, by failing to take into account the actual input characteristics of the 74LS14.

According to the datasheet (Section 6.5 on page 5), note the values for IIH (current, input high) and IIL (current, input low). In particular, note the huge discrepancy between the two values, and that IIL is on the order of half a milliamp! There's no way you're going to be able to get that much current through your resistive divider.

I think the most direct way to address this would be to substitute the 74HC14 (or 74HCT14) for your 74LS14. These CMOS chips have much higher input impedance values, and the behavior of the circuit will more closely match your simulation.