I want to replicate the circuit seen in this video: https://www.youtube.com/watch?v=MHTiSRCKNF4&t=341s without using the function generator he uses.

The video explains that by inputting a signal and a triangle/sawtooth wave into a comparator, you can turn it into a PWM signal.

My question is what is a good way to generate a low frequency (around 1 Hz) triangle wave for this purpose without a microcontroller? It would also be nice to be able to adjust the triangle wave's max and min.

  • 1
    \$\begingroup\$ Maybe it´s not the best way, but using a simple current source that requires a pnp transistor and a cap would be just fine for triangle waves. Alongside that, using a hysteresis comparator to create sqaure waves can provide you a sawtooth waveform, because it relies on a cap to discharge, and you can get the waveform from that cap for a sawtooth. \$\endgroup\$ – Iron Maiden Jun 16 '18 at 6:49

Commonly used is this circuit: -

enter image description here

The integrator ramps up and down. When ramping up, the output voltage reaches the upper switching threshold of the comparator (using positive feedback to create hysteresis) and the comparator then changes state forcing the integrator to ramp down until the output reaches the lower switching threshold and the process repeats.

R1 and R2 dictate the hysteresis levels and therefore the amplitude of the triangle wave but the slope of the triangle wave is controlled by Rt and C.

If you increase the hysteresis, the frequency falls unless you re-adjust Rt (or C) to make the ramping rate faster.

It's cheap and cheerful but produces a very nicely shaped triangle waveform.

| improve this answer | |
  • \$\begingroup\$ Are you happy with this answer. If so then please consider formally accepting it or maybe leave a comment explaining difficulties you have understanding it. Take the tour \$\endgroup\$ – Andy aka Jul 22 '18 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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