Sawtooth generator - Page 1
Forum section: electronics / beginners

author: bonzer
author_rank: Regular Contributor
timestamp: March 12, 2020, 04:27:36 pm
content: Hello everybody. I want to generate a sawtooth wave for a pwm modulator. There are many solution but I want to focus on two. They look simple so I understand well enough their working principle but I don't know which one is better. Please help me to compare the two solution. Don't consider those particular components but only general op-amps. It's not a problem of cost but of having good features. I personally prefer the first because I don't know everything about internal structure of ne555.

author: schmitt trigger
author_rank: Super Contributor
timestamp: March 12, 2020, 05:57:49 pm
content: Focus on the first one, it has the lower package count (a single IC) and neatly demonstrates the operation of a pair of very common op amp functions (comparator and integrator).

author: rstofer
author_rank: Super Contributor
timestamp: March 12, 2020, 06:58:03 pm
content: https://howtomechatronics.com/how-it-works/electronics/555-timer-ic-working-principle-block-diagram-circuit-schematics/A 555 has a couple of comparators to trip an internal flip-flop when the thresholds are reached. It's a dead simple device. Nevertheless, I would also prefer the first version.Extra Credit: Build them both! Compare the outputs and decide which best fits your needs. You won't lose anything by learning more.

author: Yansi
author_rank: Super Contributor
timestamp: March 12, 2020, 07:30:08 pm
content: Second one (with 555 timer) has output amplitude depending on the frequency - that sucks.

author: Ian.M
author_rank: Super Contributor
timestamp: March 12, 2020, 07:39:10 pm
content: You should be able to get a steeper falling edge (i.e. a better sawtooth) by modifying the Solution #1 dual OPAMP Miller integrator + comparator circuit. Its determined by R1, and limited by the output current capability of the OPAMPs, and by the slew rate of the OPAMP comparator stage which actually results in a non-linear falling edge if you push it far enough that the rail to rail slew rate of the comparator becomes a significant part of the reset time.Using a 555 for a linear sawtooth generator is almost invariably just plain nuts. There's no way to do it without extra active components, so the only way it makes sense is if you need the synchronised pulse output at a greater current capability than an OPAMP comparator can supply.

author: Yansi
author_rank: Super Contributor
timestamp: March 12, 2020, 07:43:21 pm
content: You could also use a current source and charge a cap with it, then short the cap dead if threshold is met. I think think this could be built with just as little as 4 transistors with a decent performance up to some decent HF frequencies. No opamps needed

author: bonzer
author_rank: Regular Contributor
timestamp: March 13, 2020, 03:10:45 pm
content: Thank you everybody for the answers. I have a new questions, at the output I think about doing a comparison to another signal for example a sine, this way I have a PWM modulation. What I want is my output to be that square wave with changing average value but with H-L levels 5-0V because it is usually used for like mosfet gates control so I don't want to have negative voltages to avoid inverted polarity control of transistors or similar stuff. Switches might also be not simple but some IGBTs etc. Anyway if I configure a comparator using a rail-to-rail op amp to get the ground at the output it could work right? Meanwhile to get the 5V or any lower voltage, assuming the other operationals are powered with V+ higher than 5V I could still do at the output of my last op-amp a resistance voltage divider or something similar.