1

I'm trying to smooth out the steps from a digitally-generated LFO signal which changes step-wise. The digital steps are small, but still audible when the LFO is hooked up to the circuit that uses it (zipper noise).

I'm considering using a low-pass RC filter. I'd like to predict the effect it would have so I can decide if it will be a useful approach. Are there any free or affordable resources I could use? I'm pretty much a layperson when it comes to electronics, so the simpler the better.

Given that the effect of a low pass RC filter on a square wave is asymptotic, something like this (borrowed from here)...

effect of low pass filter on square wave

... my assumption about how an RC filter works is that the gradient of the filtered signal is proportional to the voltage differential between the filtered signal and the source signal; and that the proportionality is determined by the R and C values.

Edit I've TL;DR;ed the question - the accepted answer says everything I was trying to elicit.

OutstandingBill
  • 355
  • 1
  • 10
  • Are you familiar with the Laplace or Fourier transform? It's much easier to talk about the response of filters in terms of frequency components. – Hearth Oct 16 '21 at 13:12
  • @Hearth, unfortunately, no. They're the reason I flunked out of university 30 years ago : ) – OutstandingBill Oct 16 '21 at 13:14
  • I can sort-of get what the Fourier illustration in this post is about though https://electronics.stackexchange.com/a/590774/218819 - add sine waves of various frequencies and amplitudes to get a square-ish wave – OutstandingBill Oct 16 '21 at 13:25
  • 1
    The step size does not matter. For both large and small steps the curve is proportional to the step, which is why an RC filter has a time constant tau = RC which says that in time tau the capacitor is charged to 63% and in time 5 times tau it is charged to 99%. – Justme Oct 16 '21 at 13:27
  • @Justme, does that mean that the curves I've guessed should all be the same basic shape, but stretched out depending on the height of the step? And that they should all get as close (proportionally) to the source signal? I'll add a graph to illustrate. – OutstandingBill Oct 16 '21 at 13:30
  • "zipper noise" suggests that a pure audio sinewave is desired, corrupted by steps. This distortion is most apparent when the desired sinewave has a low frequency (below a few hundred Hz.). Your filter approach can help if the desired pure tone has a fixed frequency, but if frequency must be variable (for example, 20-20,000 Hz) then such a simple filter will disappoint. – glen_geek Oct 16 '21 at 13:46
  • @glen_geek, I think for my LFO 10Hz is a reasonable maximum frequency, but it does need to be variable. – OutstandingBill Oct 16 '21 at 13:51
  • Unfortunately filtering square steps does not result into Zipper noise, just filtered square wave steps. Zipper noise usually means something else, like imagine playing sine wave and having digital amplitude control that when you change the volunme there is an instant step between old and new amplitude without any smoothing. Change volume a 100 times per second and you have 100 Hz clicking. – Justme Oct 16 '21 at 14:37
  • @Justme, that is almost exactly the situation: the LFO waveform is constructed digitally, and controls the volume of an audio signal. The zipper noise is most apparent twice per cycle of a sine wave, and I'm fairly sure it's during the steepest sections. Based on Mattman944's graph, I'm going to try the filter to see if the softer angles are less audible. – OutstandingBill Oct 17 '21 at 00:12

1 Answers1

2

Besides analysis, another option is simulation. Here is a start. The schematic editor and simulator are free, but you can't save.

For a simple RC filter, your digital frequency must be much, much higher than the output frequency.

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here

Mattman944
  • 13,638
  • 1
  • 19
  • 43
  • My digital frequency is currently 500Hz, the curve I'm trying to generate from it would be around 5Hz. Is that "much much higher" enough? BTW, this answer is exactly what I needed. – OutstandingBill Oct 20 '21 at 09:38