Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

200 MHz Triangular Wave

Status
Not open for further replies.
The spikes on the triangle-wave might be caused by building the circuit on a breadboard. A breadboard has many long rows of contacts and many long connecting wires that have high capacitance and high crosstalk between them. Also the lousy old LM324 opamp has trouble above 2kHz with a sinewave or above 200Hz with a triangle wave and its overshoot can cause spikes.
 
Your 4.7uF integrating capacitor has AC across it so it has reverse polarity half the time. If the capacitor is polarized (an electrolytic or tantalum type) then it conducts when it shouldn't which will mess up the waveform.
 
Hello again,

You could try lowering the frequency for this 'trial' circuit, and you could also add a post low pass filter to the output so you snub all of those spikes. The post filter would be an RC low pass filter with a cutoff frequency much higher than the triangle wave frequency, like say 20 times higher. The idea is to find values for R and C that meet the following criteria:
1. Reduces the spike to an acceptable level.
2. Do not seriously degrade the triangle linearity. (although slight curves are usually ok).
3. Do not increase the output impedance significantly.

Of course you could try a better op amp eventually too.

Also realize that if this is for a PWM circuit pulse width generator section then you dont have to have a super perfectly linear triangle either. It can have slightly curved sides (concave up or concave down) and work pretty well. That's because the output pulse will still be regulated, it will just change the loop gain slightly for different load and line conditions. A changing loop gain is not something we want, but if it is small enough it doesnt have any significant effect on the actual output pulse width. This is of course when the PWM is used in a negative feedback controlled circuit not in a feed forward only circuit. In a feed forward only circuit the output pulse may vary from the ideal by an amount equal to the difference between the curved triangle and a perfectly linear triangle at the particular control point level, but to predict that we'd have to know the exact triangle waveform.

Spiked peaks may or may not be troublesome to the system. It depends on the width of the spike relative to the minimum response time of the system. If the width is wide it will prevent the system from being able to produce zero output for zero input, but that's not usually a problem either because often there is never a zero input. So it partly depends on what this will be used for and what the min and max levels of the input wave have to be.

I see. Because I'm already making purchase for JFET op-amp TL072. However given by this formula [ f = 1/2*R1*C ] and assuming that R1 and C will varies to create a 2MHz carrier, do I need to make any other changes to R2, R3?
 
Your 4.7uF integrating capacitor has AC across it so it has reverse polarity half the time. If the capacitor is polarized (an electrolytic or tantalum type) then it conducts when it shouldn't which will mess up the waveform.
But the problem will be that if I used a R1 = 1k, C = 4.7uF, the waveform is fine.
However, if I change to R1 = 1k, C = 330nF, the waveform will have variations of amplitude and there will be voltage spikes.

I am thinking of changing the OP-AMP to a better one when my components arrived.
 
I see. Because I'm already making purchase for JFET op-amp TL072. However given by this formula [ f = 1/2*R1*C ] and assuming that R1 and C will varies to create a 2MHz carrier, do I need to make any other changes to R2, R3?
Your values of R2 and R3 are too low for most opamps to drive. Use 2k ohms as a minimum.

A TL072 is a dual audio opamp that works well with a sine-wave up to 100kHz or a triangle wave up to about 5kHz to 10kHz.
 
Your values of R2 and R3 are too low for most opamps to drive. Use 2k ohms as a minimum.

A TL072 is a dual audio opamp that works well with a sine-wave up to 100kHz or a triangle wave up to about 5kHz to 10kHz.

Hi, How do you determine the value of R2 and R3? And how does it affect the circuits?
Is there any op-amps that is able to work up to 2MHz?
 
Is there any op-amps that is able to work up to 2MHz?
Plenty. The LTC6409, for example, has a gain-bandwidth product of 10GHz
 
I see. Because I'm already making purchase for JFET op-amp TL072. However given by this formula [ f = 1/2*R1*C ] and assuming that R1 and C will varies to create a 2MHz carrier, do I need to make any other changes to R2, R3?

