I have a task to generate a triangular signal with variable amplitude and support.
The figure shows the type of signal and what parameters I want to change (“d” and “o”). Moreover, I need to change the amplitude in a small range (1mV-0.5V.), And the support from 0.5 to 2.5V.
I implemented this using a microcontroller and its two DAC outputs and an additional op-amp circuit. The first output of the DAC generates rectangular pulses with adjustable amplitude. The second output of the DAC generates a constant voltage with adjustable amplitude. Then all this is sold at the op-amp, where one stage works as an integrator, and the second how to repeat, and then I raise the triangular signal to the level I need. Here is the diagram:
When I assembled this circuit and checked. I saw that the signal received at the output has noise, especially when I need to form a triangular signal with an amplitude of tens of millivolts. I'm using an STM microcontroller, maybe it has a rather noisy DAC. The frequency of the triangular signal is 1kHz. Power supply of the microcontroller and op-amp 3.3V.
I need to get a triangular signal, with a frequency of 1kHz, with the possibility of amplitude and support adjustment and minimal noise. How can I reduce the noise in this circuit, or how can I redesign the circuit to achieve minimal output noise?
P.S. Maybe I'm doing it all wrong and I should implement it somehow differently?
Here is the part of the PCB that is responsible for the formation of a triangular signal:
The op amp and microcontroller pins (VDDA and Vref) are powered by a low noise linear regulator. R20 is not installed.
I also tried to apply a signal of several volts from the DAC1 output and increase the capacitance of the capacitor in the integrator feedback circuit in order to reduce noise, but this did not change much.