0
\$\begingroup\$

My project currently looks like this. I set the top analog output to a fixed value around 3V (it varies from board to board, depending largely on the behaviour of the vactrols), and vary the lower one between around 0.5V and 2V (again, the exact values vary) to modulate the amplitude of the output signal.

schematic using analog outs

I'd like to replace the uC with a model that has no analog outputs, but does have PWM pins which can drive an LED.

I'm wondering, if I arrange things as follows, will the likely transient negative voltages between A and B be a problem, or will the speed at which it all happens blur things sufficiently to create an "analog" of the first design?

schematic using stacked PWM

\$\endgroup\$
1
  • \$\begingroup\$ If both PWM signals are coming from the same MCU, synchronize them and add them inside the MCU and only have one PWM output. \$\endgroup\$
    – Mattman944
    Nov 29, 2023 at 9:43

1 Answer 1

1
\$\begingroup\$

Just put an R-C filter after each PWM output. That will convert the PWM back to analog, and thus avoid problems such as negative spikes.

\$\endgroup\$

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.