Hello again,

As other posters have mentioned, the TL072 is not good enough for 2MHz. You can try lower frequencies like 1kHz first though as that should work ok. Then you can decide what you want to do once you get it working right.
You can get a feel for how the frequency of the op amp and the frequency of the triangle work together by considering the harmonic content of the triangle wave. For a square wave it is roughly 1/N where N is the harmonic number, so for example the 5th harmonic is one-fifth (1/5) of the amplitude of the fundamental, so to reproduce this harmonic accurately you'd need a op amp that had at least 5 times the frequency as the triangle assuming the slew rate was also fast enough. For the triangle however that same harmonic is 1/N^2 so the 5th harmonic is down one-twenty-fifth (1/25) of the fundamental, so it starts to become less important now. So the triangle is easier to produce than the square wave, although higher bandwidth is still required. The eleventh harmonic is down 1/121 of the fundamental, so that sort of means we should use an op amp that can reproduce a sine wave without too much distortion at 10 times the triangle wave, as a minimum, and that should produce a triangle that is close enough to an ideal triangle. So you are looking at a very high frequency circuit here to get to 200Mhz.

For R2 and R3, R2 should be one half of R3. You might want to increase both values a little as audioguru pointed out also. 2k for R2 makes R3 equal to 4k for example. For a faster comparator however you may have to keep them the same or even lower them, depending on the part number. That's because the impedance might have to be kept low at very high frequencies in order to work right.

If the output of the op amp can not reach all the way to the positive supply rail, then it may also be a good idea to change the value of one or both of the two divider resistors which appear as Ra and Rb on the original schematic here. They set the reference voltage. The reference voltage is normally made to be one half of the supply voltage, but if the output of the comparator can not reach up to the supply rail (many can not) then set the reference voltage to one half of the max output of the comparator voltage. So for example with a +5v supply, if the op amp or comparator spec sheet specifies a max output of 4 volts then set the reference voltage to 2 volts. This helps to ensure a symmetrical triangle wave rather than a lop sided one (which might still work though in a PWM application).
There's also the possibility that you will be using a pull up resistor on the output of the comparator, for comparators such as the LM339 for example. This limits the output amplitude also so you have to calculate the max output and then set Ra and Rb to one half of that calculated value.

As the others here have pointed out, to get to a frequency as high as 200Mhz you'd have to go to a more expensive op amp which would have to be a very high frequency unit. Then you have to start to pay attention to layout too.

As a final thought, attention to the comparator rise and fall times is also wise. As mentioned earlier on, if the output rises or falls too slow it causes the output triangle to warp into a curvy sided triangle. This might still work with PWM however, but it would limit the max triangle amplitude a little. So the idea then is to go with a fast comparator too. A fast comparator may have other requirements too such as lower value resistors for R2 and R3.
 
Last edited:
Plenty. The LTC6409, for example, has a gain-bandwidth product of 10GHz
Hi, But for TL072, the unity gain bandwidth is 3MHz from the datasheet. Am i wrong? :x

And also, given that for TL072, Slew rate = 5v/us and maximum output is 12V
Maximum frequency output = 1/[2.4*10^(-6)] = 416kHz.

Is this calculation correct?
 
Last edited:
Hello again,

As other posters have mentioned, the TL072 is not good enough for 2MHz. You can try lower frequencies like 1kHz first though as that should work ok. Then you can decide what you want to do once you get it working right.
You can get a feel for how the frequency of the op amp and the frequency of the triangle work together by considering the harmonic content of the triangle wave. For a square wave it is roughly 1/N where N is the harmonic number, so for example the 5th harmonic is one-fifth (1/5) of the amplitude of the fundamental, so to reproduce this harmonic accurately you'd need a op amp that had at least 5 times the frequency as the triangle assuming the slew rate was also fast enough. For the triangle however that same harmonic is 1/N^2 so the 5th harmonic is down one-twenty-fifth (1/25) of the fundamental, so it starts to become less important now. So the triangle is easier to produce than the square wave, although higher bandwidth is still required. The eleventh harmonic is down 1/121 of the fundamental, so that sort of means we should use an op amp that can reproduce a sine wave without too much distortion at 10 times the triangle wave, as a minimum, and that should produce a triangle that is close enough to an ideal triangle. So you are looking at a very high frequency circuit here to get to 200Mhz.

