triangle waves

Discussion in 'General Electronics Chat' started by jarwulf, Nov 5, 2015.

  1. jarwulf

    Thread Starter Member

    Jul 7, 2013
    60
    0
    Hi, what would be the easiest way to generate a triangle wave of for example .5-4.5V in the kHz range? I've heard of waveform generators such as the XR2206 but also that they were obsolete and that using a microcontroller would be a more 'modern' method and to be honest it does look like theres a lot of resistors and capacitors you have to hook up to the XR2206 to get it to function the way you want whereas maybe with a microcontroller much of what you would have to do could be done in code. Which one would be easiest or is there an even easier way?
     
  2. Bordodynov

    Active Member

    May 20, 2015
    637
    188
    See:

    triangle_waves.png
     
  3. PeterCoxSmith

    Member

    Feb 23, 2015
    148
    38
    An up/down counter feeding a DAC feeding a filter if you want to remove the steps. For this scheme I implemented the counter and controls in an FPGA, and used in a PWM current controller for a motor drive. No problem with DC offset drift in continuous operation.
     
  4. Bordodynov

    Active Member

    May 20, 2015
    637
    188
    I am going back to my scheme. Instead of the timer can be used as a generator of the microcontroller. If the microcontroller has a weak high level, it is necessary to add the inverter. You only need to pick up the RC-circuit for integrator.
     
  5. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Hola jarwulf,

    For a controller now running on my bench, I implemented the circuit below. It is the very last in "Op amps for everyone" by Ron Mancini. I did a print from the screen because I could not get a link for you to download from a known source (albeit is available at many sites throughout the Web).

    As he says, adjust the symmetry via the V reference.

    BTW, if you read the whole book it is going to be time really well spent.

    From Op amps for everyone TI Mancini.png
     
    Sinus23, wayneh, OBW0549 and 2 others like this.
  6. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    This may border on a hijack, but does that same reference have anything on generating a trapezoid waveform? I mean like a square wave but with long rise and fall times. Or you might say a clipped triangle.
     
  7. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    You can generate a triangle wave and then run it through a clipping circuit.
     
  8. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    Below is an LTspice simulation of Mancini's circuit with some small mods including the Vcc/2 reference.
    The pot U2 adjusts it over the frequency range shown.

    Edit: One advantage of this circuit is that the integrator generating the triangle-wave is inside the feedback loop so its output stays relatively constant with a change in frequency and is fairly insensitive to integrator offset effects.

    Triangle Gen.PNG
     
    Last edited: Nov 5, 2015
    Bordodynov likes this.
  9. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Not for trapezoids wayneh.
     
  10. jarwulf

    Thread Starter Member

    Jul 7, 2013
    60
    0
    Hi, I'm nearly a beginner so I'm trying to find an example which doesn't look as intimidating. I finally found something on this page.

    http://pcbheaven.com/circuitpages/Triangle_Wave_Generator/

    [​IMG]


    Thing is, even this is a little too abstracted for my tastes..I want to get a straightforward picture of how the circuit would really look when I lay it out physically. So this is what I've gotten so far.

    [​IMG]

    https://farm1.staticflickr.com/716/22356381504_1b74f16ace_z.jpg
    if you can't see the image...


    Can someone show me how I can 'complete' this to the minimal complete circuit (which I'm guessing should be a closed loop) by integrating in the battery? According to the description, you can change the frequency by changing the value of R and C. But what about changing the voltage range of the triangle waves say to 0.5-4.5V? How would you be able to do that? Is the pin layout for all op amps basically the same?
     
  11. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Take the pain to compare this last with the one I posted.

    Get a breadboard and implement one.
     
  12. Bordodynov

    Active Member

    May 20, 2015
    637
    188
    See Triangle_Gen2.png
     
  13. jarwulf

    Thread Starter Member

    Jul 7, 2013
    60
    0

    I looked at the circuit and tried to fill in the blanks, but I need to see how it explicitly would be wired to understand how to make it in the breadboard. In the diagrams usually the power source is just floating off somewhere to the side and the grounds and other symbols simply end and you're not sure whether they're connected to something and if so what. I guess first off I need to know how the power is going to be connected into this circuit and what the grounds are going to be going to.

    Here is how I tried to imagine how the power source would be connected to the circuit you showed but I know its not complete yet.

    [​IMG]

    https://farm1.staticflickr.com/681/22791932370_e8447cf458_z.jpg

    what would I add to complete the circuit so it can function?
     
    Last edited: Nov 13, 2015
  14. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Look for the datasheet of the opamp you intend to use and check what are the pins used to feed it with power.

    Are you sure that at least you can distinguish the inverting or non inverting inputs from the V+ and V- pins?

    And the output?
     
  15. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Hey jarwulf

    After rereading the thread, I found that Carl and Bordodynov posted complete circuits. You did not even check that.

    Do this:

    As I said, learn to identify the pins.

    Forget the horrible mess you posted.

    Implement one of those in posts 8 or 12.

    Post the real outcome.
     
    PeterCoxSmith likes this.
Loading...