triangle waves

Thread Starter

jarwulf

Joined Jul 7, 2013
60
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?
 

PeterCoxSmith

Joined Feb 23, 2015
148
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.
 

Bordodynov

Joined May 20, 2015
3,177
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.
 

atferrari

Joined Jan 6, 2004
4,764
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
 

wayneh

Joined Sep 9, 2010
17,496
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.
 

crutschow

Joined Mar 14, 2008
34,285
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.
You can generate a triangle wave and then run it through a clipping circuit.
 

crutschow

Joined Mar 14, 2008
34,285
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
 

Attachments

Last edited:

Thread Starter

jarwulf

Joined Jul 7, 2013
60
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/




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.



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?
 

Thread Starter

jarwulf

Joined Jul 7, 2013
60
Take the pain to compare this last with the one I posted.

Get a breadboard and implement one.

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.



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

what would I add to complete the circuit so it can function?
 
Last edited:

atferrari

Joined Jan 6, 2004
4,764
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?
 

atferrari

Joined Jan 6, 2004
4,764
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.
 
Top