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.
Get rid of C2 because the inputs of the comparator must have a DC reference voltage that is 0V. The sine-wave must also be DC-coupled.
I think the amplitude of your sinewave is too high and causes the TL082 comparator to have "opamp phase inversion" when the sinewave voltage gets within 4V from the negative supply. I do not know why the amplitude from the comparator is so low, it is about half the 17V p-p level it should be.
Since the total supply for the integrator is only 10V then the triangle wave is only about 8.5V peak-to-peak. Then the sinewave must be attenuated so it is also 8V peak-to-peak or whatever the triangle is.
 

Attachments

  • opamp phase inversion.PNG
    opamp phase inversion.PNG
    15.3 KB · Views: 476
The amplitude from the comparator is half of what it should be probably because the TL082 slew rate is too low. The output from a REAL comparator switches high and low much faster. Why not use a REAL comparator instead of an opamp??
 
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?


Hello,

It looks like the scope may not be responding correctly to the signal. You should lower the frequency of the triangle wave and of course the sine wave just for the initial testing. 1KHz might be better for testing.

If you use a capacitor for coupling then you should also use a resistor to ground after the capacitor, say 100k or something like that.

Here's a quick screen shot of what it should look like once it is working right...
 

Attachments

  • PWM-2.gif
    PWM-2.gif
    21.6 KB · Views: 438
For the 100kHz output of the TL082 "comparator" to look square, the device needs to perform properly up to at least 1MHz but the TL082 slews only up to 100kHz. So a 10kHz output might look square at full amplitude.

You do not want an input on the TL082 "comparator" to go lower than about +4V which is its minimum input common mode voltage to avoid "Opamp Phase Inversion".
 
Hello,

It looks like the scope may not be responding correctly to the signal. You should lower the frequency of the triangle wave and of course the sine wave just for the initial testing. 1KHz might be better for testing.

If you use a capacitor for coupling then you should also use a resistor to ground after the capacitor, say 100k or something like that.

Here's a quick screen shot of what it should look like once it is working right...

Sorry, I made a mistake in the schematic design. The U2 has a dual power supply of +/- 5V instead of 10V.
I increase the freq of the sine wave to around 5kHz and this is the result that I get, it is still sort of similar to the previous waveform.

Actually, C2 wasnt used in this circuit because there wasnt any offset in the output. Because of the previous trial with LM324, I had to insert a 100nF to remove the DC offset.

And also, my task to be produce a uni-polar PWM signal instead of a bi-polar signal. Which I took reference from other circuits.
 

Attachments

  • PWM OUT.JPG
    PWM OUT.JPG
    62.1 KB · Views: 465
  • PWM out with Sine 50kHz.jpg
    PWM out with Sine 50kHz.jpg
    1.3 MB · Views: 487
  • Tri + Sine 5kHz.jpg
    Tri + Sine 5kHz.jpg
    1.2 MB · Views: 426
  • Unipolar PWM.JPG
    Unipolar PWM.JPG
    18.9 KB · Views: 453
Get rid of C2 because the inputs of the comparator must have a DC reference voltage that is 0V. The sine-wave must also be DC-coupled.
I think the amplitude of your sinewave is too high and causes the TL082 comparator to have "opamp phase inversion" when the sinewave voltage gets within 4V from the negative supply. I do not know why the amplitude from the comparator is so low, it is about half the 17V p-p level it should be.
Since the total supply for the integrator is only 10V then the triangle wave is only about 8.5V peak-to-peak. Then the sinewave must be attenuated so it is also 8V peak-to-peak or whatever the triangle is.

Hi,

I made a mistake in the schematic. I think the reason for the low amplitude from the comparator is due to the dual power supply of +/- 5V.
And, I am currently using TL072 as my lab does not have any TL082. TL072 and TL082 has the same slew rate.
Is there any major difference between this 2 op-amp?
 

Attachments

  • PWM OUT.JPG
    PWM OUT.JPG
    62.1 KB · Views: 418
You might destroy the inputs of the comparator if the input signal levels exceed its supply voltage! Look at the maximum input voltage on its datasheet.
ALL the opamps in your circuit should use THE SAME power supply voltages.

A TL072 is a TL082 selected for low noise.

Your digital scope has a sampling frequency too low to see the PWM waveform clearly.
 
Hello,

You should try lowering the input sine and input triangle amplitudes.

You really have to keep BOTH inputs at about 1v peak (2v peak to peak) or else the 'comparator' section may not work. That's because the TL072 input common mode range is about 4v above the negative rail and about 4v below the positive rail, which comes out to plus and minus 1 volt. It could be better than that, but it's not guaranteed to work.
If you use plus and minus 10v power supply it would work up to about plus and minus 6v input.

The slew rate is 13v/us which isnt too bad, but you many see ramping on the scope for fast rising wave fronts. The scope may not be able to follow either, i dont know what the rise time spec of the scope is though...you could check that too.
 
Hello,

You should try lowering the input sine and input triangle amplitudes.

You really have to keep BOTH inputs at about 1v peak (2v peak to peak) or else the 'comparator' section may not work. That's because the TL072 input common mode range is about 4v above the negative rail and about 4v below the positive rail, which comes out to plus and minus 1 volt. It could be better than that, but it's not guaranteed to work.
If you use plus and minus 10v power supply it would work up to about plus and minus 6v input.

The slew rate is 13v/us which isnt too bad, but you many see ramping on the scope for fast rising wave fronts. The scope may not be able to follow either, i dont know what the rise time spec of the scope is though...you could check that too.

