I have an Arduino Nano-based function (sine, sawtooth, triangular, square) generator. Basically it is an Arduino Nano connected to a MCP4802 DAC, whose output is connected to an RC lowpass filter. Currently I have a cut-off frequency of 150 Hz.
The DAC will output 4 V, then it is connected to the RC filter, where R = 100 Ω and C = 10 μF.
The problem is that I can filter out noise on sine wave, however, this filter distorts the square, sawtooth, and triangular signal (which is obvious, since we filter out high-frequency harmonics from sawtooth, triangular, and square wave signals).
Is there a proper way to design an RC filter on the output and at the same time not distort other waveforms (but instead filter out the noise)?