# Triangular wave generator simulation with LTSpice

#### Frenetique

Sep 25, 2016
3
Hi everyone !

I am trying to design a triangular wave generator with LTSpice in order to learn a bit how to use this simulator.

The goal is to have a triangular signal with a frequency of 20kHz and centered around 5V with an output voltage dynamic of 2/3 of the single 10V supply (so the signal goes from 1.66V to 8.33V, centered around 5V).

The theoretical concept is fairly simple; a Schmitt trigger's output is sent to an integrator (square to triangle) and the output from the integrator is looped back to the trigger. I managed to do it with theoretical componant (universal op amp) but I can't do it with "real" componant (LT library). Basically the whole system is never oscillating.

I isolated each part and simulated one after another and there are some behaviours, I believe not related to the simulation but more with the real charcteristics of op amps, that I don't understand.

theory_triang_generator.png shows the schematic for the theoretical circuit.

real_triang_generator.png shows the schematic for the true circuit.

I also attached the three simulated circuits, namely the whole triangle wave generator, an integrator and a Schmitt trigger. Each time there is the equivalent with the theory.

Consider that I know the theoretical model of an op amp but I'm not at ease with real ones and with their flaws.

Therefore my questions are:

- Why does the integrator kind of saturate like it does (tips of triangles are cut and flat, see true_integrator.asc) ?

- Why the Schmitt trigger has a high voltage that is dropping (see real_schmitt_trigger.asc) ?

- Why my design with real LT componants of the triangle wave generator won't start (see Triangular_wave_generator.asc) ?

I know this is a lot of questions. I thank you in advance for your enlightenments.

Best regards.

#### Attachments

• theory_triang_generator.png
10.6 KB · Views: 539
• real_triang_generator.png
14.4 KB · Views: 586
• real_schmitt_trigger.asc
1.7 KB · Views: 121
• Triangular_signal_generator.asc
6.6 KB · Views: 174
• true_integrator.asc
1.6 KB · Views: 97

#### Alec_t

Jul 7, 2015
3,280
Increase R4 to at least 22k and your oscillator should run.

#### Frenetique

Sep 25, 2016
3
Alec_t, it does indeed. Could you explain me why it was required ? Thanks in advance.

#### Alec_t

Jul 7, 2015
3,280
The LT1122 is not a rail-to-rail output type. Its output rises only to ~7.5V. With the lower R4 value the feedback was excessive and prevented the non-inverting input of the comparator reaching the vref level.

#### Frenetique

Sep 25, 2016
3
Thanks Alec_t !

The LT1122 provides an output voltage V1 of ~7.4V (when the output of the trigger is low), this when returned to the non inverting pin of the LT1011 is divided by the resistive bridge of R3 and R4. Therefore I had a voltage going on the + pin of V1* R2/(R1+R2), which was too low compared to the reference of 5V, therefore never triggering the comparator.

I am glad to attack this small problems it refreshes my memory of my studies.

Thanks a lot again Alec_t, quick answer and spot on.

#### Alec_t

Jul 7, 2015
3,280
Yes, you've understood correctly. You can check for yourself by changing the value of R4 and seeing what happens to the voltage on the non-inverting input of the comparator.

Replies
10
Views
3K
Replies
8
Views
30K
Replies
4
Views
2K
Replies
0
Views
3K
Replies
6
Views
1K