0
\$\begingroup\$

We're generating a PWM signal at about 2000 Hz whose rise and fall times we need to limit to about 40 us, so it can pass through ordinary audio stages without distortion / ringing.

The PWM signal is 0-5 V from a micro, and we'd be happy with at least a 2 Vp-p final output.

I'd like to do it with the simplest possible circuit that provides linear ramps. What's my best bet? Any example circuits out there? I'm not a real engineer, but I do have a copy of LTspice. (:

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Limit single pwm pulse (makes no sense since 40ms > 250us) or limit modulated signal? \$\endgroup\$
    – user208862
    Commented Nov 15, 2021 at 0:00
  • \$\begingroup\$ Please add details, such as the guaranteed input voltages voltages (high and low), and the required output voltages. Also, as mentioned in comment above, please determine a rise and fall time that makes sense for the frequency of your pulses. Finally, please add this information to your question, by editing it, rather than posting that information here in the comments. \$\endgroup\$ Commented Nov 15, 2021 at 0:16
  • \$\begingroup\$ May be 40 microseconds, not mili. \$\endgroup\$
    – user263983
    Commented Nov 15, 2021 at 0:36
  • \$\begingroup\$ Indeed, 40uS, not 40 mS \$\endgroup\$
    – Jim Mack
    Commented Nov 15, 2021 at 2:25
  • \$\begingroup\$ Limit with RC isn't sufficient? \$\endgroup\$
    – user208862
    Commented Nov 15, 2021 at 2:40

3 Answers 3

2
\$\begingroup\$

One option is to implement an OPAMP-base slew rate limiting circuit

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ This looks ideal to me. Can you speak to the issue raised by @SimonFitch, if it applies to the output here? \$\endgroup\$
    – Jim Mack
    Commented Nov 15, 2021 at 16:22
2
\$\begingroup\$

You may use a resistor R is series to the PWM output. Pick R in the 10 to 1000 Ohm range.


Alternatively, you may use a resistor R in series to the PWM output and a capacitor C between R and GND. Take a look here:

http://sim.okawa-denshi.jp/en/CRlowkeisan.htm

Pick R in the 10 to 1000 Ohm and C in the range of 100 pF to 100 nF.

\$\endgroup\$
8
  • \$\begingroup\$ If I am not mistaken, both solutions are basically RC filters, except the first one uses input capacitance of the target. Note, that RC filter does not entirely satisfy "linear ramp" requirement, although might be OK for "comes close" part of it \$\endgroup\$
    – Maple
    Commented Nov 15, 2021 at 6:44
  • \$\begingroup\$ Agree 100% to your note here. \$\endgroup\$ Commented Nov 15, 2021 at 8:17
  • \$\begingroup\$ Thanks. I had modeled the circuit you suggest and... I know I said 'close' but I don't think a simple RC filter is it, since the ramps are logarithmic, not linear. Something with a constant-current characteristic? \$\endgroup\$
    – Jim Mack
    Commented Nov 15, 2021 at 13:18
  • 1
    \$\begingroup\$ @JimMack You need to edit your question and define exactly what you mean by "even comes close". It is inconsiderate to ask for solutions after giving vague requirements, then saying "no, that's not good enough" when someone tries to help. \$\endgroup\$ Commented Nov 15, 2021 at 13:25
  • \$\begingroup\$ @ElliotAlderson - You're right, sorry for being vague. \$\endgroup\$
    – Jim Mack
    Commented Nov 15, 2021 at 13:44
2
\$\begingroup\$

Linear ramps with sharp corners at the end of their transitions have equally strong higher harmonics as rectangular functions, and I really think you should consider a simple RC low pass filter:

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here enter image description here

It's the simplest approach I can think of, and while it won't produce linear ramps like an active integrator, it will limit slew rate, and the rectangular waveform can still be recovered after its journey through the audio channel.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ "Linear ramps with sharp corners at the end of their transitions have equally strong higher harmonics as rectangular functions," I believe that is incorrect. With square wave, the harmonics fall off at 20 dB/decade, but with trapezoidal, they fall off at 40 dB/decade if I am not mistaken. \$\endgroup\$ Commented Nov 15, 2021 at 14:43
  • \$\begingroup\$ There may be a difference I'm not aware of between 'linear ramps' and the sort of slew-rate limiting circuit proposed by @JonRB in his answer. Would you say that his results suffer from the issue you're describing? \$\endgroup\$
    – Jim Mack
    Commented Nov 15, 2021 at 16:19
  • \$\begingroup\$ Yes, the sharp corner is rich in harmonics, which you stated you want to get rid of \$\endgroup\$
    – user16222
    Commented Nov 15, 2021 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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