For R2 and R3, R2 should be one half of R3. You might want to increase both values a little as audioguru pointed out also. 2k for R2 makes R3 equal to 4k for example. For a faster comparator however you may have to keep them the same or even lower them, depending on the part number. That's because the impedance might have to be kept low at very high frequencies in order to work right.

If the output of the op amp can not reach all the way to the positive supply rail, then it may also be a good idea to change the value of one or both of the two divider resistors which appear as Ra and Rb on the original schematic here. They set the reference voltage. The reference voltage is normally made to be one half of the supply voltage, but if the output of the comparator can not reach up to the supply rail (many can not) then set the reference voltage to one half of the max output of the comparator voltage. So for example with a +5v supply, if the op amp or comparator spec sheet specifies a max output of 4 volts then set the reference voltage to 2 volts. This helps to ensure a symmetrical triangle wave rather than a lop sided one (which might still work though in a PWM application).
There's also the possibility that you will be using a pull up resistor on the output of the comparator, for comparators such as the LM339 for example. This limits the output amplitude also so you have to calculate the max output and then set Ra and Rb to one half of that calculated value.

As the others here have pointed out, to get to a frequency as high as 200Mhz you'd have to go to a more expensive op amp which would have to be a very high frequency unit. Then you have to start to pay attention to layout too.

As a final thought, attention to the comparator rise and fall times is also wise. As mentioned earlier on, if the output rises or falls too slow it causes the output triangle to warp into a curvy sided triangle. This might still work with PWM however, but it would limit the max triangle amplitude a little. So the idea then is to go with a fast comparator too. A fast comparator may have other requirements too such as lower value resistors for R2 and R3.

Hi, just to check, to determine the max output frequency of the comparator, Fout = 1/[Vp/SR], then for TL072, I figure that the max freq will be around 416kHz. Did I made a mistake somewhere?

I realised that, by decreasing the value of the capacitor, the voltage spikes and inconsistent in the amplitude seems to be worse. So like what you said in the previous post, I should find a value of R and C suitable that will not affect the waveform?

And is there any mistakes in my schematic? I had made the necessary adjustment for the resistors and capacitor.
 

Attachments

  • Tri-WaveGENERATOR.JPG
    Tri-WaveGENERATOR.JPG
    68.5 KB · Views: 316
The typical slew rate graph of the TL07x shows problems above about 420kHz when the supply is plus and minus 5V and the output is 4V peak.
But its typical frequency response graph shows that the maximum gain is only 10 at about 420kHz so a 42kHz triangle wave will look bad. A 21kHz triangle wave will look pretty good.

If the supply is plus and minus 15V and the output is 12V peak then the typical slew rate graph shows problems above about 120kHz. The typical maximum gain is about 25. Then a 6kHz triangle wave will look pretty good.

If the IC is worse than typical then the frequencies will be lower.
 
But for TL072, the unity gain bandwidth is 3MHz from the datasheet. Am i wrong?
At 3mhz the TL072 has a gain of 1 max. That is to say it is not a amplifier. It (more or less) does not function.
At 300khz it has a max gain of 10. Now it is amplifying but not well.
At 30khz it has a max gain of 100.

The example below is not good but may help you understand.
Look at the harmonics of a 20khz triangle wave. (not 200mhz but 20khz) (using the TL072)
The 20khz harmonic is reproduced with some phase shift and accurate to about 1 part in 100.
Harmonics in the 200khz region has more phase shift and will have errors of 1 part in 10.
Harmonics at 2mhz will have huge phase shift and will hardly appear.