As for keeping the input amplitudes low, I used voltage divider to half the input to around 7Vpk-pk. I also increase the voltage supply to 10V for higher input values. As for my sine wave, I kept it at 5V. This is the weird waveform that I am getting for a 50Hz sine wave.
 

Attachments

  • Negative Cycle.jpg
    Negative Cycle.jpg
    1.5 MB · Views: 416
  • Positive Cycle.jpg
    Positive Cycle.jpg
    1.3 MB · Views: 427
  • Sine with PWM.jpg
    Sine with PWM.jpg
    1.4 MB · Views: 410
  • Sine with Triangular.jpg
    Sine with Triangular.jpg
    1.5 MB · Views: 405
Last edited:
The low sampling frequency of your digital scope is messing up the 100kHz waveforms.
Try the circuit with a triangle waveform that is 10kHz or less instead of 100kHz.
 
The low sampling frequency of your digital scope is messing up the 100kHz waveforms.
Try the circuit with a triangle waveform that is 10kHz or less instead of 100kHz.
Hi,

I reduced the frequency to around 10kHz, the waveform is much better. However, it will be a bipolar pwm instead.
And also, with reference to the datasheet, it will be okay if I increased the dual power supply to +/- 12V right?
 

Attachments

  • Negative Cycle.jpg
    Negative Cycle.jpg
    1.7 MB · Views: 393
  • Positive.jpg
    Positive.jpg
    1.7 MB · Views: 408
  • PWM Signal.jpg
    PWM Signal.jpg
    1.5 MB · Views: 396
  • Sine&Tri.jpg
    Sine&Tri.jpg
    1.3 MB · Views: 389
Your scope cannot show 50Hz and 10kHz at the same time because then 10kHz will have 25 cycles per division. Try it with a 50Hz sinewave and a 1kHz triangle wave.
 
Hi,

I agree with audioguru that you should change the frequency so that you can view it on the scope better. PWM is sometimes a little strange to view on the scope because it contains many variable width pulses. With single width pulses you can zoom in on one pulse and see it and that really represents all the pulses. But with PWM the pulse width is always changing, so if you zoom in you see a mess of pulse widths. So it is better to use less pulses per cycle just so you can get a better view of how well it is working. When you wish to view individual pulses in a PWM waveform, you can use delayed sweep if your scope has that feature. Delayed sweep delays the sweep until it gets to the start of the time frame you want to view, then it shows it. That means you can zoom in on the pattern near 10 degrees, 20 degrees, 40 degrees, 90 degrees, anywhere in the cycle, and see the pulse width there. Without delayed sweep it is harder to see clearly. Some scopes have a button you can press that stretches out the horizontal axis by 2 to 10 times (or more). That can help if your scope has that feature but does not have delayed sweep.
 
Hi,

I agree with audioguru that you should change the frequency so that you can view it on the scope better. PWM is sometimes a little strange to view on the scope because it contains many variable width pulses. With single width pulses you can zoom in on one pulse and see it and that really represents all the pulses. But with PWM the pulse width is always changing, so if you zoom in you see a mess of pulse widths. So it is better to use less pulses per cycle just so you can get a better view of how well it is working. When you wish to view individual pulses in a PWM waveform, you can use delayed sweep if your scope has that feature. Delayed sweep delays the sweep until it gets to the start of the time frame you want to view, then it shows it. That means you can zoom in on the pattern near 10 degrees, 20 degrees, 40 degrees, 90 degrees, anywhere in the cycle, and see the pulse width there. Without delayed sweep it is harder to see clearly. Some scopes have a button you can press that stretches out the horizontal axis by 2 to 10 times (or more). That can help if your scope has that feature but does not have delayed sweep.
I see. Thanks MrAI & audioguru,

As for now, I think I am fine with the circuits. Thanks alot for the help
 
Hi,

You are welcome, and if you feel like sharing some photos of your project so we can all see it that would be great too. You'd have to take a few pic's i guess. That's up to you, but it would be nice to see.
 
Hi,

You are welcome, and if you feel like sharing some photos of your project so we can all see it that would be great too. You'd have to take a few pic's i guess. That's up to you, but it would be nice to see.
These are some of the pictures that I collated.
 

Attachments

  • Triangular OUT.JPG
    Triangular OUT.JPG
    33 KB · Views: 410
  • Voltage Divider.jpg
    Voltage Divider.jpg
    1.7 MB · Views: 400
Notice that there are no sharp points on the triangle waves.
Your 10k and 10k divider is affected by stray capacitance at that high frequency. Try using 1k and 1k instead.
 
Notice that there are no sharp points on the triangle waves.
Your 10k and 10k divider is affected by stray capacitance at that high frequency. Try using 1k and 1k instead.

Alright. Thanks! Will try it out now

This is the waveform that I compared, [using 1k x2 instead of using 10k x2]
Channel 1: 1k VoltageDivider
Channel 2: 10k VoltageDivider.

There isn't much difference between the two waveform from what I observed.
 

Attachments

  • 1k VD and 10k VD.jpg
    1k VD and 10k VD.jpg
    993.8 KB · Views: 428
Last edited:
No. You used 1k and 10k so the divider does very little. Use 1k and 1k to divide the signal in half.

Why divide the output signal when changing the value of R2 or R3 will reduce the level and make the triangle waveform better?
 
No. You used 1k and 10k so the divider does very little. Use 1k and 1k to divide the signal in half.

Why divide the output signal when changing the value of R2 or R3 will reduce the level and make the triangle waveform better?

Actually I meant that I used 1k and 1k voltage divider for channel 2, and 10k and 10k voltage divider for channel 1.

Erm, cause I was thinking that if i were to adjust my R2 and R3 again, it would take me more time to get the desired frequency.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top