# Triangular wave generator simulation with LTSpice

Discussion in 'General Electronics Discussion' started by Frenetique, Sep 25, 2016.

1. ### Frenetique

3
0
Sep 25, 2016
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.

File size:
10.6 KB
Views:
522
File size:
14.4 KB
Views:
570
File size:
1.7 KB
Views:
108
File size:
6.6 KB
Views:
158
File size:
1.6 KB
Views:
87
2. ### Alec_t

2,910
791
Jul 7, 2015
Increase R4 to at least 22k and your oscillator should run.

3. ### Frenetique

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

4. ### Alec_t

2,910
791
Jul 7, 2015
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.

Arouse1973 likes this.
5. ### Frenetique

3
0
Sep 25, 2016
Thanks Alec_t !

Tell me if I understand correctly your answer:

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.

6. ### Alec_t

2,910
791
Jul 7, 2015
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.