You need to pass every harmony with out much phase shift or what you get is not what you want.
Example: A 20khz triangle wave with out any harmonics is a sigh wave.
 
Hi, just to check, to determine the max output frequency of the comparator, Fout = 1/[Vp/SR], then for TL072, I figure that the max freq will be around 416kHz. Did I made a mistake somewhere?

I realised that, by decreasing the value of the capacitor, the voltage spikes and inconsistent in the amplitude seems to be worse. So like what you said in the previous post, I should find a value of R and C suitable that will not affect the waveform?

And is there any mistakes in my schematic? I had made the necessary adjustment for the resistors and capacitor.

Hello,

Yes there is a major mistake now because apparently you went from a single supply to a dual plus and minus supply. Before because of the connections of Ra and Rb it was assumed that the circuit was to operate from a single positive supply. Now it is shown operating from plus and minus 10 volts so we will now change that assumption.

Using a plus and minus supply means the junction of Ra and Rb (the reference voltage) must be zero. That means you either need to connect the bottom of Rb to ground, or eliminate Ra and Rb altogether and just connect that junction to ground which is zero volts.

Next, the formula for the output frequency for an ideal circuit is:
F=1/(2*R1*C1)

but you have it written as:
F=1/2*R1*C1

which is not the right way to write it out and might cause confusion because that means the same as:
F=(1/2)*R1*C1

which as you can see is definitely not the same. So we write it with parens as:
F=1/(2*R1*C1)

Next, if you calculate your output frequency with the values you have shown in that new schematic it looks like your frequency now will be close to 1MHz. That's probably too high, so you should start with a much lower frequency to start with. You can always easily try to raise it later.

Starting with R1=1000 and C1=5uf, or even R1=2k and C1=2.5uf, we get a frequency that is nice and low to start with:
F=100Hz

and the total period is:
Tp=2*R1*C1

and so half of the total period is:
Thp=R1*C1

and so one quarter of the total period is:
Tqp=R1*C1/2=Tp/4

and with R1=1k and C1=5uf we get a Tp of:
Tp=0.01 seconds

so Tp/4 is simply:
Tqp=Tp/4=0.0025 seconds

so now we have Tqp. Next we'll calculate the output of the op amp when the comparator upper threshold is reached. This comes from a simple observation that when the output of the comparator is low and the comparator threshold is reached, the unsigned current through R3 is:
iR3=Vm/R3

where Vm is the unsigned negative output characteristic of the op amp.

The negative output characteristic of the op amp is the lowest output the comparator can put out given the negative power supply level. This can be quite different than the actual power supply voltage. For example, for a TL072 with a minus 10 volts power supply the output may only reach down as far as -7 volts, not -10 volts. It may be better than that -7 volts, but lets assume -7 volts for now.

With minus 7 volts on the output, that means we have an unsigned current:
iR3=7/R3=7/4000 amps.

To get the comparator threshold to equal zero volts, this means we must have an op amp output of:
Vout=iR3*R2=7/4000*2000=7/2=3.5 volts.

So the output of the op amp will be 3.5 volts when the comparator threshold is reached. This means the triangle slews from -3.5v to +3.5v, then back down to -3.5v, so one quarter of that means it slews from 0 to 3.5v. Knowing this and the quarter period Tqp, we can calculate the slew rate of the triangle itself:
TriSlew=3.5v/Tqp

which comes out to 1400 v/sec (volts per second), which is also equal to 0.0014 v/us (volts per microsecond), or 1.4v/ms (volts per millisecond). To comply with the rule of thumb that we want the comparator at least 10 times faster than that, we need a comparator who's output can slew at a rate of at least 0.014 v/us or 14v/ms. Since it has to slew from -7v to +7v that means we need a rise (and fall) time of at least 1ms. That shouldnt be hard to find.


MORE ABOUT THE COMPARATOR OUTPUT CHARACTERISTIC

