1. 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.
    Dismiss Notice

200 MHz Triangular Wave

Discussion in 'Homework Help' started by Ng Jing Xi, Oct 22, 2013.

  1. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,437
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    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.
     

    Attached Files:

  2. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,437
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    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??
     
  3. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,026
    Likes:
    951
    Location:
    NJ

    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...
     

    Attached Files:

  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,437
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE

    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".
     
  6. Ng Jing Xi

    Ng Jing Xi Member

    Joined:
    Oct 1, 2013
    Messages:
    97
    Likes:
    0
    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.
     

    Attached Files:

  7. Ng Jing Xi

    Ng Jing Xi Member

    Joined:
    Oct 1, 2013
    Messages:
    97
    Likes:
    0
    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?
     

    Attached Files:

  8. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,437
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    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.
     
  9. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,026
    Likes:
    951
    Location:
    NJ
    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.
     
  10. Ng Jing Xi

    Ng Jing Xi Member

    Joined:
    Oct 1, 2013
    Messages:
    97
    Likes:
    0
    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.
     

    Attached Files:

    Last edited: Nov 6, 2013
  11. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,437
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    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.
     
  12. Ng Jing Xi

    Ng Jing Xi Member

    Joined:
    Oct 1, 2013
    Messages:
    97
    Likes:
    0
    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?
     

    Attached Files:

  13. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,437
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    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.
     
  14. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,026
    Likes:
    951
    Location:
    NJ
    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.
     
  15. Ng Jing Xi

    Ng Jing Xi Member

    Joined:
    Oct 1, 2013
    Messages:
    97
    Likes:
    0
    I see. Thanks MrAI & audioguru,

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

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,026
    Likes:
    951
    Location:
    NJ
    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.
     
  17. Ng Jing Xi

    Ng Jing Xi Member

    Joined:
    Oct 1, 2013
    Messages:
    97
    Likes:
    0
    These are some of the pictures that I collated.
     

    Attached Files:

  18. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,437
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    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.
     
  19. Ng Jing Xi

    Ng Jing Xi Member

    Joined:
    Oct 1, 2013
    Messages:
    97
    Likes:
    0
    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.
     

    Attached Files:

    Last edited: Nov 13, 2013
  20. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,437
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    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?
     
  21. Ng Jing Xi

    Ng Jing Xi Member

    Joined:
    Oct 1, 2013
    Messages:
    97
    Likes:
    0
    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.
     

Share This Page