4
\$\begingroup\$

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.

\$\endgroup\$
8
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Wow, much appreciated. I'll have to see if I can get some of those HC chips. A few follow-up questions: (1) Would I still need the resistive divider for that? I think so. (2) Is there any kind of simple modification I can do to make the LS work here? And (3) do schmitt inverters exist that have symmetrical thresholds with respect to their +V and GND rails? Thanks. \$\endgroup\$ – Sod Almighty Jul 24 '17 at 2:25
  • \$\begingroup\$ Seems HC is static-sensitive, while LS is not. While the HC is more "ideal", it would be less convenient to use. \$\endgroup\$ – Sod Almighty Jul 24 '17 at 2:31
  • \$\begingroup\$ I wouldn't worry about the static sensitivity. Provided you don't do anything silly you shouldn't have any problems - they are designed to be tolerant of normal static discharge events. I have never had any problems with HC74 series devices. \$\endgroup\$ – Kevin White Jul 24 '17 at 2:43
  • \$\begingroup\$ HC14 is more symmetrical (but not completely IIRC), HCT14 has an input offset like LS14 to be TTL compatible. \$\endgroup\$ – Neil_UK Jul 24 '17 at 5:55
  • 5
    \$\begingroup\$ As the co-maintainer of the simulator in question, I would take one issue with the original answer (and I have proposed an edit). The simulator doesn't claim to simulate any specific component so it isn't 'lying' about the input characteristics of the 74LS14 it is just simulating a different abstract, idealized, schmitt trigger. \$\endgroup\$ – alphabetter Jul 24 '17 at 7:37
0
\$\begingroup\$

.... another problem with using logic type Schmidts, is that the threshold levels are no longer set at 1/3 and 2/3 VCC (they were a long time ago) as I found out to my cost, and different manufacturers use different levels. If I now need a Schmidt oscillator I tend to use an op amp.

\$\endgroup\$
  • \$\begingroup\$ Read the datasheet. Trigger levels are specified. \$\endgroup\$ – winny Jul 24 '17 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.