As mentioned above, if the TL072 is used as the comparator then the output will not reach up to either rail of the power supply. From the data sheet we find that it can be anywhere from Vcc-1.5 to as low as Vcc-3 for the positive excursion, and from -Vcc+1.5 to -Vcc+3 for the negative excursion.
This is typical for op amps but some are not as symmetrical as that either, and it is also questionable if both positive and negative excursions will match closely on any op amp. Mismatched positive and negative excursions will cause non symmetry in the triangle, which may or may not be objectionable to the application, but can be readjusted by changing the reference voltage to be right at the center of the two excursions:
Vref=(Vp+Vm)/2

So for Vp=+7 and Vm=-7 we get:
Vref=(7+(-7))/2=0 volts

but for Vp=+7 and Vm=-6 we get:
Vref=(7+(-6)/2=0.5 volts

Resistors Ra and Rb would be adjusted to obtain this value.
For PWM though almost any triangle will usually work, even a sawtooth, as long as the application is tested carefully over the full operating range for stability because the dynamics when there is feedback involved can change due to the time shifting nature of the PWM generated with a sawtooth versus PWM generated with a symmetrical triangle...it could be better or worse depending on the shape of the sawtooth.
 
Last edited:
Hello,

Yes there is a major mistake now because apparently you went from a single supply to a dual plus and minus supply. Before because of the connections of Ra and Rb it was assumed that the circuit was to operate from a single positive supply. Now it is shown operating from plus and minus 10 volts so we will now change that assumption.

Using a plus and minus supply means the junction of Ra and Rb (the reference voltage) must be zero. That means you either need to connect the bottom of Rb to ground, or eliminate Ra and Rb altogether and just connect that junction to ground which is zero volts.

Next, the formula for the output frequency for an ideal circuit is:
F=1/(2*R1*C1)

but you have it written as:
F=1/2*R1*C1

which is not the right way to write it out and might cause confusion because that means the same as:
F=(1/2)*R1*C1

which as you can see is definitely not the same. So we write it with parens as:
F=1/(2*R1*C1)

Next, if you calculate your output frequency with the values you have shown in that new schematic it looks like your frequency now will be close to 1MHz. That's probably too high, so you should start with a much lower frequency to start with. You can always easily try to raise it later.

Starting with R1=1000 and C1=5uf, or even R1=2k and C1=2.5uf, we get a frequency that is nice and low to start with:
F=100Hz

and the total period is:
Tp=2*R1*C1

and so half of the total period is:
Thp=R1*C1

and so one quarter of the total period is:
Tqp=R1*C1/2=Tp/4

and with R1=1k and C1=5uf we get a Tp of:
Tp=0.01 seconds

so Tp/4 is simply:
Tqp=Tp/4=0.0025 seconds

so now we have Tqp. Next we'll calculate the output of the op amp when the comparator upper threshold is reached. This comes from a simple observation that when the output of the comparator is low and the comparator threshold is reached, the unsigned current through R3 is:
iR3=Vm/R3

where Vm is the unsigned negative output characteristic of the op amp.

The negative output characteristic of the op amp is the lowest output the comparator can put out given the negative power supply level. This can be quite different than the actual power supply voltage. For example, for a TL072 with a minus 10 volts power supply the output may only reach down as far as -7 volts, not -10 volts. It may be better than that -7 volts, but lets assume -7 volts for now.

With minus 7 volts on the output, that means we have an unsigned current:
iR3=7/R3=7/4000 amps.

To get the comparator threshold to equal zero volts, this means we must have an op amp output of:
Vout=iR3*R2=7/4000*2000=7/2=3.5 volts.

So the output of the op amp will be 3.5 volts when the comparator threshold is reached. This means the triangle slews from -3.5v to +3.5v, then back down to -3.5v, so one quarter of that means it slews from 0 to 3.5v. Knowing this and the quarter period Tqp, we can calculate the slew rate of the triangle itself:
TriSlew=3.5v/Tqp

which comes out to 1400 v/sec (volts per second), which is also equal to 0.0014 v/us (volts per microsecond), or 1.4v/ms (volts per millisecond). To comply with the rule of thumb that we want the comparator at least 10 times faster than that, we need a comparator who's output can slew at a rate of at least 0.014 v/us or 14v/ms. Since it has to slew from -7v to +7v that means we need a rise (and fall) time of at least 1ms. That shouldnt be hard to find.


MORE ABOUT THE COMPARATOR OUTPUT CHARACTERISTIC

As mentioned above, if the TL072 is used as the comparator then the output will not reach up to either rail of the power supply. From the data sheet we find that it can be anywhere from Vcc-1.5 to as low as Vcc-3 for the positive excursion, and from -Vcc+1.5 to -Vcc+3 for the negative excursion.
This is typical for op amps but some are not as symmetrical as that either, and it is also questionable if both positive and negative excursions will match closely on any op amp. Mismatched positive and negative excursions will cause non symmetry in the triangle, which may or may not be objectionable to the application, but can be readjusted by changing the reference voltage to be right at the center of the two excursions:
Vref=(Vp+Vm)/2

So for Vp=+7 and Vm=-7 we get:
Vref=(7+(-7))/2=0 volts

but for Vp=+7 and Vm=-6 we get:
Vref=(7+(-6)/2=0.5 volts

Resistors Ra and Rb would be adjusted to obtain this value.
For PWM though almost any triangle will usually work, even a sawtooth, as long as the application is tested carefully over the full operating range for stability because the dynamics when there is feedback involved can change due to the time shifting nature of the PWM generated with a sawtooth versus PWM generated with a symmetrical triangle...it could be better or worse depending on the shape of the sawtooth.
Hi,

I followed what you said, I tried out with 100Hz and the output waveform was prefectly fine. However, I fixed R2 = 3.3kΩ & R3 = 6.8kΩ and Vref = 0V. By varying the value of RC, these are the data i tabulated. Is there any ways to create fout >= 100kHz?

Sorry that I am asking so much questions :x
 

Attachments

  • Tabulated Data for Tri(RC).JPG
    Tabulated Data for Tri(RC).JPG
    65.3 KB · Views: 275
  • Tri-WaveGENERATOR.JPG
    Tri-WaveGENERATOR.JPG
    38.3 KB · Views: 308
Did you notice that the frequency increased when the value of R1 and/or C1 are reduced?
Try 5.6k or 6.8k with 470pF to get 100kHz.
The TL082 is not fast enough for higher frequencies.
 
Hi,

I followed what you said, I tried out with 100Hz and the output waveform was prefectly fine. However, I fixed R2 = 3.3kΩ & R3 = 6.8kΩ and Vref = 0V. By varying the value of RC, these are the data i tabulated. Is there any ways to create fout >= 100kHz?

Sorry that I am asking so much questions :x


Hi,

As Audioguru pointed out, you need to lower one of the values to get to a higher frequency.

You should also look at the triangle with a scope to make sure it is not varying too far from a triangle. You noticed that the measured frequencies started to deviate from the calculated values as the frequency is increased, and this could be caused by a non symmetrical triangle or other problem related to the base frequency of the op amps.

Keep in mind again that the calculations are based on a perfect op amp and prefect comparator that work flawlessly up to any frequency. Real life op amps have other frequency sensitive parts built in that limits their response and that causes deviations from perfection as the frequency goes up.

Also, lowering the value of R2 means the frequency goes up because the comparator threshold window amplitude decreases. This is also an interesting thing to investigate. But a side effect is the output triangle peak amplitude goes down. For values of 3.3k and 6.8k that you are using, that means R2 is not exactly one half of R3 anymore so the idealized height of the triangle only gets up to about 3.4 volts instead of 3.5 volts. That does increase the frequency however.

The slew rate of the comparator is 13v/us so that means it might take a full microsecond to ramp up or down. Since the time period of a 100kHz wave is 1/100000=10us, that means EACH half cycle of the wave is only 5us, so a 1us ramp time for the output of the comparator may be just too long. That would decrease the frequency.
To make that work a little better it would help to limit the power supply voltages of the comparator stages to a lower value. If it only has to ramp up 2 volts with a 13v/us op amp that would mean it would slew within about 0.154us which is much faster. The value of R1 would have to be adjusted accordingly as well, but the problem is it is more difficult to limit the output of the op amp through adjustment of the power supply. Perhaps fast diodes and resistors to limit the output or some other means to clip the output to plus and minus roughly 1 volt might help. Of course going to a faster comparator would do it too.


Seeing the waveshapes for the various frequencies would also help the analysis here.
 
Hi,

As Audioguru pointed out, you need to lower one of the values to get to a higher frequency.

You should also look at the triangle with a scope to make sure it is not varying too far from a triangle. You noticed that the measured frequencies started to deviate from the calculated values as the frequency is increased, and this could be caused by a non symmetrical triangle or other problem related to the base frequency of the op amps.

Keep in mind again that the calculations are based on a perfect op amp and prefect comparator that work flawlessly up to any frequency. Real life op amps have other frequency sensitive parts built in that limits their response and that causes deviations from perfection as the frequency goes up.

Also, lowering the value of R2 means the frequency goes up because the comparator threshold window amplitude decreases. This is also an interesting thing to investigate. But a side effect is the output triangle peak amplitude goes down. For values of 3.3k and 6.8k that you are using, that means R2 is not exactly one half of R3 anymore so the idealized height of the triangle only gets up to about 3.4 volts instead of 3.5 volts. That does increase the frequency however.

The slew rate of the comparator is 13v/us so that means it might take a full microsecond to ramp up or down. Since the time period of a 100kHz wave is 1/100000=10us, that means EACH half cycle of the wave is only 5us, so a 1us ramp time for the output of the comparator may be just too long. That would decrease the frequency.
To make that work a little better it would help to limit the power supply voltages of the comparator stages to a lower value. If it only has to ramp up 2 volts with a 13v/us op amp that would mean it would slew within about 0.154us which is much faster. The value of R1 would have to be adjusted accordingly as well, but the problem is it is more difficult to limit the output of the op amp through adjustment of the power supply. Perhaps fast diodes and resistors to limit the output or some other means to clip the output to plus and minus roughly 1 volt might help. Of course going to a faster comparator would do it too.


Seeing the waveshapes for the various frequencies would also help the analysis here.

Hi,

With regards to what you said, I tried lowering the power supply to +/- 5V and R2=4.7k, R3=10k, This is the result waveform that I got with a frequency of 92.25 kHz. The difference between the fout and fcal is lesser. Should I try to vary the value of R2 and R3 to produce a higher frequency triangle waveform.
 

Attachments

  • Final Waveform.jpg
    Final Waveform.jpg
    1.4 MB · Views: 295
Hi,

Didnt you try reducing R1 and/or the capacitor yet?
 
This is your oscillator as found in OpAmps for everyone from TI. ...
 

Attachments

  • Triangle_Oscillator.png
    Triangle_Oscillator.png
    24.8 KB · Views: 329
Hi,

Didnt you try reducing R1 and/or the capacitor yet?

Yup, But I stopped at R1=1k and C1=470pF, Most likely I am going to stop at generating a 100 kHz instead.
Just another question, when the triangular wave output goes to the inverting input and sine wave to the non-inverting input, I should get a PWM signal right?
However, the PWM waveform is kinda weird. Is that the right waveform or I missed out something?

The waveform only shows the waveform of Hin(A). Could it be that for U2, the power supply is too low?
 

Attachments

  • PWM OUT.JPG
    PWM OUT.JPG
    73.3 KB · Views: 314
  • 2013-11-05 09.13.00.jpg
    2013-11-05 09.13.00.jpg
    1.4 MB · Views: 307
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top