# Triangle wave oscillator with dual lm358 and single supply operation

#### Wai Khang Lim

Joined Oct 2, 2018
10
i am trying to build a triangle wave generator with the specifications as below :
• The triangular wave needs to oscillate between V_max=7.2 V ,V_min=1.6 V
• Duty cycle = 0.5±1%
• Frequency,f_osc=8.5 kHz±5%
• Supply voltage = 12V(single supply operation)
Does anybody have a formula or guide to build a triangle wave generator with two lm358 op amps?
the circuit i came up with does not give me the desired output

#### crutschow

Joined Mar 14, 2008
31,144
the circuit i came up with does not give me the desired output
How is in not the desired output?

#### Wai Khang Lim

Joined Oct 2, 2018
10
How is in not the desired output?
When i measure the Vtri in LTSpice, i got an output of 0

#### AnalogKid

Joined Aug 1, 2013
10,177
This is a homework thread on another forum.

The circuit you posted is a comparator with hysteresis driving an integrator. Do you understand how each of those circuits work? If not, then do some research into them and come back with specific questions.

Everything about this circuit can be determined with the LM358 datasheet, Ohm's Law, and the voltage equation for a capacitor.

ak

#### Audioguru again

Joined Oct 21, 2019
5,426
The circuit has an error causing it to not work. Some circuits in Google fixed the problem.
Hint: What input voltage polarity will make the output of opamp U2 go positive?
What needs to be added to do that?

Won't the crossover distortion produced by an LM358 cause kinks in the waveform?

#### crutschow

Joined Mar 14, 2008
31,144
Won't the crossover distortion produced by an LM358 cause kinks in the waveform?
I don't think the output has crossover distortion when operated from a single supply.

#### crutschow

Joined Mar 14, 2008
31,144
When i measure the Vtri in LTSpice, i got an output of 0
Look at the power supply polarity to U1.